kessler/nw-ninja

Error running the app on Linux

techfort opened this issue · 9 comments

Hey! Congrats for the project, very interesting.
I'm running the app for the first time and got this:

d3athmast3r@chaosfort:~/dev/js/nw-ninja/nwapp$ gulp run
[14:34:18] Working directory changed to ~/dev/js/nw-ninja
[14:34:19] Using gulpfile ~/dev/js/nw-ninja/gulpfile.js
[14:34:19] Starting 'run'...
[14:34:19] Using v0.11.5
[14:34:19] Create cache folder in /home/d3athmast3r/dev/js/nw-ninja/cache/0.11.5
[14:34:19] Using cache for: win32
[14:34:19] Create cache folder in /home/d3athmast3r/dev/js/nw-ninja/cache/0.11.5
[14:34:19] Using cache for: win64
[14:34:19] Create cache folder in /home/d3athmast3r/dev/js/nw-ninja/cache/0.11.5
[14:34:19] Using cache for: osx32
[14:34:19] Create cache folder in /home/d3athmast3r/dev/js/nw-ninja/cache/0.11.5
[14:34:19] Using cache for: osx64
[14:34:19] 'run' errored after 60 ms
[14:34:19] Error: true
    at formatError (/usr/lib/node_modules/gulp/bin/gulp.js:161:10)
    at Gulp.<anonymous> (/usr/lib/node_modules/gulp/bin/gulp.js:187:15)
    at Gulp.emit (events.js:95:17)
    at Gulp.Orchestrator._emitTaskDone (/home/d3athmast3r/dev/js/nw-ninja/node_modules/gulp/node_modules/orchestrator/index.js:264:8)
    at /home/d3athmast3r/dev/js/nw-ninja/node_modules/gulp/node_modules/orchestrator/index.js:275:23
    at finish (/home/d3athmast3r/dev/js/nw-ninja/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
    at cb (/home/d3athmast3r/dev/js/nw-ninja/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
    at NwBuilder.<anonymous> (/home/d3athmast3r/dev/js/nw-ninja/node_modules/node-webkit-builder/lib/index.js:139:17)
    at tryCatch1 (/home/d3athmast3r/dev/js/nw-ninja/node_modules/node-webkit-builder/node_modules/bluebird/js/main/util.js:63:19)
    at Promise$_callHandler [as _callHandler] (/home/d3athmast3r/dev/js/nw-ninja/node_modules/node-webkit-builder/node_modules/bluebird/js/main/promise.js:695:13)

I'm running on linux 64-bit.
I added 'linux' in the list of OSs in ninjaConfig.js, and got:

[15:11:22] Using cache for: linux32
[15:11:22] Create cache folder in /home/d3athmast3r/dev/js/nw-ninja/cache/0.11.5
[15:11:22] Using cache for: linux64
[15:11:22] Launching App
[15:11:22] App exited with code 127
[15:11:22] Finished 'run' after 80 ms

I haven't test this at all on linux, but I'll arrange for a test machine in the following days. Just off the top of my head, what happens if you remove win and osx from the build config?

I renamed the issue so to specify the problem is only on Linux.
I removed osx and win from the list of platforms to no avail unfortunately, the app still exits with code 127.
If I run the template app with a local installation of nw (mine is pretty old, 0.10.2) all goes well. I'd say the problem is with the downloaded copy of node-webkit, at least on linux.

I did some research, can you try gulp run --disable-gpu? or even run the binary directly from the dist folder with this argument?

Found the culprit. Running the app on linux complains about the lack of libudev.so.0 . There's an article in the NW.js wiki: https://github.com/nwjs/nw.js/wiki/The-solution-of-lacking-libudev.so.0
So at least it's not nw-ninja's problem, but maybe you can put a note in a wiki or output a message from gulp when running the app on linux.

Definitely.

Probably should also implement this detection in node-webkit-builder so it will auto generate the wrapper suggested as a stopgap.

I will try and do it but it will take me a few weeks until I have some more free time...

/cc @adam-lynch

Ok thanks a lot. Two people from Cork (Ireland) in one thread, how funnily odd :)

Added a short wiki page for now: https://github.com/kessler/nw-ninja/wiki/Problems-with-some-linux-distros---versions

Will implement a warning soon and hopefully a PR to node-webkit-builder down the road

I'm leaving this issue open for now

Thanks a lot, i don't mind if you want to close the issue, the problem is really upstream.

better if its left open for now.