You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: tray icon will eventually disappear when packed in asar archive #30911
After the %temp% folder on Windows got cleared (let's suppose some internal housekeeping), the tray icon remains unchanged.
Actual Behavior
After clearing %temp%, the tray looses its image. A transparent placeholder remains and other tray actions (e.g. opening a context menu) still work.
Testcase Gist URL
No response
Additional Information
This is only the case when loading the icon from an asar archive. The reason is that ReadICOFromPath will extract the icon to a temp file using the Archive::CopyFileOut method.
While this is useful in the usual case (temporary extracted files should be deleted at one point), it's not viable for tray icons as the image will disappear when the file gets removed - at least on Windows.
Possible solutions:
add note to Tray docs (or nativeImage) to exclude tray images when using asar archives (e.g. via --unpack-dir)
or: for the explicit case of tray icons, extract these images to a "persistent" path - however, cleanup needs to be provided in some way
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.
Activity
github-actions commentedon Oct 5, 2022
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
github-actions commentedon Nov 6, 2022
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.
Zen33 commentedon May 5, 2023
same issue for now
Nantris commentedon Nov 22, 2024
This no longer appears to be an issue. Every time the app is started the
.icois written to a new temporary path now.