microsoft/powerplatform-actions

unpack solution failed: canvas app doesn't match with its name

westerdaled opened this issue · 7 comments

Just trying out the actions on a solution I am developing for a client.

The app which is embedded in a bi report works fine. I wonder if the name I chose is too long. I am happy to rename but perhaps some insight on this error would be good.

Run microsoft/powerplatform-actions/unpack-solution@0.5.2

Error: Component files in D:\actions-runner\_work\PowerPlatform.***\PowerPlatform.***\out\exported\***.zip\CanvasApps for canvas app xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxmanualexception_3adcc doesn't match with its name
  

Github Action issue

When I unzip the solution I see the name is truncated and the suffix is incorrect .. Hmmmm what to do about this one?

GitHub Action Solution Unpack

@westerdaled this issue has been fixed in the pac solution unpack side at the beginning of this year. And you're using the pp-actions version @0.5.2 that was I think missed that pac CLI update by just a couple weeks.
Please switch your GH workflows to a newer version, ideally, let it float on @v0 or @latest: we do test and validate that newer releases are indeed backwards compatible for the same major version v0; we do consider breaks of that assumptions as bugs we do want to know about.

@davidjenni thanks for your awesome response. I have passed this to one of company admins. I will let you know the outcome after they make the changes you suggest.

Firstly, I did a search @0.5.2 and replace for the actions as you suggested - so action is shown below:

uses: microsoft/powerplatform-actions/pack-solution@v0 ( I seem to have missed this action uses: actions/checkout@v2.3.4 in my last PR for the suggested change, so not sure the impact.

Anyway, I am now getting

Unpacking Solution...
Read-only files will be over-written or deleted.

Extracting D:\actions-runner_work\PowerPlatform.\PowerPlatform.\out\exported*.zip to D:\actions-runner_work\PowerPlatform.\PowerPlatform.\Solution*

  Microsoft PowerPlatform CLI
  Version: 1.18.4+g1a00e63
  
  Error: Could not find file 'D:\actions-runner\_work\PowerPlatform.***\PowerPlatform.***\out\exported\***.zip'.

However, on Friday with @0.5.2


Extracting D:\actions-runner\_work\PowerPlatform.***\PowerPlatform.***\out\exported\***.zip to D:\actions-runner\_work\PowerPlatform.***\PowerPlatform.***\Solution\***
  
  
  Skipping localization
  
  Processing Component: Workflows
  
   - PowerApp->GetSomethingWithThisFLow
  
   - PowerApp->GetSomethingElseWithThisFlow

Hmmmmm so not sure If I have introduced an issue. Do you want me to try @latest

@davidjenni

Just a quick update: a colleague and I have managed to get both workflows working (SolutionExtract & BuildRelease) in the repo:

The key fix we had to make when using @latest, is to ensure the zip file name gets appended with a hardcoded: "_managed".
Should we use a var substitution for the rare situations when we want to deploy the solution as unmanaged?

name: Export Solution
          id: ExportSolution
          uses: microsoft/powerplatform-actions/export-solution@latest
          with:
            environment-url: ${{ env.EnvironmentURL }}
            user-name: ?
            password-secret: ?
            solution-name: ${{ env.XXXXXX }}
            solution-output-file: out/exported/${{ env.XXXXXXName }}_managed.zip
            managed: true
Feb00 commented

I am having the same problem with Unpacking Solution "Error: Could not find file '...\out\exported***.zip'" with managed solution using @latest.
Solved by adding "_managed.zip" to solution name, example:
Not working anymore (worked correctly until about 15/09/2022):
image
Working:
image

@Feb00 , glad my post helped .

I have now cloned 4 more repos and made the changes to the post outlined in this post, However, I seemed to have missed the GA below as it did not come up on my original search and replace. Given, I want to create the PRs today, I am wondering if you have also change this to @latest - looking at your sample I suspect you haven't.

name: Checkout Repository
         id: CheckoutRepository
         uses: actions/checkout@v2.3.4