Atom window does not show up on Ubuntu 15.10


#1

Hi! To my greatest surprise Atom does not work anymore on my Linux box, though I remember it did work in the beginning of this week. When I try to start Atom from the command line it simply returns without any output and editor window does not show up. ps aux|grep atom tells me Atom is running, but I get no GUI.

This is what I have tried so far without any luck:

Problem: the command atom . in project folder didn’t work, nothing shows up

  1. killall atom and restart atom

  2. reinstall Atom from official deb:

    sudo apt-get remove --purge atom
    wget https://atom.io/download/deb
    sudo dpkg -i atom-amd64.deb
    ^^ this actually installed 1.2.1, I had 1.2.0 earlier

  3. move user folder then start Atom

    mv ~/.atom ~/.atom.bak
    atom .

  4. remove local config and start Atom

    rm -rf ~/.config/Atom
    atom .

  5. try safe mode atom --safe

I’ve also tried to install 1.3.0 beta, but it has the same thing, editor window does not show up. Because the last time I opened Atom this monday (or maybe tuesday?) it worked, perhaps an Ubuntu update could broke Atom?


Atom --version does not return
#2

I’ve got the same issue this morning on Debian 8.2 (Jessie), but removing the user and local config folders (steps #3 and #4) solved my problem. I’m using Atom 1.3.0beta4.


#3

hm, this is strange. Atom 1.2.2 opens a window only when it is run as root with sudo atom. But the window contains nothing but a single menu item labelled Atom and shows this error message in the console:

Error: EACCES: permission denied, open '/home/kiri/.atom/compile-                cache/less/df1b7fbc57dbeed23a8f1f8de95b4dfebcc06066/imports.json'
at Error (native)
at Object.fs.openSync (fs.js:549:18)
at Object.module.(anonymous function) [as openSync] (ATOM_SHELL_ASAR.js:137:20)
at Object.fs.writeFileSync (fs.js:1171:15)
at Object.fsPlus.writeFileSync (/usr/share/atom/resources/app.asar/node_modules/fs-plus/lib/fs-plus.js:279:17)
at LessCache.module.exports.LessCache.writeJson (/usr/share/atom/resources/app.asar/node_modules/less-cache/lib/less-cache.js:155:17)
at LessCache.module.exports.LessCache.setImportPaths (/usr/share/atom/resources/app.asar/node_modules/less-cache/lib/less-cache.js:113:12)
at new LessCache (/usr/share/atom/resources/app.asar/node_modules/less-cache/lib/less-cache.js:32:12)
at new LessCompileCache (/usr/share/atom/resources/app.asar/src/less-compile-cache.js:20:20)
at ThemeManager.module.exports.ThemeManager.loadLessStylesheet (/usr/share/atom/resources/app.asar/src/theme-manager.js:270:26)handleSetupError @ index.js:56

but running Atom as normal user still shows the symptoms described in my original post (I of course chown the .atom dir to my user).


#4

If you execute atom --foreground to launch Atom it should give you extra logging information. Hopefully that will give you better info.


#5

the access denied as root looks like this


#6

Except he’s getting the opposite problem. It works for him when run under sudo and fails when not.


#7

He has both problem.

One without sudo (no windows shows)

Atom 1.2.2 opens a window only when it is run as root

One with sudo (windows open with error in the console, error reported here match the screenshot in the issue)

[…] when it is run as root […] the window contains nothing but […] this error message

And the non sudo problem. where no windows is shown unless he has priviledge.

My guess is that the setup have strange permission. And atoms lack permission to launch properly.
Runnning sudo solve this first problem, at the cost of creating the familiar sudo problem. (Familiar because I’ve seen 2 reports of this on linux and one on max osx)

Solution would be to fix permission without sudo.


#8

Thank you! Using that option I got a clue why Atom hangs and does not show the GUI:

A JavaScript error occurred in the main process
Uncaught Exception:
Error: Failed to set path
    at Error (native)
    at Object.<anonymous> (/usr/share/atom/resources/atom.asar/browser/lib/init.js:115:7)
    at Object.<anonymous> (/usr/share/atom/resources/atom.asar/browser/lib/init.js:125:4)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:475:10)
    at startup (node.js:129:18)
    at node.js:981:3

This is the output I get when executing as normal user. I have Atom 1.2.2 installed at the moment.

UPDATE: line 115 in init.js referenced by the trace above is this:

app.setPath('userCache', path.join(app.getPath('cache'), app.getName()));

Does this tell you anything? I found this error message in electron’s source code, but I don’t get what’s going on here.


#9

I came to that idea as well. On my other machine (also runs Ubuntu) Atom works (1.2.0) and I already checked the permissions on ~/.atom folder. The only difference was on the working one I had ug+rw and on the other box I had only u+rw. Although changing the permissions to ug+rw didn’t help. On the machine Atom works I will replace 1.2.0 with 1.2.2 and see what happens.

UPDATE: On the other box with Ubuntu 14.04 Atom 1.2.2 works fine


#10

I don’t know if it matters, but I have node 4.2.2 installed on both machines


#11

I tried to use LightTable but it throws a very similar error message with some additional info:

[18110:1122/163426:ERROR:browser_main_loop.cc(185)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Failed to set path
    at Error (native)
    at Object.<anonymous> (/opt/lightable-0.8.0-alpha/resources/atom.asar/browser/lib/init.js:100:7)
    at Object.<anonymous> (/opt/lightable-0.8.0-alpha/resources/atom.asar/browser/lib/init.js:110:4)
    at Module._compile (module.js:430:26)
    at Object.Module._extensions..js (module.js:448:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:471:10)
    at startup (node.js:125:18)
    at node.js:964:3

So it seems to me this is a chromum problem on Linux… but then I wonder why Chromium browser works and chromium based apps do not?


#12

The thing is there’s quite a few Atom user on linux, so I suspect something have to do with your setup rather than linux in general.

but then I wonder why Chromium browser works and chromium based apps do not?

Both Atom and LigthTable use Election, basically a framework over chromium
to create application. That migth be the broken thing.


#13

Strange issue. I’m sure this doesn’t help much, but I’m running Ubuntu 15.10 GNOME and my setup works just fine with atom. Although, I should probably mention, I only really have some python packages with atom so far. I have yet to use it for anything other than python. It probably doesn’t help much, but that at least gives you the information that atom does indeed seem to work with at least one Ubuntu 15.10 setup. shrug


#14

It happened again after upgrading to beta5.

$ atom-beta -f
Cannot read property 'length' of undefined
TypeError: Cannot read property 'length' of undefined
    at AtomApplication.module.exports.AtomApplication.openWithOptions (/usr/share/atom-beta/resources/app.asar/src/browser/atom-application.js:130:29)
    at AtomApplication.module.exports.AtomApplication.loadState (/usr/share/atom-beta/resources/app.asar/src/browser/atom-application.js:749:16)
    at new AtomApplication (/usr/share/atom-beta/resources/app.asar/src/browser/atom-application.js:113:14)
    at createAtomApplication (/usr/share/atom-beta/resources/app.asar/src/browser/atom-application.js:60:16)
    at Function.module.exports.AtomApplication.open (/usr/share/atom-beta/resources/app.asar/src/browser/atom-application.js:63:9)
    at EventEmitter.<anonymous> (/usr/share/atom-beta/resources/app.asar/src/browser/main.js:55:23)
    at emitOne (events.js:82:20)
    at EventEmitter.emit (events.js:169:7)

Removing the user folder solved the problem.


#15

Finally I could make Atom work, but moving/removing the user and the local config folders didn’t help me (as I wrote in my original post), despite reinstalling Atom did recreate those folders with the proper permissions. Instead I had to reset permissions on my complete home folder: sudo chown -R user:user ~/
I wonder what other folder(s) do Atom need permission to to run properly.


#16

Had the same issue, fixed removing folder .atom in my profile directory:

sudo rm -Rf ~/.atom

The issue was simple: first time I ran atom was as root, so the .atom folder belonged to root, and my user couldn’t access it.


Opening Atom in terminal
#17

Ubuntu 16.04
atom -f
[22121:1115/082526:ERROR:browser_main_loop.cc(231)] Running without the SUID sandbox! See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the sandbox on.