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

No output #153

Open
adjenks opened this issue Feb 19, 2020 · 8 comments
Open

No output #153

adjenks opened this issue Feb 19, 2020 · 8 comments

Comments

@adjenks
Copy link

adjenks commented Feb 19, 2020

When I run the example echo "console.log('Hey from ' + location); window.close()" | browser-run
I get no output, but also no error message. How can I debug this?

@adjenks
Copy link
Author

adjenks commented Feb 19, 2020

Running another test:

test.js:

var run = require('browser-run');
var browser = run();
browser.pipe(process.stdout);
browser.end('console.log(location); window.close()');
process.stdout.write('hi');// Check to see if console output is working

bash:
$ node test/test.js

hi

It should also output the location but does not. No errors are reported.

@adjenks
Copy link
Author

adjenks commented Feb 19, 2020

I tried to run electron on my console but it said I was missing a library. Perhaps browser-run fails to detect when electron fails to run.

error while loading shared libraries: libffmpeg.so

@ashnur
Copy link

ashnur commented Feb 20, 2020

Have you installed browser-run globally?

@adjenks
Copy link
Author

adjenks commented Feb 21, 2020

@ashnur I just ran it using a global installation, same results. Before it was not --global.

@ashnur
Copy link

ashnur commented Feb 21, 2020

Weird.
echo "console.log('Hey from ' + location); window.close()" | browser-run WFM on linux

maybe try with a different browser or try the development version (cloning this repo and try running the tests locally).

Also, if you share more information about the context, I am sure more people will likely to chime in with suggestions.

@adjenks
Copy link
Author

adjenks commented Feb 21, 2020

The thing is, I understand that electron will not run. So that's probably the hangup. I would like to know however why it doesn't output any error message. How can I get more debug info from browser-run?

@juliangruber
Copy link
Owner

This method does the actual spawning:

https://github.com/juliangruber/electron-stream/blob/0e25d5571b9dfaf4e828ab372c6cdad9b3b5f7f1/index.js#L79-L97

I guess we could read from stderr here to detect failures like this? Or we could make it so it throws an error if no "message" was received before the "exit", which is a more general solution.

@sfriesel
Copy link

I'm having the same issue, using browser-run indirectly through tape-run. Electron fails to start (in my case due to libgconf-2.so.4: cannot open shared object file: No such file or directory) when I'm executing it directly, but browser-run provides no output.

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

No branches or pull requests

4 participants