daryllabar / canvasapppackager Goto Github PK
View Code? Open in Web Editor NEWTool used to Extract Canvas Apps, to be pushed into source control, and repackage it to be pushed to the cloud
License: MIT License
Tool used to Extract Canvas Apps, to be pushed into source control, and repackage it to be pushed to the cloud
License: MIT License
The unpack action fails with the following error when the CanvasAppPackager runs on the canvas app due to the new "IsComponentDefinition" property of the app.
System.Exception: Unable to re-serialize json to match source! Character at position: 318 on line: 11 at 8 is not correct. To prevent potential app defects, extracting file C:\.....................\Extract\Apps\Power Flappy\Controls\1.json has stopped.
The repro app can be downloaded here for troubleshooting
Currently file is created in same folder as the exe.
Although there is logic to handle extracting msapp file, their is no logic to handle packing it.
Rule.RuleProviderType missing
Template.SourceLIbraryId missing
Output JSON no longer formatted
When packing, and then importing a file and running it in PowerApps, it fails to open.
Metadata is missing Allow customizations
PCF Components zip to a parent directory, this should be switch to a separate child directory.
These should be renamed to a constant name, and updated when repacked.
The unpack action fails with the following error when the CanvasAppPackager runs on the canvas app with Gallery Control which is bound to CDS data source.
System.Exception: Unable to re-serialize json to match source! Character at position xxxxx is not correct. To prevent potential app defects, extracting file C:\.....................\CanvasAppPackagerApp\Extract\Apps\Canvas App Packager App\Controls\3.json has stopped.
The repro app can be downloaded here for troubleshooting
This causes and error with some app where the header is
{"DocVersion":"Version"
vs
{"DocVersion": "Version"
PublishOrderIndex changes almost every time a control is added/removed. Should pull it out into a separate file that allows all the other files to not change.
This was renamed.
When attempting to execute:
CanvasAppPackager /a:unpack /z:"..\T&S Feedback App_v01_01.msapp" /f:"..\T&S Feedback App_v01_01_unpack"
after downloading your v1.0.0.21
I am getting the following error:
A fatal error occurred. The required library hostfxr.dll could not be found.
when executing on Windows 10.0.18363
Should this dll be included in your zip?
I am not admin on my corporate machine so I need justification to have sysadmins help with unauthorized installs.
Can the dll be added without install as the dlls in your app folder are?
The Resources\PublishInfo.json defines a LogoFile name that is updated with each export. This should be set to a default value.
Hi, I got the following error on multiple canvas apps, which I tried to unpack.
System.Exception: Unable to re-serialize json to match source! Character at position: 1843 on line: 0 at 1844 is not correct. To prevent potential app defects, extracting file C:\Program Files\DynamicsUtility\Tools\SPPoc\ext\Apps\FormToJson\Controls\103.json has stopped.
See 'C:\Program Files\DynamicsUtility\Tools\SPPoc\ext\Apps\FormToJson\Controls\103.json.original' for extracted version vs output version 'C:\Program Files\DynamicsUtility\Tools\SPPoc\ext\Apps\FormToJson\Controls\103.json.reserialized'.Character at position: 23392 on line: 1 at 0 is not correct. To prevent potential app defects, extracting file C:\Program Files\DynamicsUtility\Tools\SPPoc\ext\Apps\FormToJson\Controls\103.json has stopped.
See 'C:\Program Files\DynamicsUtility\Tools\SPPoc\ext\Apps\FormToJson\Controls\103.json.original.json' for extracted formatted version vs output formatted version 'C:\Program Files\DynamicsUtility\Tools\SPPoc\ext\Apps\FormToJson\Controls\103.json.reserialized.json'.
at CanvasAppPackager.UnpackLogic.VerifySerialization(CanvasAppScreen screen, String json, String file, Version docVersion) in C:\Users\DarylLaBar\source\repos\CanvasAppPackager\CanvasAppPackager\UnpackLogic.cs:line 244
at CanvasAppPackager.UnpackLogic.ExtraCodeful(String controlsDir, String codeDirectory, Version version, Args options) in C:\Users\DarylLaBar\source\repos\CanvasAppPackager\CanvasAppPackager\UnpackLogic.cs:line 202
at CanvasAppPackager.UnpackLogic.ExtractCanvasApp(String appDirectory, Args options) in C:\Users\DarylLaBar\source\repos\CanvasAppPackager\CanvasAppPackager\UnpackLogic.cs:line 180
at CanvasAppPackager.UnpackLogic.Unpack(String file, String outputDirectory, Args options) in C:\Users\DarylLaBar\source\repos\CanvasAppPackager\CanvasAppPackager\UnpackLogic.cs:line 62
at CanvasAppPackager.UnpackLogic.ExtractApps(String outputDirectory, Args options) in C:\Users\DarylLaBar\source\repos\CanvasAppPackager\CanvasAppPackager\UnpackLogic.cs:line 80
at CanvasAppPackager.UnpackLogic.Unpack(String file, String outputDirectory, Args options) in C:\Users\DarylLaBar\source\repos\CanvasAppPackager\CanvasAppPackager\UnpackLogic.cs:line 62
at CanvasAppPackager.Program.Unpack(Args options) in C:\Users\DarylLaBar\source\repos\CanvasAppPackager\CanvasAppPackager\Program.cs:line 89
at CanvasAppPackager.Program.Main(String[] args) in C:\Users\DarylLaBar\source\repos\CanvasAppPackager\CanvasAppPackager\Program.cs:line 49
Here the demo app
FormToJson_20210413091552.zip
Best regards,
Marco
If you have different versions of the app to allow different users to edit the app, extracting it will include the display name, and won't line up correctly in Source Control. Allow for the name to be set.
Unpack Action Fails if the Canvas App does not contain any Component
Once a new component is created in the app and retry the unpack, the following error no longer occurs.
Extracting files from C:\Temp\CanvasApps\ChallengesApp(Developer1)_20200210091630.zip to C:\Temp\CanvasApps\ChallengesAppDeveloper1 Extracting App Challenges App - Attendees at Microsoft Ignite 2018 Power Platform in a Day event will use this app to complete a number of challenges using PowerApps, Flow, Common Data Service, SharePoint & Power BI. Extracting files from C:\Temp\CanvasApps\ChallengesAppDeveloper1\Microsoft.PowerApps\apps\1007466488935865233\N73e6a828-2800-4170-945d-546f5b1e7be8-document.msapp to C:\Temp\CanvasApps\ChallengesAppDeveloper1\Apps\Challenges App Extracting file C:\Temp\CanvasApps\ChallengesAppDeveloper1\Apps\Challenges App\Controls\1.json Extracting file C:\Temp\CanvasApps\ChallengesAppDeveloper1\Apps\Challenges App\Controls\28.json Extracting file C:\Temp\CanvasApps\ChallengesAppDeveloper1\Apps\Challenges App\Controls\3.json Extracting file C:\Temp\CanvasApps\ChallengesAppDeveloper1\Apps\Challenges App\Resources\PublishInfo.json Renaming auto named file 'C:\Temp\CanvasApps\ChallengesAppDeveloper1\Apps\Challenges App\Resources\nsvk01e5.jpg' to 'C:\Temp\CanvasApps\ChallengesAppDeveloper1\Apps\Challenges App\Resources\Logo.jpg'. System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Temp\CanvasApps\ChallengesAppDeveloper1\Apps\Challenges App\Components'. at System.IO.Enumeration.FileSystemEnumerator
1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
at System.IO.Enumeration.FileSystemEnumerator1.Init() at System.IO.Enumeration.FileSystemEnumerator
1..ctor(String directory, Boolean isNormalized, EnumerationOptions options)
at System.IO.Enumeration.FileSystemEnumerable1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized) at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options) at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options) at System.IO.Directory.GetFiles(String path) at CanvasAppPackager.UnpackLogic.RenameAutoNamedFiles(String appDirectory) in C:\Users\DarylLaBar\source\repos\CanvasAppPackager\CanvasAppPackager\UnpackLogic.cs:line 120 at CanvasAppPackager.UnpackLogic.Unpack(String file, String outputDirectory, Args options) in C:\Users\DarylLaBar\source\repos\CanvasAppPackager\CanvasAppPackager\UnpackLogic.cs:line 59 at CanvasAppPackager.UnpackLogic.ExtractApps(String outputDirectory, Args options) in C:\Users\DarylLaBar\source\repos\CanvasAppPackager\CanvasAppPackager\UnpackLogic.cs:line 77 at CanvasAppPackager.UnpackLogic.Unpack(String file, String outputDirectory, Args options) in C:\Users\DarylLaBar\source\repos\CanvasAppPackager\CanvasAppPackager\UnpackLogic.cs:line 59 at CanvasAppPackager.Program.Unpack(Args options) in C:\Users\DarylLaBar\source\repos\CanvasAppPackager\CanvasAppPackager\Program.cs:line 79 at CanvasAppPackager.Program.Main(String[] args) in C:\Users\DarylLaBar\source\repos\CanvasAppPackager\CanvasAppPackager\Program.cs:line 39 Finished!
This is breaking extracts.
The Header.Json contains data something like this. If the Doc Version is older than expected, the compare won't be successful.
{
"DocVersion": "1.279",
"MSAppStructureVersion": "2.0",
"MinVersionToLoad": "1.279",
"LastSavedDateTimeUTC": "12/26/2019 22:09:41"
}
Currently this file is not formatted, and it's hard to see what is changing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.