-
Notifications
You must be signed in to change notification settings - Fork 15k
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
failed to create tray icon: error processing argument at index 0, conversion failure #21154
Comments
* TODO (switch back to upstream "node-spellchecker") atom/node-spellchecker#127 * TODO (blocker) electron/electron#20700 * TODO (blocker @electron v8) electron/electron#21154
Can confirm also happens on mac.
I'm on macOS, and this was working on 6 and 7 version lines. |
Ok, so as I expected macOS is also affected. |
It's an issue with underlying type marshalling between c++ and js - it's platform agnostic. I'll hopefully have a fix up soon. |
@codebytere I can confirm the issue got resolved with 8-beta4 release when running on Windows. On Linux, there is no error anymore but no tray icon created either. So the expected behavior has not been met.
|
@codebytere should I place a new issue or this one is fine for tracking the absence of tray icon when running @electron@^8 on Linux? |
fixed #21241 |
@sofianguy, I wrote above that I tested 8-beta4 release with #21241 fix included and the issue has not been completely handled:
So I'm placing a new issue, #21445. @momakes can you confirm the issue is completely fixed for you when running macOS? |
@momakes, the fix has been already verified on macOS by @codebytere as noted here #21445 (comment) so I'm withdrawing my question to you. |
win10 1909 我使用electron-packager打包后运行exe就会产生这个错误,但如果直接运行elecrtron main.js就正常了,这是为什么? |
win10 1909 I run the exe after packaging with electron-packager will produce this error, but if you run elecrtron main.js directly, it is normal, why is this? |
I'm getting this error message when using a path to an icon on OS X Catalina with Electron 8.0.2 and 8.1.1, both with pdf and icns. Using a png works, but there are other issues instead: if I use a 16x16px icon, its resolution is poor (due to retina display). Supplying another 32x32 icon suffixed with @2.png makes it too large - i.e. not adapting to retina. |
Please re-open this issue. This is still occurring in Electron v8.2.3 on MacOSX, this is the latest version installed by Electron Forge. |
@dsteinman I can't reproduce this with v8.2.3 on macOS 10.14. I tried @vladimiry's repository linked in the issue, https://github.com/vladimiry-playground/electron-quick-start-tray-issue, and it seems to work fine with no error messages. |
The thing is that, in my experience, the |
Agreed, it's not a great error message. |
I just tried this as well, and it DOES work so it's probably a configuration error on my end. I suppose the problem could be simply the file is not found. I'm using electron forge / webpack which mucks with the paths of the files. |
Okay, I figured it out. This will be useful for any Electron Forge users. My tray path is coded as:
The actual image is located in I had to modify contents of
|
Preflight Checklist
Issue Details
Expected Behavior
Tray icon with the specified image created.
Actual Behavior
Unhandled
error processing argument at index 0, conversion failure error
error is occurring. No tray icon created.To Reproduce
https://github.com/vladimiry-playground/electron-quick-start-tray-issue
Screenshots
Tray icon with the specified image created if used v7.1.1 and below:
Additional Information
If used 8.0.0-beta2 there is no error if I construct the tray using the native image module like
new Tray(nativeImage.createFromPath("image path"))
but there is no visible tray icon either, but works for v7.1.1 and below.The text was updated successfully, but these errors were encountered: