You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Electron not working when running in terminal on Ubuntu Linux #12850
Operating System (Platform and Version): Lubuntu/Ubuntu 17.10
Last known working Electron version: 1.8.x
Expected Behavior
Electron should open and be functional when run from the terminal
Actual behavior
Electron either doesn't open, opens to a black screen, or freezes shortly after opening. The command doesn't exit, it just hangs there.
Additional Information
If you run npm start > /dev/null, npm start 2> /dev/null, or npm start &> /dev/null, the issue cannot be reproduced. This makes me suspect that there's some bug with streaming to a terminal emulator (perhaps the terminal emulator gives backpressure that electron can't handle?)
Reacted by Klooven, Peter Daniš, Joe Esposito, Lionel Laské, Jacob Page, Costa Michailidis, Joey Perry, Franciszek S Wawrzak, sam detweiler, Makoto and 1 more
$ ELECTRON_ENABLE_LOGGING=true npm start
> [email protected] start /home/ryan/electron-quick-start
> electron .
[37955:0507/202008.523303:WARNING:browser_main_loop.cc(275)] <unknown>: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
[37955:0507/202010.278786:ERROR:browser_gpu_channel_host_factory.cc(103)] Failed to launch GPU process.
@alice-em, saying "app X crashes" is essentially inviting the Electron team to triage arbitrary codebases that they are unfamliar with, so I encourage reporters to follow @RyanZim's example of having a small standalone 'hello world' style app that can be tested with.
In any case, the env->async_hooks_init_function().IsEmpty() assertion appears to be a duplicate of #10905. The discussion there implies that it's an issue with the natives module rather than an Electron issue.
Electron worked on a second attempt with an entirely new project. It must've been something in the api that changed just before 1.8.4 for me to case my particular issue on my first project.
I'm also having this problem after upgrading from Ubuntu 16.04 to 18.04. Running ELECTRON_ENABLE_LOGGING=true npm start does not give me any messages related to this.
Using Electron 2.0.0.
Ps. My app is based on the electron-next skeleton (probably doesn't have anything to do with this)
Can be also reproduced by running the default Electron "app" (see picture below), by running yarn electron - this works for 20-30s on my two VMs and than it stops responding.
Debian Jessie, Dell XPS 15 9560 with a GTX 1050 using bumblebee seems to having the same problem. Interestingly, I tried both 3.0.8 where the window opens but nothing of the HTML is displayed, and 2.0.2 where everything worked fine. The fix npm start > /dev/null seems to work, but this does not feel like a permanent fix.
Thank you for taking the time to report this issue and helping to make Electron better.
The version of Electron you reported this on has been superseded by newer releases.
If you're still experiencing this issue in Electron v4.2.x or later, please add a comment specifying the version you're testing with and any other new information that a maintainer trying to reproduce the issue should know.
I'm setting the blocked/need-info label for the above reasons. This issue will be closed 7 days from now if there is no response.
We haven't gotten a response to our questions in our comment above. With only the information that is currently in the issue, we don't have enough information to take action. I'm going to close this but don't hesitate to reach out if you have or find the answers we need, we'll be happy to reopen the issue.
Activity
ckerr commentedon May 7, 2018
I'm not seeing this when running either
2.0.0ormasterin Ubuntu 18.04.Could you try the same experiment on a clean system to see if it's reproducible for you there too?
RyanZim commentedon May 8, 2018
BTW, here is the logging output I get:
Spinning up a fresh VM to test further.
alice-em commentedon May 8, 2018
I'm also getting this issue on
ubuntu 18.04withelectron [1.8.4, 1.8.6, 2.0.0].This is the log it produces with
npm start/electron index.jsckerr commentedon May 8, 2018
@alice-em, saying "app X crashes" is essentially inviting the Electron team to triage arbitrary codebases that they are unfamliar with, so I encourage reporters to follow @RyanZim's example of having a small standalone 'hello world' style app that can be tested with.
In any case, the
env->async_hooks_init_function().IsEmpty()assertion appears to be a duplicate of #10905. The discussion there implies that it's an issue with thenativesmodule rather than an Electron issue.alice-em commentedon May 8, 2018
Electron worked on a second attempt with an entirely new project. It must've been something in the api that changed just before
1.8.4for me to case my particular issue on my first project.RyanZim commentedon May 8, 2018
@ckerr I spun up a fresh VM of Lubuntu 17.10 and got the same result as #12850 (comment) with electron v2.0.0
Klooven commentedon May 15, 2018
I'm also having this problem after upgrading from Ubuntu 16.04 to 18.04. Running
ELECTRON_ENABLE_LOGGING=true npm startdoes not give me any messages related to this.Using Electron 2.0.0.
Ps. My app is based on the electron-next skeleton (probably doesn't have anything to do with this)
peterdanis commentedon Jun 18, 2018
I can also reproduce the issue with Electron 2.0.2 on Fedora 27 and Ubuntu 18.04.
My application (https://github.com/peterdanis/wrapbox) works when I build it (as AppImage) and run it from file manager, but hangs after a very short time (1-2s) when started from command line.
Can be also reproduced by running the default Electron "app" (see picture below), by running
yarn electron- this works for 20-30s on my two VMs and than it stops responding.By default Electron app I mean:

I do not have
electroninstalled globally.Klooven commentedon Jul 24, 2018
I found this (temporary) solution: #13624 (comment) (use
--disable-gpu). It worked for me.wamoyo commentedon Oct 24, 2018
I'm still having the same issue. I want to use electron, but even the sample app opens up with a blank screen:
I'm on Ubuntu 14.04 which is quite old at this point. I'll try again at 18.04. Getting a new machine in November.
The interesting bit is that slack works just fine on my setup, and I'm almost certain they're running on electron.
1 remaining item
SudoHenk commentedon Nov 10, 2018
Debian Jessie, Dell XPS 15 9560 with a GTX 1050 using bumblebee seems to having the same problem. Interestingly, I tried both 3.0.8 where the window opens but nothing of the HTML is displayed, and 2.0.2 where everything worked fine. The fix npm start > /dev/null seems to work, but this does not feel like a permanent fix.
CharlesBunders commentedon Nov 13, 2018
Debian 9.6 Stretch with Node 10.13.0 and Electron 3.0.6 same issue.
maurimura commentedon Nov 13, 2018
Same here.
Debian 9.6 Node v11.1.0 Electron 3.0.9
Works fine using
--disable-gpuas @Klooven mentioned.JPustkuchen commentedon Nov 30, 2018
I can also confirm this on Ubuntu 18.04 as VMWare Workspace virtual instance.
As a workaround
both works for me.
kuun commentedon Dec 5, 2018
I had the same issue when I set display mode as 'Join Displays'.
fmiceli24 commentedon Dec 10, 2018
Same here. --disable-gpu workaround.
Ubuntu 14.04, Gnome. Electron version 3.0.0
sdetweil commentedon Jan 29, 2019
i still see the same bug, electron 2.0.0 or 2.0.16 on Ubuntu 18.04, npm start 2>/dev/null bypass works
maurimura commentedon Jan 30, 2019
Works now in electron v3.1.1. thanks!
sdetweil commentedon Jan 30, 2019
does not work with --disable-gpu for me (2.0.0 or 2.0.16)
npm --enable-transparent-visuals --disable-gpu start $1 &
sofianguy commentedon Aug 9, 2019
Thank you for taking the time to report this issue and helping to make Electron better.
The version of Electron you reported this on has been superseded by newer releases.
If you're still experiencing this issue in Electron v4.2.x or later, please add a comment specifying the version you're testing with and any other new information that a maintainer trying to reproduce the issue should know.
I'm setting the
blocked/need-infolabel for the above reasons. This issue will be closed 7 days from now if there is no response.Thanks in advance! Your help is appreciated.
sofianguy commentedon Aug 19, 2019
Thank you for your issue!
We haven't gotten a response to our questions in our comment above. With only the information that is currently in the issue, we don't have enough information to take action. I'm going to close this but don't hesitate to reach out if you have or find the answers we need, we'll be happy to reopen the issue.