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

Client wont start on Linux 64bit Ubuntu 16.04 #274

Open
DroWnThePoor opened this Issue Jun 2, 2017 · 8 comments

Comments

Projects
None yet
5 participants
@DroWnThePoor

DroWnThePoor commented Jun 2, 2017

Just installed ghost-desktop-1.3.0-debian.deb on Elementary OS 0.4-Loki, which is based on ubuntu 16.04, and the app will not start, I'm getting this in the terminal:
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Unable to find a valid app
at Object. (/usr/lib/Ghost/resources/electron.asar/browser/init.js:121:9)
at Object. (/usr/lib/Ghost/resources/electron.asar/browser/init.js:173:3)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:424:7)
at startup (bootstrap_node.js:147:9)

Any help would be greatly appreciated, I'm seeing this in other Electron apps but I haven't found a fix/workaround.

@JPBlancoDB

This comment has been minimized.

Show comment
Hide comment
@JPBlancoDB

JPBlancoDB Jun 13, 2017

Have you tried running as administrator? sudo Ghost

JPBlancoDB commented Jun 13, 2017

Have you tried running as administrator? sudo Ghost

@DroWnThePoor

This comment has been minimized.

Show comment
Hide comment
@DroWnThePoor

DroWnThePoor Jun 18, 2017

@JPBlancoDB Your the man, didn't even occur to me.

DroWnThePoor commented Jun 18, 2017

@JPBlancoDB Your the man, didn't even occur to me.

@pasimako

This comment has been minimized.

Show comment
Hide comment
@pasimako

pasimako Jun 20, 2017

Please re-open this ticket. I have the same issue on Ubuntu 17.04 and running ghost-desktop with root privileges, even though it works, it's a terrible solution. Before version 1.3 I could run ghost-desktop as a normal user.

pasimako commented Jun 20, 2017

Please re-open this ticket. I have the same issue on Ubuntu 17.04 and running ghost-desktop with root privileges, even though it works, it's a terrible solution. Before version 1.3 I could run ghost-desktop as a normal user.

@DroWnThePoor DroWnThePoor reopened this Jun 25, 2017

@letsjustfixit

This comment has been minimized.

Show comment
Hide comment
@letsjustfixit

letsjustfixit Jun 25, 2017

sudo Ghost worked as a workaround however i dont see any reason why sudo privilige is required..

letsjustfixit commented Jun 25, 2017

sudo Ghost worked as a workaround however i dont see any reason why sudo privilige is required..

@letsjustfixit

This comment has been minimized.

Show comment
Hide comment
@letsjustfixit

letsjustfixit Jun 30, 2017

Finally I've had a little time and ran

strace Ghost

with the relevant result of

[..]
stat("/usr/lib/Ghost/resources/app/package.json", 0x7fffcb252df0) = -1 EACCES (Permission denied)
stat("/usr/lib/Ghost/resources/app/package.json.js", 0x7fffcb252d50) = -1 EACCES (Permission denied)
stat("/usr/lib/Ghost/resources/app/package.json.json", 0x7fffcb252d50) = -1 EACCES (Permission denied)
stat("/usr/lib/Ghost/resources/app/package.json.node", 0x7fffcb252d50) = -1 EACCES (Permission denied)
open("/usr/lib/Ghost/resources/app.asar", O_RDONLY) = 24
[..]

open("/usr/lib/Ghost/resources/default_app.asar", O_RDONLY) = -1 ENOENT (No such file or directory)
madvise(0x2e09bf783000, 36864, MADV_DONTNEED) = 0
open("/usr/lib/Ghost/resources/default_app.asar", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/Ghost/resources/default_app.asar", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/Ghost/resources/default_app.asar", O_RDONLY) = -1 ENOENT (No such file or directory)
[..]

So the final solution was granting permission to read and execute on the needed resources:

sudo chmod -R +rx /usr/lib/Ghost/resources/app

Now you can simply start the app with the Ghost command..

letsjustfixit commented Jun 30, 2017

Finally I've had a little time and ran

strace Ghost

with the relevant result of

[..]
stat("/usr/lib/Ghost/resources/app/package.json", 0x7fffcb252df0) = -1 EACCES (Permission denied)
stat("/usr/lib/Ghost/resources/app/package.json.js", 0x7fffcb252d50) = -1 EACCES (Permission denied)
stat("/usr/lib/Ghost/resources/app/package.json.json", 0x7fffcb252d50) = -1 EACCES (Permission denied)
stat("/usr/lib/Ghost/resources/app/package.json.node", 0x7fffcb252d50) = -1 EACCES (Permission denied)
open("/usr/lib/Ghost/resources/app.asar", O_RDONLY) = 24
[..]

open("/usr/lib/Ghost/resources/default_app.asar", O_RDONLY) = -1 ENOENT (No such file or directory)
madvise(0x2e09bf783000, 36864, MADV_DONTNEED) = 0
open("/usr/lib/Ghost/resources/default_app.asar", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/Ghost/resources/default_app.asar", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/Ghost/resources/default_app.asar", O_RDONLY) = -1 ENOENT (No such file or directory)
[..]

So the final solution was granting permission to read and execute on the needed resources:

sudo chmod -R +rx /usr/lib/Ghost/resources/app

Now you can simply start the app with the Ghost command..

@pasimako

This comment has been minimized.

Show comment
Hide comment
@pasimako

pasimako Jun 30, 2017

@letsjustfixit Thanks! It works now.

pasimako commented Jun 30, 2017

@letsjustfixit Thanks! It works now.

@jochenkirstaetter

This comment has been minimized.

Show comment
Hide comment
@jochenkirstaetter

jochenkirstaetter Aug 8, 2017

Still same issue on (X)Ubuntu 17.04 64bit.
Change of permission fixes the problem. Would be great to have this added to the post-install script.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 17.04
Release: 17.04
Codename: zesty
$ uname -a
Linux ioslt8 4.10.0-28-generic #32-Ubuntu SMP Fri Jun 30 05:32:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

jochenkirstaetter commented Aug 8, 2017

Still same issue on (X)Ubuntu 17.04 64bit.
Change of permission fixes the problem. Would be great to have this added to the post-install script.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 17.04
Release: 17.04
Codename: zesty
$ uname -a
Linux ioslt8 4.10.0-28-generic #32-Ubuntu SMP Fri Jun 30 05:32:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

@jochenkirstaetter

This comment has been minimized.

Show comment
Hide comment
@jochenkirstaetter

jochenkirstaetter Jan 5, 2018

Hi @felixrieseberg

This issue seems to be okay now given that the electron-installer-debian has been fixed.

Cheers, Jochen

jochenkirstaetter commented Jan 5, 2018

Hi @felixrieseberg

This issue seems to be okay now given that the electron-installer-debian has been fixed.

Cheers, Jochen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment