electron-userland / electron-installer-windows

Create a Windows package for your Electron app.
MIT License
469 stars 49 forks source link

System.AggregateException: One or more errors occurred. () ---> System.Exception #334

Closed cjahv closed 3 years ago

cjahv commented 3 years ago

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

❯ yarn why electron-installer-windows
yarn why v1.22.10
[1/4] 🤔  Why do we have the module "electron-installer-windows"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "electron-installer-windows@3.0.0"
info Has been hoisted to "electron-installer-windows"
info This module exists because it's specified in "devDependencies".
info Disk size without dependencies: "17.66MB"
info Disk size with unique dependencies: "23.7MB"
info Disk size with transitive dependencies: "26.17MB"
info Number of shared dependencies: 49
✨  Done in 0.31s.

What version of node and npm are you using?

❯ node -v
v14.16.0
❯ npm -v
6.14.11
❯ yarn -v
1.22.10

What operating system are you using?

OS: macOS 11.2.3 20D91 arm64
Host: Macmini9,1
Kernel: 20.3.0
Uptime: 27 mins
Packages: 1 (brew)
Shell: zsh 5.8
Resolution: 1920x1080
DE: Aqua
WM: Quartz Compositor
WM Theme: Blue (Light)
Terminal: iTerm2
Terminal Font: MesloLGS-NF-Regular 12
CPU: Apple M1
GPU: Apple M1
Memory: 1166MiB / 8192MiB

Can you compile the example app successfully?

no

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
❯ DEBUG='electron-installer-windows' npm run build

> example-electron-app@0.0.1 build /Users/jahv/Downloads/electron-installer-windows-master/example
> npm run clean && npm run bundle:ia32 && npm run bundle:x64 && npm run exe:ia32 && npm run exe:x64

> example-electron-app@0.0.1 clean /Users/jahv/Downloads/electron-installer-windows-master/example
> rimraf dist

> example-electron-app@0.0.1 bundle:ia32 /Users/jahv/Downloads/electron-installer-windows-master/example
> electron-packager . --platform win32 --arch ia32 --out dist/ --icon resources/Icon.ico

Packaging app for platform win32 ia32 using electron v11.4.1
spawn Unknown system error -86
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! example-electron-app@0.0.1 bundle:ia32: `electron-packager . --platform win32 --arch ia32 --out dist/ --icon resources/Icon.ico`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the example-electron-app@0.0.1 bundle:ia32 script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/jahv/.npm/_logs/2021-03-29T08_10_30_283Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! example-electron-app@0.0.1 build: `npm run clean && npm run bundle:ia32 && npm run bundle:x64 && npm run exe:ia32 && npm run exe:x64`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the example-electron-app@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/jahv/.npm/_logs/2021-03-29T08_10_30_312Z-debug.log

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

in my project

mono /Users/x/Documents/Projects/oak/ole/node_modules/electron-installer-windows/vendor/squirrel/Squirrel-Mono.exe --releasify /var/folders/1w/_dm0b7h1097539nv1xv2nx5h0000gn/T/electron-installer--1841-ubOA2r7zQznM/ole8_3.9.8_undefined/nuget/ole8.3.9.8.nupkg --releaseDir /var/folders/1w/_dm0b7h1097539nv1xv2nx5h0000gn/T/electron-installer--1841-ubOA2r7zQznM/ole8_3.9.8_undefined/squirrel --setupIcon /Users/x/Documents/Projects/oak/ole/build/build.ico --loadingGif /Users/x/Documents/Projects/oak/ole/build/install.gif

System.AggregateException: One or more errors occurred. () ---> System.Exception
  at Squirrel.Utility.CreateZipFromDirectory (System.String zipFilePath, System.String inFolder) [0x00119] in <a5ee691170b94c488950c75951ce1ba3>:0 
   --- End of inner exception stack trace ---
  at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in <1dad182cea284fae91f3e7d5611ddac4>:0 
  at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00043] in <1dad182cea284fae91f3e7d5611ddac4>:0 
  at System.Threading.Tasks.Task.Wait () [0x00000] in <1dad182cea284fae91f3e7d5611ddac4>:0 
  at Squirrel.ReleasePackage.CreateReleasePackage (System.String outputFile, System.String packagesRootDir, System.Func`2[T,TResult] releaseNotesProcessor, System.Action`1[T] contentsPostProcessHook) [0x001f7] in <a5ee691170b94c488950c75951ce1ba3>:0 
  at Squirrel.Update.Program.Releasify (System.String package, System.String targetDir, System.String packagesDir, System.String bootstrapperExe, System.String backgroundGif, System.String signingOpts, System.String baseUrl, System.String setupIcon, System.Boolean generateMsi, System.String frameworkVersion, System.Boolean generateDeltas) [0x00214] in <a5ee691170b94c488950c75951ce1ba3>:0 
  at Squirrel.Update.Program.executeCommandLine (System.String[] args) [0x004a2] in <a5ee691170b94c488950c75951ce1ba3>:0 
  at Squirrel.Update.Program.main (System.String[] args) [0x00082] in <a5ee691170b94c488950c75951ce1ba3>:0 
  at Squirrel.Update.Program.Main (System.String[] args) [0x00006] in <a5ee691170b94c488950c75951ce1ba3>:0 
---> (Inner Exception #0) System.Exception
  at Squirrel.Utility.CreateZipFromDirectory (System.String zipFilePath, System.String inFolder) [0x00119] in <a5ee691170b94c488950c75951ce1ba3>:0

What did you expect to happen?

What actually happened?

support apple chips

cjahv commented 3 years ago

feels like an upstream problem https://github.com/Squirrel/Squirrel.Windows/issues/1711

fcastilloec commented 3 years ago

@cjahv indeed, it's very likely that the problem happens because of the arm64 chip. As always, it's better to build your package in the same OS and architecture that you're aiming for. I know that this is not always possible, but there are a lot of free CIs out there that would allow you to do this. I have no access to an apple computer with their newer chips, and I don't think I'll ever have access to one. Unless this gets fixed upstream, there's nothing I can do about it.