Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installer generation failing with message "System.ArgumentException: Part URI cannot contain a Fragment component" #345

Open
tobias-klein opened this issue Oct 1, 2021 · 2 comments

Comments

@tobias-klein
Copy link

What version of electron-installer-windows are you using?

3.0.0

What version of node and npm are you using?

node 14.17.6
npm 6.14.15

What operating system are you using?

Windows Server 2019 Data Center
10.0.17763 Build 2183
(GitHub Actions Runner)

What did you do? Please include the configuration you are using for electron-installer-windows.

Generate an installer for Ezra Bible App. This previously worked in the GitHub Actions Runner environment.

Configuration:
win_installer_config.json

What did you expect to happen?

Successfull generation of Windows installer for app.

What actually happened?

The process failed with the following messages:

Creating package (this may take a while)
ExitCodeError: Command failed with a non-zero return code (4294967295):
D:\a\ezra-bible-app\ezra-bible-app\node_modules\electron-installer-windows\vendor\squirrel\Squirrel.com --releasify C:\Users\RUNNER~1\AppData\Local\Temp\electron-installer--2108-hAMqRxosYf05\ezra_bible_app_1.3.0-Dev_undefined\nuget\ezra_bible_app.1.3.0-Dev.nupkg --releaseDir C:\Users\RUNNER~1\AppData\Local\Temp\electron-installer--2108-hAMqRxosYf05\ezra_bible_app_1.3.0-Dev_undefined\squirrel --setupIcon D:\a\ezra-bible-app\ezra-bible-app\icons\ezra.ico --loadingGif D:\a\ezra-bible-app\ezra-bible-app\node_modules\electron-installer-windows\resources\animation.gif --no-msi

System.ArgumentException: Part URI cannot contain a Fragment component.
   at System.IO.Packaging.PackUriHelper.ValidatePartUri(Uri partUri)
   at System.IO.Packaging.ZipPackage.ContentTypeHelper.ProcessDefaultTagAttributes(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 ChildProcess.<anonymous> (D:\a\ezra-bible-app\ezra-bible-app\node_modules\@malept\cross-spawn-promise\dist\src\index.js:99:24)
    at ChildProcess.emit (events.js:400:28)
    at ChildProcess.cp.emit (D:\a\ezra-bible-app\ezra-bible-app\node_modules\cross-spawn\lib\enoent.js:34:29)
    at maybeClose (internal/child_process.js:1055:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
  cmd: 'D:\\a\\ezra-bible-app\\ezra-bible-app\\node_modules\\electron-installer-windows\\vendor\\squirrel\\Squirrel.com',
  args: [
    '--releasify',
    'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\electron-installer--2108-hAMqRxosYf05\\ezra_bible_app_1.3.0-Dev_undefined\\nuget\\ezra_bible_app.1.3.0-Dev.nupkg',
    '--releaseDir',
    'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\electron-installer--2108-hAMqRxosYf05\\ezra_bible_app_1.3.0-Dev_undefined\\squirrel',
    '--setupIcon',
    'D:\\a\\ezra-bible-app\\ezra-bible-app\\icons\\ezra.ico',
    '--loadingGif',
    'D:\\a\\ezra-bible-app\\ezra-bible-app\\node_modules\\electron-installer-windows\\resources\\animation.gif',
    '--no-msi'
  ],
  stdout: ''
@fcastilloec
Copy link
Collaborator

I'm sorry but I can't report this. I tried cloning your repo to test it but I had a lot of trouble just running npm install due to some dependencies. Anyway, I change our example app to have all the details from your package.json and win_installer_config.json and I was able to create a package without any issues. Here are the files with only the relevant info:

{
  "name": "ezra-bible-app",
  "productName": "Ezra Bible App",
  "version": "1.3.0-Dev",
  "scripts":{
    "package-win": "electron-packager . \"Ezra Bible App\" --overwrite --platform=win32 --arch=ia32 --prune=true --out=release --electron-version=13.2.3 --icon=resources/Icon.ico",
    "installer-win": "electron-installer-windows --src \"release/Ezra Bible App-win32-ia32\" --dest release/packages --config package_config/win_installer_config.json"
  }
}
{
  "options.productName": "Ezra Bible App",
  "options.exe": "Ezra Bible App.exe",
  "options.noMsi": true,
  "options.tags": [
    "Bible study",
    "Education",
    "Theology",
    "Bible"
  ],
  "options.icon": "resources/Icon.ico"
}

I used a Windows 10 machine, and run the commands on powershell and git bash, both without any issues.

@tobias-klein
Copy link
Author

Thank you for looking into this. This broke on GitHub Actions and it previously worked there. I tried to figure out what changed in the environment, but it's hard to say. They upgraded the .NET Core SDK recently right when my build broke.

actions/runner-images@65b91cc#diff-816219d3c9f30fcc1c40f88ca826c1662bf99eded781c1b419dd2dfb577ae227L492

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants