beaker icon indicating copy to clipboard operation
beaker copied to clipboard

macOS : "A JavaScript error occurred in the main process" when starting

Open jarlarntzen opened this issue 8 years ago • 8 comments

Operation System: macOS 10.13.2 (17C88) High Sierrra Beaker Version: 0.7.10

When attempting to start the Beaker Browser, I get an error dialog:

A JavaScript error occurred in the main process

Uncaught Exception: TypeError: Cannot set property 'domain' of null at EventEmitter.init (events.js:62:15) at EventEmitter (events.js:27:21) at Object. (/Applications/Beaker Browser.app/Contents/Resources/electron.asar/browser/api/screen.js:6:14) at Object. (/Applications/Beaker Browser.app/Contents/Resources/electron.asar/browser/api/screen.js:10:3) at Module._compile (module.js:569:30) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:503:32) at tryModuleLoad (module.js:466:12) at Function.Module._load (module.js:458:3) at Module.require (module.js:513:17) at require (internal/module.js:11:18) at Object.get [as screen] (/Applications/Beaker Browser.app/Contents/Resources/electron.asar/browser/api/exports/electron.js:11:16) at getScreenAPI (/Applications/Beaker Browser.app/Contents/Resources/app.asar/background-process.build.js:1667:29) at defaultState (/Applications/Beaker Browser.app/Contents/Resources/app.asar/background-process.build.js:1572:18) at restoreState (/Applications/Beaker Browser.app/Contents/Resources/app.asar/background-process.build.js:1563:28) at createShellWindow (/Applications/Beaker Browser.app/Contents/Resources/app.asar/background-process.build.js:1471:60) at ensureOneWindowExists (/Applications/Beaker Browser.app/Contents/Resources/app.asar/background-process.build.js:1525:5) at App.electron.app.on (/Applications/Beaker Browser.app/Contents/Resources/app.asar/background-process.build.js:5809:35) at emitTwo (events.js:125:13) at App.emit (events.js:213:7)

jarlarntzen avatar Jan 08 '18 09:01 jarlarntzen

This is an upstream bug in electron. We'll try to get it fixed soon. Thanks for filing.

pfrazee avatar Jan 08 '18 15:01 pfrazee

It shouldnt happen every time you run Beaker. If it happens and Beaker is unusable, try restarting. LMK if this makes beaker consistently unusable.

pfrazee avatar Jan 08 '18 15:01 pfrazee

https://github.com/electron/electron/issues/11635

pfrazee avatar Jan 14 '18 16:01 pfrazee

Turns out this was happening when the macOS 'activate' event fired. The screen API is only available after 'ready' and so what's probably happening is, 'activate' is getting fired before 'ready'. I'm adding guards in Beaker. We'll see if that solves it.

pfrazee avatar Jan 17 '18 23:01 pfrazee

Fixed in 0.8. Closing optimistically. Reopen if still happens in 0.8.

pfrazee avatar Jan 17 '18 23:01 pfrazee

I am still facing the error in the macOS. is this fixed? Any work arounds on this currently?

reach2jeyan avatar Jan 23 '19 06:01 reach2jeyan

@reach2jeyan What version of Beaker?

pfrazee avatar Jan 23 '19 19:01 pfrazee

@pfrazee Sorry, I was actually gonna want to discuss this issue in the electron repo.

reach2jeyan avatar Jan 24 '19 03:01 reach2jeyan