electron-installer-windows
electron-installer-windows copied to clipboard
Installer creation fails with "System.ArgumentException: Part URI is not valid per rules defined in the Open Packaging Conventions specification."
What version of electron-installer-windows
are you using?
C:\gui>electron-installer-windows --version
2.0.0
What version of node
and npm
are you using?
C:\gui>node -v
v12.13.0
C:\gui>npm -v
6.12.0
What operating system are you using?
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.18362 N/A Build 18362
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
Can you compile the example app successfully?
If not, paste here the output of the following commands:
$ git clone https://github.com/electron-userland/electron-installer-windows.git
$ cd electron-installer-windows/example
$ DEBUG='electron-installer-windows' npm run build
What did you do? Please include the configuration you are using for electron-installer-windows
.
C:\gui>electron-packager ./ yadamu --out=dist --electron-version=7.0.1
electron-packager Electron Packager 14.1.0
electron-packager Node v12.13.0
electron-packager Host Operating system: win32 10.0.18362 (x64) +0ms
electron-packager Packager Options: {"_":["./","yadamu"],"out":"dist","electron-version":"7.0.1","electronVersion":"7.0.1","deref-symlinks":true,"derefSymlinks":true,"download":{"rejectUnauthorized":true,"reject-unauthorized":true},"junk":true,"prune":true,"dir":"./","name":"yadamu","protocols":[]} +60ms
electron-packager Target Platforms: win32 +78ms
electron-packager Target Architectures: x64 +0ms
electron-packager Inferring appVersion from version in C:\gui\package.json +0ms
electron-packager Inferring win32metadata.CompanyName from author in C:\gui\package.json +93ms
electron-packager Application name: yadamu +297ms
electron-packager Target Electron version: 7.0.1 +109ms
electron-packager Ignored path regular expressions: [ '/\\.git($|/)', '/node_modules/\\.bin($|/)', '\\.o(bj)?$' ] +0ms
electron-packager Downloading Electron with options {"rejectUnauthorized":true,"reject-unauthorized":true,"platform":"win32","arch":"x64","version":"7.0.1","artifactName":"electron"} +0ms
Packaging app for platform win32 x64 using electron v7.0.1
electron-packager Creating C:\Users\YADAMU~1\AppData\Local\Temp\electron-packager\win32-x64-template +954ms
electron-packager Extracting C:\Users\YadamuBuild\AppData\Local\electron\Cache\httpsgithub.comelectronelectronreleasesdownloadv7.0.1electron-v7.0.1-win32-x64.zip\electron-v7.0.1-win32-x64.zip to C:\Users\YADAMU~1\AppData\Local\Temp\electron-packager\win32-x64-template +15ms
electron-packager Initializing app in C:\Users\YADAMU~1\AppData\Local\Temp\electron-packager\win32-x64\yadamu-win32-x64 from C:\Users\YADAMU~1\AppData\Local\Temp\electron-packager\win32-x64-template template +0ms
electron-packager Ignored paths based on the out param: [ 'C:\\gui\\dist' ] +16s
electron-packager Renaming electron.exe to yadamu.exe in C:\Users\YADAMU~1\AppData\Local\Temp\electron-packager\win32-x64\yadamu-win32-x64 +46s
electron-packager Running rcedit with the options {"version-string":{"FileDescription":"yadamu","InternalName":"yadamu","OriginalFilename":"yadamu.exe","ProductName":"yadamu","CompanyName":"Mark D Drake"},"file-version":"1.0.0","product-version":"1.0.0"} +0ms
electron-packager Moving C:\Users\YADAMU~1\AppData\Local\Temp\electron-packager\win32-x64\yadamu-win32-x64 to dist\yadamu-win32-x64 +2s
Wrote new app to dist\yadamu-win32-x64
C:\gui>dir dist
Volume in drive C has no label.
Volume Serial Number is 0A86-8B89
Directory of C:\gui\dist
11/05/2019 08:37 AM <DIR> .
11/05/2019 08:37 AM <DIR> ..
11/05/2019 08:37 AM <DIR> yadamu-win32-x64
0 File(s) 0 bytes
3 Dir(s) 470,405,062,656 bytes free
C:\gui>electron-installer-windows --src dist\yadamu-win32-x64 --dest dist\installers
Creating package (this may take a while)
Error: Error executing command (Exited with status 4294967295):
C:\Users\YadamuBuild\AppData\Roaming\npm\node_modules\electron-installer-windows\vendor\squirrel\Squirrel.com --releasify C:/Users/YADAMU~1/AppData/Local/Temp/electron-installer-1808TiYpVhp7WO1B/yadamu_1.0.0_undefined/nuget/yadamu.1.0.0.nupkg --releaseDir C:\Users\YADAMU~1\AppData\Local\Temp\electron-installer-1808TiYpVhp7WO1B\yadamu_1.0.0_undefined\squirrel --setupIcon C:\Users\YadamuBuild\AppData\Roaming\npm\node_modules\electron-installer-windows\resources\icon.ico --loadingGif C:\Users\YadamuBuild\AppData\Roaming\npm\node_modules\electron-installer-windows\resources\animation.gif
System.ArgumentException: Part URI is not valid per rules defined in the Open Packaging Conventions specification.
at System.IO.Packaging.PackUriHelper.ValidatePartUri(Uri partUri)
at System.IO.Packaging.ZipPackage.ContentTypeHelper.ProcessOverrideTagAttributes(XmlTextReader reader)
at System.IO.Packaging.ZipPackage.ContentTypeHelper.ParseContentTypesFile(ZipFileInfoCollection zipFiles)
at System.IO.Packaging.ZipPackage.ContentTypeHelper..ctor(ZipArchive zipArchive, IgnoredItemHelper ignoredItemHelper)
at System.IO.Packaging.ZipPackage..ctor(Stream s, FileMode mode, FileAccess access, Boolean streaming)
at System.IO.Packaging.Package.Open(Stream stream, FileMode packageMode, FileAccess packageAccess, Boolean streaming)
at System.IO.Packaging.Package.Open(Stream stream)
at NuGet.ZipPackage.EnsureManifest()
at NuGet.ZipPackage..ctor(String filePath, Boolean enableCaching)
at Squirrel.ReleasePackage.get_SuggestedReleaseFileName()
at Squirrel.Update.Program.Releasify(String package, String targetDir, String packagesDir, String bootstrapperExe, String backgroundGif, String signingOpts, String baseUrl, String setupIcon, Boolean generateMsi, String frameworkVersion, Boolean generateDeltas)
at Squirrel.Update.Program.executeCommandLine(String[] args)
at Squirrel.Update.Program.main(String[] args)
at Squirrel.Update.Program.Main(String[] args)
at module.exports (C:\Users\YadamuBuild\AppData\Roaming\npm\node_modules\electron-installer-windows\node_modules\electron-installer-common\src\spawn.js:22:11)
at processTicksAndRejections (internal/process/task_queues.js:93:5) Error: Error executing command (Exited with status 4294967295):
C:\Users\YadamuBuild\AppData\Roaming\npm\node_modules\electron-installer-windows\vendor\squirrel\Squirrel.com --releasify C:/Users/YADAMU~1/AppData/Local/Temp/electron-installer-1808TiYpVhp7WO1B/yadamu_1.0.0_undefined/nuget/yadamu.1.0.0.nupkg --releaseDir C:\Users\YADAMU~1\AppData\Local\Temp\electron-installer-1808TiYpVhp7WO1B\yadamu_1.0.0_undefined\squirrel --setupIcon C:\Users\YadamuBuild\AppData\Roaming\npm\node_modules\electron-installer-windows\resources\icon.ico --loadingGif C:\Users\YadamuBuild\AppData\Roaming\npm\node_modules\electron-installer-windows\resources\animation.gif
System.ArgumentException: Part URI is not valid per rules defined in the Open Packaging Conventions specification.
at System.IO.Packaging.PackUriHelper.ValidatePartUri(Uri partUri)
at System.IO.Packaging.ZipPackage.ContentTypeHelper.ProcessOverrideTagAttributes(XmlTextReader reader)
at System.IO.Packaging.ZipPackage.ContentTypeHelper.ParseContentTypesFile(ZipFileInfoCollection zipFiles)
at System.IO.Packaging.ZipPackage.ContentTypeHelper..ctor(ZipArchive zipArchive, IgnoredItemHelper ignoredItemHelper)
at System.IO.Packaging.ZipPackage..ctor(Stream s, FileMode mode, FileAccess access, Boolean streaming)
at System.IO.Packaging.Package.Open(Stream stream, FileMode packageMode, FileAccess packageAccess, Boolean streaming)
at System.IO.Packaging.Package.Open(Stream stream)
at NuGet.ZipPackage.EnsureManifest()
at NuGet.ZipPackage..ctor(String filePath, Boolean enableCaching)
at Squirrel.ReleasePackage.get_SuggestedReleaseFileName()
at Squirrel.Update.Program.Releasify(String package, String targetDir, String packagesDir, String bootstrapperExe, String backgroundGif, String signingOpts, String baseUrl, String setupIcon, Boolean generateMsi, String frameworkVersion, Boolean generateDeltas)
at Squirrel.Update.Program.executeCommandLine(String[] args)
at Squirrel.Update.Program.main(String[] args)
at Squirrel.Update.Program.Main(String[] args)
at module.exports (C:\Users\YadamuBuild\AppData\Roaming\npm\node_modules\electron-installer-windows\node_modules\electron-installer-common\src\spawn.js:22:11)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
What did you expect to happen?
A Windows installer would be created for my application
What actually happened?
The process failed with
System.ArgumentException: Part URI is not valid per rules defined in the Open Packaging Conventions specification.
111
I think this is an issue with your package.json
and probably having spaces in places that should have, or that something is missing from it. Can you post it here?
C:\gui\dist\yadamu-win32-x64\resources\app>type package.json
{
"name": "yadamu",
"version": "1.0.0",
"description": "User Interface for YADAMU",
"main": "main.js",
"scripts": {
"start": "electron ./"
},
"repository": {
"type": "git",
"url": "TBD"
},
"author": "Mark D Drake",
"license": "SEE LICENSE IN TDB.txt",
"dependencies": {
"bootstrap": "^4.3.1",
"font-awesome": "^4.7.0",
"jquery": "^3.4.1",
"mariadb": "^2.1.2",
"mssql": "^5.1.0",
"mysql": "^2.17.1",
"oracledb": "^4.0.1",
"pg": "^7.12.1",
"pg-copy-streams": "^2.2.2",
"pg-query-stream": "^2.0.1",
"popper.js": "^1.16.0",
"require": "^2.4.20",
"uuid": "^3.3.3",
"wkx": "^0.4.8"
},
"devDependencies": {
"electron": "^7.0.1",
"electron-packager": "^14.1.0"
}
}
C:\gui\dist\yadamu-win32-x64\resources\app>
I can't reproduce this, but a simple Google search showed me that the error might be related to having spaces in your filenames, Squirrel doesn't seem to like that because it makes an invalid URI.
If you can run the example successfully, then it's definitely not our tool.
Also, try running the command with the variable DEBUG='electron-installer-windows'
, I always have trouble using this with cmd
or powershell
, so I recommend running it on bash
. Nonetheless, the output of that might give you a better clue of what's going on here. Feel free to post it here but I don't know how much help I can be.