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

crashes in MacOS #1016

Closed
PhotoNomad0 opened this issue Aug 12, 2020 · 38 comments
Closed

crashes in MacOS #1016

PhotoNomad0 opened this issue Aug 12, 2020 · 38 comments

Comments

@PhotoNomad0
Copy link

PhotoNomad0 commented Aug 12, 2020

Describe the bug
A few of our MacOS Catalina users that are running the Zulip desktop are seeing frequent crashes in the app. But only the MacOS users. After a while the window just has the toolbar with the rest of the window just grey (screenshot below). When I click on the reload icon, the desktop app closes.

To Reproduce
Just open the app and leave it running. Notifications are turned on.

Expected behavior
That the app not crash and work as before.

Screenshots
Screen Shot 2020-08-12 at 9 48 29 AM

Desktop (please complete the following information):

  • Operating System:
    macOS 10.15.5 and 10.15.6
  • Zulip Desktop Version:
    5.4.0

Additional context
Seems to happen more frequently when usage on unfoldingword.zulipchat.com is heaviest.

@manavmehta
Copy link
Collaborator

For the record: Upstream issue - electron/24920

@Thomas-lhuillier
Copy link

Not sure it's very helpful but here is the console error raised when this bug occurs.

Screenshot 2020-09-15 at 11 52 00

@timabbott
Copy link
Sponsor Member

@Thomas-lhuillier thanks, that's likely quite helpful.

Can you confirm you're seeing this with the latest 5.4.3 release?

@timabbott
Copy link
Sponsor Member

(I believe this was likely fixed in 5.4.2).

@Thomas-lhuillier
Copy link

Thomas-lhuillier commented Sep 16, 2020

Unfortunately I experience this bug on both v5.4.2 and v5.4.3.

One thing I noted: it seems to happen when receiving private messages.

@PhotoNomad0
Copy link
Author

I am also still seeing in v5.4.3. Forgot that this was an electron app. I do see the same error message in the screenshot above.

@sipshowpeers
Copy link

I am also still seeing this in 5.4.3, MacOS 10.15.6.
I can consistently reproduce this when I am private messaged by one particular person in our organization.
This is on a self-hosted Zulip server.
I would like to help but I don't know what information I can provide (and whether it's safe to share publicly!)

@timabbott
Copy link
Sponsor Member

If you can capture the exception from the developer tools (available in the app's menus), that'd be very helpful.

@sipshowpeers
Copy link

sipshowpeers commented Sep 18, 2020

I hope this is helpful! Please let me know if there's further information I can share.

This is immediately after receiving a private message causing my screen to go gray (or grey):

electron/js2c/renderer_init.js:142 Uncaught TypeError: Cannot read property 'forEach' of undefined
    at dispatchEvent (electron/js2c/renderer_init.js:142)
    at EventEmitter.<anonymous> (electron/js2c/renderer_init.js:142)
    at EventEmitter.emit (events.js:223)
    at Object.onMessage (electron/js2c/renderer_init.js:114)
dispatchEvent @ electron/js2c/renderer_init.js:142
(anonymous) @ electron/js2c/renderer_init.js:142
emit @ events.js:223
onMessage @ electron/js2c/renderer_init.js:114

It appears to be the same that @Thomas-lhuillier showed. Is there more info I can share?

zulip

@timabbott
Copy link
Sponsor Member

@manavmehta @akashnimare can you try to investigate this exception?

@timabbott
Copy link
Sponsor Member

I'm guessing this is a notifications library issue is some sort, and we should probably start with doing a build with Electron 10 to see if it's resolved upstream like the previous iteration was.

@leather-s
Copy link

Any action on this? I too have been experiencing this for the last month. I dont even use the desktop app anymore because it crashes so frequently.

@PhotoNomad0
Copy link
Author

The best solution we have found is for Mac users to install the older v5.2.0 of desktop app and turn off auto updates.

@kannan4k
Copy link

I've faced the same problem with v5.2.0 & v5.3.0.
Here is the error message

image

@MaxXxaM
Copy link

MaxXxaM commented Nov 13, 2020

The same issue with v5.4.3 after update MacOS Big Sur. It happens at different times, usually after the application has been minimized.
Снимок экрана 2020-11-13 в 15 36 18
Снимок экрана 2020-11-13 в 15 36 56

@tourvi
Copy link

tourvi commented Nov 13, 2020

Same here. Just upgraded to Big Sur, and just started getting this problem. v5.4.3. Usually happens when receiving a private message.

@manavmehta
Copy link
Collaborator

@akashnimare Sorry for being AFK for too long. I don't think it is a macOS bug now. As Big Sur is a big change, they must have tested the reported bugs, which again, 'might' have included the cause of this. Nor does the error pointed out by @sipshowpeers seem to be 'directly' coming from our codebase but some electron-ish library/API we use.

@manavmehta
Copy link
Collaborator

manavmehta commented Nov 13, 2020

Update: I am one of the people who saw this bug very very rarely.
Just witnessed this on Big Sur - Prod always. Never Dev.
Grey

@manavmehta
Copy link
Collaborator

manavmehta commented Nov 13, 2020

I believe this error is originating from here - WebView.
One solution I can think of is completing #1018

There have been recent discussions on upstream thread.

@hankhero
Copy link

We have several users in our organisation that experience this problem ONLY after updatating to MacOs Big Sur.

@frammling
Copy link

frammling commented Nov 17, 2020

We have several users in our organisation that experience this problem ONLY after updatating to MacOs Big Sur.

Same issue after updating to MacOs Big Sur. Zulip version 5.4.3
Снимок экрана 2020-11-17 в 14 58 14

@andersk
Copy link
Member

andersk commented Nov 18, 2020

Can someone figure out, either via a debugger or by patching console.log statements into Electron, what eventKey is when this WEB_VIEW_EVENTS[eventKey].forEach expression is undefined?

I have a wild guess… This would explain why that TypeError would be triggered by the render process crashing, but not why the render process crashes in the first place.

@l4ty4k
Copy link

l4ty4k commented Nov 19, 2020

Same here. I only started experiencing this bug after updating to Big Sur.

@andersk
Copy link
Member

andersk commented Nov 20, 2020

We’ve received a trace from a user that seemingly matches this to CharlieHess/node-mac-notifier#33.

@parallelo3301
Copy link

Adding another one. Like @timabbott & @andersk noticed, this may definitely be a problem with the notifications. The app crashes for my colleagues when I send them a PM.

This line may be a lead:
Granted permissions request for notifications from null

I also tried to navigate them to Settings -> Notifications -> Send test notification and the app crashed then.

obrazek

@luckow
Copy link

luckow commented Nov 27, 2020

I get the same issue with grey-screen-of-death multiple times a day - but only after upgrading to OSX Big Sur. v5.4.3 of the Desktop app.

Seems to be happing randomly - sometimes multiple times within a minute. Sometimes when I write a message, sometimes it just happens when the app has been out-of-focus for some time. Other times hours go by without problems.

When I press the refresh button it works again for a while - until the next "crash". Really annoying and makes the desktop app almost unusable for mig.

I'm cheering for you, hoping you'll figure it out soon! ;-)

@GervaisdeM
Copy link
Contributor

I just thought I would chime in and say that this is happening to me also. I thought it might have been an issue with my under powered self hosted Zulip server, but then I found this thread. I have only two active users on my server. My logs are likely very lean. If there is something that you would like tested and have logs sent your way, let me know. I'm also on chat.zulip.org if that helps.

I have rolled back to 5.2.0 of the client for now. It seems to be stable.

@Gambitboy
Copy link

Gambitboy commented Dec 1, 2020

My entire team and I have been getting this crash on v5.4.3 and a few before, way before the Big Sur OSX update. Only happens on the macOS app, the browser version is fine. Crashes on every notification popup.

andersk added a commit to andersk/zulip-desktop that referenced this issue Dec 2, 2020
node-mac-notifier no longer builds on macOS with Electron 11 (error:
no template named 'remove_cv_t' in namespace 'std').  It was
previously implicated in crashes on macOS (zulip#1016).  And we no longer
have any macOS developers that seem to be maintaining this
feature (e.g. zulip#1022 is stalled).

Signed-off-by: Anders Kaseorg <[email protected]>
andersk added a commit to andersk/zulip-desktop that referenced this issue Dec 2, 2020
node-mac-notifier no longer builds on macOS with Electron 11 (error:
no template named 'remove_cv_t' in namespace 'std').  It was
previously implicated in crashes on macOS (zulip#1016).  And we no longer
have any macOS developers that seem to be maintaining this
feature (e.g. zulip#1022 is stalled).

Signed-off-by: Anders Kaseorg <[email protected]>
@andersk
Copy link
Member

andersk commented Dec 2, 2020

We believe this has been resolved by removing node-mac-notifier (#1046) in 5.5.0, just released. Can anyone confirm?

@rhusar
Copy link

rhusar commented Dec 2, 2020

@andersk I can confirm after couple of hours of using master branch that I no longer get the 'gray screen of death'. Thanks for the fix!

@tourvi
Copy link

tourvi commented Dec 2, 2020

Works for me, too, using v5.5.0

@andersk
Copy link
Member

andersk commented Dec 2, 2020

Great, thanks all. Closing as fixed. If anyone does see this again with v5.5.0, please let us know.

@andersk andersk closed this as completed Dec 2, 2020
@lukasztuszynski
Copy link

Works for me as well (so far ;) )

@Gambitboy
Copy link

Can also confirm it works. Thanks guys.

@luckow
Copy link

luckow commented Dec 4, 2020

Same for me. Has been working flawlessly since the upgrade to 5.5.0. 🚀 Much appreciated 🙏

@rhusar
Copy link

rhusar commented Dec 4, 2020

Just for the record, hopefully the grey screen wasn't just replaced by white screen I found in Zulip this morning after nightly suspend and morning resume. This time however it was solvable by #+R, so a different issue.

image

@andersk
Copy link
Member

andersk commented Dec 4, 2020

@rhusar Yeah, that’s almost certainly different. If it happens to you again, file a new issue and include any errors you might find in Tools → Toggle DevTools for Zulip App → Console and/or Tools → Toggle DevTools for Active Tab → Console.

@kannan4k
Copy link

kannan4k commented Dec 8, 2020

Worked for me! Thank you folks 🎉

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

No branches or pull requests