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
tray.popUpContextMenu blocks javascript main thread on mac #13820
Expected Behavior
When the tray icon menu is popped up manually (but on a tray click event callback), I expect the menu to open up but not necessarily block the main process.
Actual behavior
It blocks the main process until the menu is closed. This is creating issues with other timers etc that I have running on the main process.
@ckerr@codebytere If I need to find a freelancer to fix this bug, what skills should they have? Should I require them to be skilled in Objective-C++ or Objective-C? I don't have a Windows PC. Does this bug exist in Windows? If so, what skills should they have for windows? Is it C#?
Activity
pjebs commentedon Jul 26, 2018
An async version would be great
pjebs commentedon Jul 26, 2018
I think it's related to #1854 but my issue has nothing to do with render process.
pjebs commentedon Jul 26, 2018
@kevinsawicki would this be hard to implement for tray?: #8702
pjebs commentedon Jul 27, 2018
@sofianguy For #1854, @zcbenz labelled it a "bug" and removed "enhancement". This issue should also be labelled a "bug".
zhenchaoli commentedon Aug 8, 2018
Hmm, I tried to reproduce the issue with both 2.0.6 and 3.0.0-beta2 but could not. Here's what I did:
tray.js
I uploaded a screen recording of what I did here: https://youtu.be/_tzUf631dQE
As you can see, timers in main process, console as well as video playbacks are not blocked.
@pjebs can you provide some more details about how this can be reproduced?
pjebs commentedon Aug 9, 2018
Try
popUpContextMenuon atray click event callbackckerr commentedon Aug 9, 2018
if one of y'all could make a fork of https://github.com/electron/electron-quick-start that repros this, that would be great. I like @fantasticsid's approach of using a simple timer to display whether or not something's blocked!
pjebs commentedon Aug 10, 2018
console.log('b')is not printed out until after menu is closed.1 remaining item
zhenchaoli commentedon Aug 10, 2018
@pjebs I'm seeing the same behavior :) my knowledge about runloop is lacking but I'll take a further look
pjebs commentedon Aug 16, 2018
@ckerr @codebytere If I need to find a freelancer to fix this bug, what skills should they have? Should I require them to be skilled in
Objective-C++orObjective-C? I don't have a Windows PC. Does this bug exist in Windows? If so, what skills should they have for windows? Is itC#?pjebs commentedon May 24, 2019
Has this been fixed for Electron 5?
codebytere commentedon Jun 19, 2019
@pjebs no, but i've just jumped up a PR for it so i'll plan to backport it to all supported release lines :)
pjebs commentedon Jun 20, 2019
@codebytere Can you take a look at #14036 this again.
I don't believe it's been fixed. In fact, you can use the official electron sampler to see the application crash: https://github.com/electron/electron-api-demos/blob/2a8c1f46b582b2762c2cf0afc7559082726255b5/main-process/native-ui/tray/tray.js#L23
pjebs commentedon Jun 25, 2019
@miniak The vaguely related issue of #14036 is not fixed.