-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
[Bug]: Tray icon on Linux has chome id for all Electron applications (AppIndicator/StatusNotifierItem) #40936
Comments
Hello @pdf. Thanks for reporting this and helping to make Electron better! Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use. Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests. Now adding the
blocked/need-repro
|
@codebytere I'm not an Electron developer, so I'm not sure off-hand how to write an Electron application that registers a system tray - I observed this behaviour of Electron apps when implementing an SNI host. If it helps, here's the DBUS dialog when any Electron application registers a tray icon to the SNI host, and is queried for its SNI
But the multiple times this has been fixed in previous implmementations of SNI as mentioned in the original issue should serve as illustration enough of the issue, no? |
Any updates on the issue ? |
Facing this issue on a Budgie Desktop with the AppIndicator Applet. Starting multiple electron based apps results in picking the same icon for all of them from the first started application: |
Unfortunately, without a way to reproduce this issue, we're unable to continue investigation. This issue has been closed and will not be monitored further. If you're able to provide a minimal test case that reproduces this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue. |
@jkleinsc I understand this project is likely overwhelmed by issues, but if you could please read the previous comments and maybe provide some kind of response before re-adding the need-repro that would be great. |
Not sure why you need a reproduction for that, but here you go: const { app, Menu, Tray, nativeImage } = require('electron')
const path = require('node:path')
let appIcon = null
app.on('ready', function(){
appIcon = new Tray(nativeImage.createFromPath(path.join(__dirname, '1.png')))
}); Also, attached are 2 projects with different tray icons: You can run both on Ubuntu Budgie 23.10 to reproduce the issue mentioned in my previous comment. You'll see the icon from the first started application is used for both tray icons. Could you please take issues like these more serious instead of let us talking to a bot and ignoring/not reading the issue at all? |
This is just a hardcoded constant in Chrome, we should patch that and maybe even upstream that that id comes from |
👀 |
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! |
Not stale |
👀 |
1 similar comment
👀 |
Preflight Checklist
Electron Version
28.0.0
What operating system are you using?
Other Linux
Operating System Version
Arch Linux
What arch are you using?
x64
Last Known Working Electron version
22.x
Expected Behavior
For various desktop environments to function correctly, every registered AppIndicator must have a unique, stable ID attached to the StatusNotifierItem. Prior to the migration to StatusIconLinuxDbus implementation in #36333 the application name was used as the ID prefix.
Actual Behavior
All Electron applications use the same indicator ID value of
chrome_status_icon_1
, which breaks the functionality of desktop environments for managing tray icons like sorting, hiding, etc.Testcase Gist URL
No response
Additional Information
See some examples of previous times this was fixed:
#5969
#15536 (comment)
The text was updated successfully, but these errors were encountered: