Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 621798 - app-editors/atom apm test fails due to missing electron modules
Summary: app-editors/atom apm test fails due to missing electron modules
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Cynede
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-14 23:20 UTC by Samantha McVey
Modified: 2019-08-04 08:54 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samantha McVey 2017-06-14 23:20:07 UTC
Expected output:
In a folder with tests, running the tests. In a folder without tests, saying it can't find any tests. It doesn't matter if you try running `apm test` in a folder with or without tests. Both trigger this bug.

Background:
apm test is meant to be run in the folder of an atom package to run the tests of this package. I am a developer of an atom package and use this command to test before release and during development.

Additionally:
This error also shows on a friend of mine's gentoo system as well, so it does not seem to only by an isolated issue.

Actual Output:

[3559:0614/161614: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.
[3562:0614/161614:ERROR:resource_bundle.cc(754)] Failed to load /usr/lib64/electron-1.3/blink_image_resources_200_percent.pak
Some features may not be available.
[3562:0614/161614:ERROR:resource_bundle.cc(754)] Failed to load /usr/lib64/electron-1.3/content_resources_200_percent.pak
Some features may not be available.
[3562:0614/161614:ERROR:resource_bundle.cc(754)] Failed to load /usr/lib64/electron-1.3/ui_resources_200_percent.pak
Some features may not be available.
[3562:0614/161614:ERROR:resource_bundle.cc(754)] Failed to load /usr/lib64/electron-1.3/views_resources_200_percent.pak
Some features may not be available.
module.js:457
    throw err;
    ^

Error: Cannot find module '/usr/lib64/electron-1.3/resources/electron.asar/browser/init.js'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.runMain (module.js:590:10)
    at run (bootstrap_node.js:404:7)
    at startup (bootstrap_node.js:159:9)
    at bootstrap_node.js:523:3
Tests failed
Comment 1 Michele Alzetta 2017-07-09 08:12:00 UTC
This seems to be the same bug which has come up recently and made atom totally unusable for me.

Installing some packages fails (for example, term3) and in the error message I can see a reference to electron.

Installing other packages (for example, ide-haskell and other haskell related ones) succeeds, but when trying to open a haskell source file atom crashes.

This is atom 1.18.0, with the previous version everything worked. Will try masking 1.18.0 and going back to the old version.
Comment 2 Michele Alzetta 2017-07-09 10:33:01 UTC
Going back to atom 1.16 didn't solve my problem.

Here is the message I get if I try to install term3. 
The log file mentioned at the end simply does not exist.

Installing “term3@0.22.1” failed.
> ptyw.js@0.4.1 install /tmp/apm-install-dir-11769-31646-ju9cfr.hjopr5dn29/node_modules/term3/node_modules/ptyw.js
> node-gyp rebuild

/tmp/apm-install-dir-11769-31646-ju9cfr.hjopr5dn29
└── (empty)

npm WARN deprecated react-tools@0.11.2: react-tools is deprecated. For more information, visit https://fb.me/react-tools-deprecated
npm WARN deprecated graceful-fs@2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
gyp ERR! configure error 
gyp ERR! stack Error: Python executable "/usr/lib64/atom/app/apm/bin/python-interceptor.sh" is v3.6.1, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack     at failPythonVersion (/usr/lib64/atom/app/apm/node_modules/node-gyp/lib/configure.js:454:14)
gyp ERR! stack     at /usr/lib64/atom/app/apm/node_modules/node-gyp/lib/configure.js:443:9
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:209:7)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at maybeClose (internal/child_process.js:877:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
gyp ERR! System Linux 4.12.0-gentoo
gyp ERR! command "/usr/lib64/electron-1.3/node" "/usr/lib64/atom/app/apm/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /tmp/apm-install-dir-11769-31646-ju9cfr.hjopr5dn29/node_modules/term3/node_modules/ptyw.js
gyp ERR! node -v v6.5.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open '/tmp/apm-install-dir-11769-31646-ju9cfr.hjopr5dn29/package.json'
npm WARN apm-install-dir-11769-31646-ju9cfr.hjopr5dn29 No description
npm WARN apm-install-dir-11769-31646-ju9cfr.hjopr5dn29 No repository field.
npm WARN apm-install-dir-11769-31646-ju9cfr.hjopr5dn29 No README data
npm WARN apm-install-dir-11769-31646-ju9cfr.hjopr5dn29 No license field.
npm ERR! Linux 4.12.0-gentoo
npm ERR! argv "/usr/lib64/electron-1.3/node" "/usr/lib64/atom/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/mike/.atom/.apm/.apmrc" "--userconfig" "/home/mike/.atom/.apmrc" "install" "/tmp/d-11769-31646-9m9b7f.hh0fg06bt9/package.tgz" "--runtime=electron" "--target=1.3.13" "--arch=x64" "--global-style"
npm ERR! node v6.5.0
npm ERR! npm  v3.10.5
npm ERR! code ELIFECYCLE

npm ERR! ptyw.js@0.4.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ptyw.js@0.4.1 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ptyw.js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ptyw.js
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ptyw.js
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /tmp/apm-install-dir-11769-31646-ju9cfr.hjopr5dn29/npm-debug.log
npm ERR! code 1
Comment 3 Elvis Pranskevichus 2017-07-09 16:20:32 UTC
It appears that your system Python is set to Python 3, and that particular gyp codepath does has not been patched to use python2 explicitly. This has nothing to do with Electron.

Until this is fixed, please eselect python to Python 2.7.
Comment 4 Pavel Volkov 2017-09-17 11:39:39 UTC
Atom seems to no longer be in tree...
(and ebuilds in 'atom' overlay also seem to have problems during install — downloaded file sizes mismatch).
Comment 5 Elvis Pranskevichus 2017-10-02 20:56:20 UTC
Atom is in(In reply to Pavel Volkov from comment #4)
> Atom seems to no longer be in tree...
> (and ebuilds in 'atom' overlay also seem to have problems during install —
> downloaded file sizes mismatch).

app-editors/atom _is_ in the tree.  The overlay did have some Manifest issues due to a bad merge, but those were resolved quickly.

I just posted https://github.com/gentoo/gentoo/pull/5838, which should fix the Python version issue ("apm install term3" works for me now, at least).

As for the original issue with "apm test", that seems to be due to issues with asar support initialization, I'm checking that out now.