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

'Unable to set icon' #56

Closed
robi-wan opened this issue Sep 14, 2017 · 4 comments · Fixed by #58
Closed

'Unable to set icon' #56

robi-wan opened this issue Sep 14, 2017 · 4 comments · Fixed by #58
Labels

Comments

@robi-wan
Copy link
Contributor

Using the current rcedit artifact leads to the above mentioned error: 'Unable to set icon'.

The error was introduced in commit af37f5f.
(I verified this with artifacts from https://ci.appveyor.com/project/electron-bot/rcedit/build/1.0.23/job/bc57s50clgkbab7x/artifacts and https://ci.appveyor.com/project/electron-bot/rcedit/build/1.0.22/job/brndccen9f9ovdc2/artifacts. The artifact from the previous commit - d65120c - worked.)

The changes to the function SetIcon may have caused this.

Here is the test output from https://github.com/electron/node-rcedit with the artifact from https://ci.appveyor.com/project/electron-bot/rcedit/build/1.0.23/job/bc57s50clgkbab7x/artifacts:

>npm run test

> rcedit@0.9.0 test c:\development\work\rcedit\node-rcedit
> mocha test/*.js && npm run lint



  rcedit(exePath, options, callback)
    1) updates the information in the executable
    √ supports non-ASCII characters in the .exe path (703ms)
    2) supports a product version of 1
    3) supports a product version of 1.0
    √ supports setting requestedExecutionLevel to requireAdministrator (3250ms)
    √ supports replacing the manifest with a specified manifest file (3125ms)
    √ reports an error when the .exe path does not exist
    √ reports an error when the icon path does not exist
    √ reports an error when the file version is invalid (47ms)
    √ reports an error when the product version is invalid


  7 passing (26s)
  3 failing

  1) rcedit(exePath, options, callback) updates the information in the executable:
     Error: rcedit.exe failed with exit code 1. Fatal error: Unable to set icon
      at ChildProcess.<anonymous> (lib\rcedit.js:68:16)
      at maybeClose (internal/child_process.js:862:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)

  2) rcedit(exePath, options, callback) supports a product version of 1:
     Uncaught TypeError: Cannot read property 'trim' of undefined
      at node_modules\rcinfo\lib\index.js:32:27
      at Array.forEach (native)
      at node_modules\rcinfo\lib\index.js:27:15
      at ChildProcess.exithandler (child_process.js:207:5)
      at maybeClose (internal/child_process.js:862:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)

  3) rcedit(exePath, options, callback) supports a product version of 1.0:
     Uncaught TypeError: Cannot read property 'trim' of undefined
      at node_modules\rcinfo\lib\index.js:32:27
      at Array.forEach (native)
      at node_modules\rcinfo\lib\index.js:27:15
      at ChildProcess.exithandler (child_process.js:207:5)
      at maybeClose (internal/child_process.js:862:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)




npm ERR! Windows_NT 5.2.3790
npm ERR! argv "C:\\development\\tools\\nodejs\\node.exe" "C:\\development\\tools\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run
" "test"
npm ERR! node v4.8.4
npm ERR! npm  v2.15.11
npm ERR! code ELIFECYCLE
npm ERR! rcedit@0.9.0 test: `mocha test/*.js && npm run lint`
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the rcedit@0.9.0 test script 'mocha test/*.js && npm run lint'.
npm ERR! This is most likely a problem with the rcedit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     mocha test/*.js && npm run lint
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs rcedit
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls rcedit
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     c:\development\work\rcedit\node-rcedit\npm-debug.log

This output is from running the node-rcedit tests with a current artifact:

>npm run test

> rcedit@0.9.0 test c:\development\work\rcedit\node-rcedit
> mocha test/*.js && npm run lint



  rcedit(exePath, options, callback)
    1) updates the information in the executable
    √ supports non-ASCII characters in the .exe path (454ms)
    √ supports a product version of 1 (578ms)
    √ supports a product version of 1.0 (532ms)
    √ supports setting requestedExecutionLevel to requireAdministrator (2969ms)
    √ supports replacing the manifest with a specified manifest file (3016ms)
    √ reports an error when the .exe path does not exist
    √ reports an error when the icon path does not exist
    √ reports an error when the file version is invalid
    √ reports an error when the product version is invalid (62ms)


  9 passing (25s)
  1 failing

  1) rcedit(exePath, options, callback) updates the information in the executable:
     Error: rcedit.exe failed with exit code 1. Fatal error: Unable to set icon
      at ChildProcess.<anonymous> (lib\rcedit.js:68:16)
      at maybeClose (internal/child_process.js:862:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)




npm ERR! Windows_NT 5.2.3790
npm ERR! argv "C:\\development\\tools\\nodejs\\node.exe" "C:\\development\\tools\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run
" "test"
npm ERR! node v4.8.4
npm ERR! npm  v2.15.11
npm ERR! code ELIFECYCLE
npm ERR! rcedit@0.9.0 test: `mocha test/*.js && npm run lint`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the rcedit@0.9.0 test script 'mocha test/*.js && npm run lint'.
npm ERR! This is most likely a problem with the rcedit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     mocha test/*.js && npm run lint
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs rcedit
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls rcedit
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     c:\development\work\rcedit\node-rcedit\npm-debug.log
@zcbenz
Copy link
Contributor

zcbenz commented Sep 15, 2017

Thanks for finding out the troubling commit, I must have broken something when refactoring, I'll look into it.

@MCMicS
Copy link

MCMicS commented Dec 8, 2017

still got same error:
electron-packager .--overwrite --platform=win32 --arch=x64 --icon=electronApp\icon --prune=true --out=release-builds
Packaging app for platform win32 x64 using electron v1.7.9
rcedit.exe failed with exit code 1. Fatal error: Unable to set icon

@malept
Copy link
Member

malept commented Dec 8, 2017

I don't think node-rcedit has been updated with this fix. There's a slight problem if you do that, anyway (see #66).

@Rensdn
Copy link

Rensdn commented Jun 15, 2018

rcedit.exe failed with exit code 1. Reserved header is not 0 or image type is not icon for 'p'

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

Successfully merging a pull request may close this issue.

5 participants