rcedit.exe failed with exit code 1. Fatal error: Unable to set icon
See original GitHub issueElectron packager doesn’t accept my icon file even though it is in the right dimensions and format. Icon.zip
PS C:\Users\abornst\Documents\ovt> electron-packager . CNTKVideoTagger --platform=win32 --icon=Icon.ico --arch=x64
Packaging app for platform win32 x64 using electron v1.6.2
rcedit.exe failed with exit code 1. Fatal error: Unable to set icon
PS C:\Users\abornst\Documents\ovt> electron-packager . CNTKVideoTagger --platform=win32 --icon=.Icon.ico --arch=x64
Packaging app for platform win32 x64 using electron v1.6.2
Wrote new app to C:\Users\user\Documents\ovt\CNTKVideoTagger-win32-x64
Issue Analytics
- State:
- Created 7 years ago
- Comments:25 (13 by maintainers)
Top Results From Across the Web
How I Fixed: Electron builder rcedit-x64.exe": file does not ...
This is likely a very specific issue to my setup, but on the off chance ... I kept hitting the following error, causing...
Read more >When I use electron-builder to package an NSIS program ...
When I use electron-builder to package an NSIS program, I get: Fatal error: Unable to parse version string for FileVersion.
Read more >Issue while creating .exe file using electron builder
default Electron icon is used reason=application icon is not set ? cannot execute cause=exit status 1 errorOut=Fatal error: Unable to commit ...
Read more >rcedit设置exe文件的icon图标和信息
Fatal error : Unable to set icon ... go语言从windows的exe中获取icon图标 ... electron打包Error: rcedit.exe failed with exit code 1.
Read more >It is impossible to add an icon to a standalone .exe file.
Error : Could not load game data at path '.'. Is the .pck file missing? Yes, "Embed Pck" is enabled in the export...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is how I resolved the issue.
I had an macOS icon file named
icons.icns
and a Windows icon file namedicon.ico
. This was my packagerConfig:No matter what I specified in my
electronWinstallerConfig
I was still getting this error, even if I removed theicon
key from it. I finally tracked down the issue by finding my globally installedelectron-forge
and adding aconsole.log
to thercedit.js
file. It turns out thatrcedit
was taking the the path fromelectronPackagerConfig
and ignoring theelectronWinstallerConfig
, then just renaming the extension to.ico
. Sorcedit
couldn’t find./src/assets/images/icons.ico
because it didn’t exist.Long story short: rename your icon files to have the same base name and in the same folder. In my case I now have these:
src/assets/images/icons.icns
src/assets/images/icons.ico
And everything works.
FWIW, I was seeing this same error when I tried building without an .ico file in the same directory as the .png specified in the config.