"A JavaScript error occurred in the main process" - Opening a file before the app is opened.
I get the following message:
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot create BrowserWindow before app is ready
at createWindow (/Applications/Oni.app/Contents/Resources/app/lib/main/src/main.js:124:25)
at App.electron_1.app.on (/Applications/Oni.app/Contents/Resources/app/lib/main/src/main.js:189:9)
at emitTwo (events.js:125:13)
at App.emit (events.js:213:7)
Steps to reproduce:
- Assign a file extension to "Always open with..." e.g.
.js - Double click a file set to be opened by Oni by default (I'm using .js in this example but seems to apply to any file).
- Error above displays.
Details:
- System: macOS 10.13.3, MacBook Pro Mid 2015
- Oni: v0.3.2
- Neovim: v0.2.2 (installed via home-brew)
Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.
Just complementing with some screenshots.
When selecting Oni to open the file on MacOS (as stated by @LkeMitchll)

This error pops up
After this, Oni does start, but without the file open in the buffer.
It only does show when any Oni related process is completely closed (after CMD + q for example).
The error does not pop up when Oni is already running in the background(?) In this case, it opens the file normally as was the expected behaviour.