Skip to content
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

Emit an error when the electron process crashes or prints to stderr #43

Closed
wants to merge 3 commits into from

Conversation

paulkernfeld
Copy link

Add a unit test
Allow the user to specify a path to the electron executable

@mappum
Copy link
Owner

mappum commented Jul 15, 2016

Thanks, this will make the module a lot less frustrating to get working on new machines!

I looked into doing something similar at one point, but I found that there was sometimes stderr output from Electron that shouldn't trigger errors (warnings about the graphics, etc.). Are these warnings gone now? (We did upgrade to Electron v1, maybe it doesn't have warnings).

Also, I think there is an issue with the tests now, it seems to fail on Travis.

@paulkernfeld paulkernfeld force-pushed the master branch 2 times, most recently from cb4805f to e355600 Compare July 17, 2016 20:14
@paulkernfeld
Copy link
Author

Good point. I don't personally get those warnings, but that's important. I redid this so that it only throws the error if the exit code is nonzero.

Add a unit test
Allow the user to specify a path to the electron executable
@paulkernfeld
Copy link
Author

All right, looks like the tests are still failing. I think that the latest version of this PR may actually have revealed an existing problem, rather than causing a new problem.

Have you ever seen something like this? According to StackOverflow, it seems like xvfb needs to be run differently on Travis.

Error: Child process stderr output Xlib:  extension "RANDR" missing on display ":100". ,Xlib:  extension "RANDR" missing on display ":100".

Use a fork of headless that supports sending arbitrary arguments
@paulkernfeld
Copy link
Author

Hmmm... not sure how to get this working. Have you ever seen this RANDR thing before?

@@ -79,7 +79,8 @@ class Daemon extends EventEmitter {
if (headless == null) {
return cb(new Error('Could not load "headless" module'))
}
headless((err, child, display) => {
var opts = {args: ['+extension', 'RANDR']}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This thread shows that we should be doing -extension to remove the RANDR extension: http://stackoverflow.com/questions/17944234/xlib-extension-randr-missing-on-display-21-trying-to-run-headless-googl

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried that as well, but I got the same error.

@mappum
Copy link
Owner

mappum commented Aug 7, 2016

Maybe we can safely ignore the RANDR error? Is it just a warning or is it actually preventing electron from running?

@mappum
Copy link
Owner

mappum commented Aug 28, 2016

These changes were merged. 👍

@mappum mappum closed this Aug 28, 2016
@paulkernfeld
Copy link
Author

Sorry I disappeared, and thanks for merging and fixing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants