Skip to content

V4 macOS fixes

Eric Eastwood requested to merge v4-macos-fixes into master

V4 macOS fixes

Remove temp file avatars to simplify icons and stop timeout on macOS

Avatars worked previously because we fell back to opts.icon anyway but we were seeing Trouble getting avatar for notificationETIMEDOUTError: ETIMEDOUT in the devtools console.

The new native notifications support a direct URL so we can get away with all of the temp file complexity and the error 🎉

Add notification when uncaughtException instead of exiting

When you start up the app, an unhandledException was being thrown and exiting the app right away because of this hook. It was extremely unclear because NW.js on macOS spits out a big nasty error that is completely unrelated to the actual error when you process.exit(1)

Example nasty error that is unrelated to the actual uncaught exception/error.

node[12286]: ../../third_party/node-nw/src/inspector_agent.cc:597:node::inspector::InspectorSessionDelegate *node::inspector::Agent::delegate(): Assertion `(client_) != (nullptr)' failed.
 1: node::Abort() [/Users/eric/Documents/gitlab/gitter-desktop/node_modules/nw/nwjs/nwjs.app/Contents/Versions/66.0.3359.139/nwjs Framework.framework/libnode.dylib]
 2: node::Assert(char const* const (*) [4]) [/Users/eric/Documents/gitlab/gitter-desktop/node_modules/nw/nwjs/nwjs.app/Contents/Versions/66.0.3359.139/nwjs Framework.framework/libnode.dylib]
 3: node::inspector::Agent::PauseOnNextJavascriptStatement(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) [/Users/eric/Documents/gitlab/gitter-desktop/node_modules/nw/nwjs/nwjs.app/Contents/Versions/66.0.3359.139/nwjs Framework.framework/libnode.dylib]
 4: node::WaitForInspectorDisconnect(node::Environment*) [/Users/eric/Documents/gitlab/gitter-desktop/node_modules/nw/nwjs/nwjs.app/Contents/Versions/66.0.3359.139/nwjs Framework.framework/libnode.dylib]
 5: node::Exit(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/eric/Documents/gitlab/gitter-desktop/node_modules/nw/nwjs/nwjs.app/Contents/Versions/66.0.3359.139/nwjs Framework.framework/libnode.dylib]
 6: v8::internal::VirtualMemory::TakeControl(v8::internal::VirtualMemory*) [/Users/eric/Documents/gitlab/gitter-desktop/node_modules/nw/nwjs/nwjs.app/Contents/Versions/66.0.3359.139/nwjs Framework.framework/Versions/A/nwjs Framework]
 7: v8::internal::operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, v8::internal::BasicBlockProfiler const&) [/Users/eric/Documents/gitlab/gitter-desktop/node_modules/nw/nwjs/nwjs.app/Contents/Versions/66.0.3359.139/nwjs Framework.framework/Versions/A/nwjs Framework]
 8: v8::internal::operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, v8::internal::BasicBlockProfiler const&) [/Users/eric/Documents/gitlab/gitter-desktop/node_modules/nw/nwjs/nwjs.app/Contents/Versions/66.0.3359.139/nwjs Framework.framework/Versions/A/nwjs Framework]
 9: 0x3c4cd8427d
Received signal 6
 [0x000114e994fc]
 [0x000114e993f1]
 [0x7fffdaa7ab3a]
 [0x000000000003]
 [0x7fffda8ff420]
 [0x000110d1f3db]
 [0x000110d1e0c9]
 [0x000110da68ec]f
 [0x000110d29389]
 [0x000110d230f6]
 [0x0001140fda64]
 [0x00011418dd4c]
 [0x00011418d45c]
 [0x003c4cd8427d]
[end of stack trace]

The app could carry-on working even when an uncaughtException occurs so I don't think we should exit the app anyway.

Example of the new notification,

Exception on startup on macOS

Moved to a separate issue, https://gitlab.com/gitlab-org/gitter/desktop/issues/244

Edited by 🤖 GitLab Bot 🤖

Merge request reports