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

Windows build error w/ Solution #191

Open
1 task
sonicviz opened this issue Mar 23, 2024 · 0 comments
Open
1 task

Windows build error w/ Solution #191

sonicviz opened this issue Mar 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sonicviz
Copy link

sonicviz commented Mar 23, 2024

Description

Tried building a new Electron deployment on windows with npm run build
but it failed with
⨯ cannot execute cause=exit status 1
errorOut=Reserved header is not 0 or image type is not icon for 'E:\Source Control\Quasar\2024\OverVue\src-electron\icons\icon.ico'
Fatal error: Unable to set icon

Reproduction

Clone repo to win 11
Run npm i
Run npm run build
Cue error above

System information

System:
OS: Windows 11 10.0.22631
CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
Memory: 17.84 GB / 31.91 GB
Binaries:
Node: 18.17.1 - d:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - D:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 9.8.1 - E:\Source Control\Quasar\2024\OverVue\node_modules.bin\npm.CMD
pnpm: 8.13.1 - d:\Program Files\nodejs\pnpm.CMD
Browsers:
Chrome: 123.0.6312.58
Edge: Chromium (122.0.2365.92)
Internet Explorer: 11.0.22621.1

Additional information

Solution:

It seems src-electron\icons\icon.ico is in the wrong format for windows.
Use https://redketchup.io/icon-converter to convert src-electron\icons\icon.png to a new icon.ico file and rerun npm run build to build the Electron build successfully.

App • SUCCESS • electron-builder built the app

Solution found via electron-userland/electron-builder#3889

Great prototyping tool, ty!

ps: Icons/png's in wrong format seem innocuous but can be deadly, like a virus. A few years back, after weeks of debugging and problem analysis, I finally figured out why my Mac OS would mysteriously CTD/Reboot. It was all due to a png icon file being generated by a Unity build process on windows that looked ok but would cause Mac OSX to randomly CTD.

👨‍👧‍👦 Contributing

  • 🙋‍♂️ Yes, I'd love to make a PR to fix this bug!
@sonicviz sonicviz added the bug Something isn't working label Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant