Skip to content
This repository has been archived by the owner on Sep 7, 2018. It is now read-only.

buster-server fails on headless mode on Windows 8 #434

Open
atlefren opened this issue Dec 1, 2014 · 9 comments
Open

buster-server fails on headless mode on Windows 8 #434

atlefren opened this issue Dec 1, 2014 · 9 comments
Assignees
Labels
Milestone

Comments

@atlefren
Copy link

atlefren commented Dec 1, 2014

os: Windows 8 enterprise

When trying to run buster-server with the -c option (for headless mode on win8) an error occurs and the process dies, but things work just fine without the -c option.

C:\>buster -v
Buster.JS version 0.7.17 Beta 5

C:\>phantomjs -v
1.9.8

C:\>buster-server -c
Starting headless browser...
buster-server running on http://localhost:1111

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENOENT
    at errnoException (child_process.js:1000:11)
    at Process.ChildProcess._handle.onexit (child_process.js:791:34)

C:\>buster-server
buster-server running on http://localhost:1111

This works as excpected on Ubuntu 14.10:

atlefren@marjory:~$ buster -v
Buster.JS version 0.7.8 Beta 5
atlefren@marjory:~$ phantomjs -v
1.9.8
atlefren@marjory:~$ buster-server -c -p 1112
Starting headless browser...
buster-server running on http://localhost:1112
Browser was captured.
@atlefren
Copy link
Author

atlefren commented Dec 1, 2014

Same behavior on Windows 7 Enterprise

@dkl-ppi dkl-ppi self-assigned this Dec 9, 2014
@dkl-ppi
Copy link
Member

dkl-ppi commented Dec 9, 2014

With Windows 7 Professional 64 bit and phantom.js 1.9.7 all works fine for me. Unfortunately i don't have Windows 7 Enterprise or Windows 8 Enterprise. Do you know if phantom.js generally works on the machines, independently of Buster.JS?

@dkl-ppi
Copy link
Member

dkl-ppi commented Dec 16, 2014

@atlefren, could you please provide further informations?

@dkl-ppi
Copy link
Member

dkl-ppi commented Dec 19, 2014

@atlefren, i tried to reproduce the issue on a Windows 7 Enterprise machine, but for me buster-server -c runs without any errors. I got the same error message you get, before i had installed phantom.js though. Please ensure you have phantom.js on your machines and the path to the phantom.js executable in your PATH environment variable.

@atlefren
Copy link
Author

atlefren commented Jan 5, 2015

@dwittner Sorry for the delay, extended vacation to blame.

Will check as soon as possible, thanks for following up!

@atlefren
Copy link
Author

atlefren commented Jan 6, 2015

@dwittner

I installed phantomjs using npm, and haven't been using it for anything else.

The "phanthomjs -v" command returns a version number (as above), and "phantomjs" gives me an interactive prompt, that seems to be working fine.

My npm packages seems to be in "C:\Users\Atle\AppData\Roaming\npm", which is on my PATH. This is the same directory as buster is installed in.

@atlefren
Copy link
Author

atlefren commented Jan 6, 2015

Ah!

Finally I got to the root cause of this. It seems like buster-server and phantomjs doesn't play nice on Windows when phantomjs is installed using npm (due to this: nodejs/node-v0.x-archive#2318)

So, the solution was to uninstall the phantomjs installed via npm and install a phantomjs.exe file. Worked as expected after this.

(this is probably a known thing for node-windows users, but as this worked fine on Linux I could not understand why it didn't work on windows). Maybe worth adding to the readme if it isn't already there?

@dkl-ppi
Copy link
Member

dkl-ppi commented Jan 12, 2015

Thanks for the info. I will try to find a way phantomjs from npm can also be used on windows.

@dkl-ppi dkl-ppi added the Bug label Jan 12, 2015
@dkl-ppi dkl-ppi added this to the 1.0 release milestone Jul 13, 2015
@dominykas dominykas mentioned this issue Jan 5, 2016
18 tasks
@dominykas dominykas modified the milestones: 0.8, 1.0 release Jan 5, 2016
@dominykas
Copy link
Member

The solution is to use cross-spawn-async (released with grunt-buster@0.4.2) - but I have to revisit the phantom-proxy - I think it's not really needed and things can be simplified.

I also need to get my hands on a proper Windows machine with full dev tools, as phantomjs seems to crash a lot on Appveyor - it could be memory issues or whatever other random stuff.

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

No branches or pull requests

3 participants