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

Exception was thrown when two boostnote is launched #3241

Closed
moba1 opened this issue Sep 5, 2019 · 3 comments · Fixed by #3243
Closed

Exception was thrown when two boostnote is launched #3241

moba1 opened this issue Sep 5, 2019 · 3 comments · Fixed by #3243
Labels
bug 🐛 Issue concerns a bug.

Comments

@moba1
Copy link

moba1 commented Sep 5, 2019

Current behavior

I tried to launch Boostnote as another process with Boostnote already running, then the following exception was thrown:

(electron) 'app.makeSingleInstance(cb)' is deprecated. Use 'app.requestSingleInstanceLock() and app.on('second-instance', cb)' instead.
internal/modules/cjs/loader.js:604
    throw err;
    ^

Error: Cannot find module '../dialog'
    at Module._resolveFilename (internal/modules/cjs/loader.js:602:15)
    at Function.Module._resolveFilename (/usr/share/boostnote/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.Module._load (internal/modules/cjs/loader.js:528:25)
    at Module.require (internal/modules/cjs/loader.js:658:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.get [as dialog] (/usr/share/boostnote/resources/electron.asar/browser/api/exports/electron.js:11:16)
    at process.<anonymous> (/usr/share/boostnote/resources/electron.asar/browser/init.js:54:31)
    at process.emit (events.js:182:13)
    at process._fatalException (internal/bootstrap/node.js:451:27)

Expected behavior

If Boostnote is started when Boostnote is already running, above exception should not be thrown.

Steps to reproduce

  1. launch Boostnote
  2. launch Boostnote as another process

Environment

  • Version : 0.12.1
  • OS Version and name : Arch Linux
@ZeroX-DG ZeroX-DG added the needs investigation 🔬 Issue requires further investigation to locate or narrow down the problem. label Sep 5, 2019
@jhdcruz
Copy link
Contributor

jhdcruz commented Sep 5, 2019

I know a fix for this, I'll try working on this when I have the free time to do so.

@arcturus140
Copy link
Contributor

Both applications of Boostnote are using the same system directory for configurations. using two instances could lead to unpredictable behaviour. what happens if one application changes settings? or stores settings on exit? or two instances of different versions are used?

they must work in standalone for this use case. I don't know if this has been implemented yet.

@jhdcruz
Copy link
Contributor

jhdcruz commented Sep 9, 2019

@arcturus140 That's why Single Instance was implemented. However, the electron npm package was upgraded to the point the original code for it was deprecated, and so was updated in my PR #3243. (which should work fine... probably)

Although you are correct if he wants multiple instances running.

Rokt33r pushed a commit that referenced this issue Oct 10, 2019
Fixes single instance depreciation
@Flexo013 Flexo013 added bug 🐛 Issue concerns a bug. and removed needs investigation 🔬 Issue requires further investigation to locate or narrow down the problem. labels Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Issue concerns a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants