Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

"A JavaScript error occurred in the main process" - Opening a file before the app is opened. #2041

Closed
LkeMitchll opened this issue Apr 5, 2018 · 2 comments

Comments

@LkeMitchll
Copy link

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:

  1. Assign a file extension to "Always open with..." e.g. .js
  2. 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).
  3. 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)
@oni-bot
Copy link

oni-bot bot commented Apr 5, 2018

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.

@rmagatti
Copy link

Just complementing with some screenshots.

When selecting Oni to open the file on MacOS (as stated by @LkeMitchll)
screen shot 2018-06-13 at 14 33 18

This error pops up
screen shot 2018-06-13 at 14 28 23
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.

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

No branches or pull requests

2 participants