node-horseman icon indicating copy to clipboard operation
node-horseman copied to clipboard

NetStat access / errors when opening page (Azure) - why needed?

Open hardcodet opened this issue 8 years ago • 3 comments

I did a simple trial of Phantom in Azure Functions today, and then gave Horseman a try because it offers a nicer API. I was assuming those have the same requirements, but while my Phantom-only test worked just fine, Horseman crashes with this simple snippet:

var buf = horseman
    .open('http://www.google.com')
    .catch(function(err) {
        context.log("ERROR " + err);
    })
    .close();

The logged output was as follows: ERROR HeadlessError: Error executing command to extract phantom ports: Error: Command failed: netstat -ano | findstr /R "\<18580\>" Access is denied.

So I'm assuming Horseman wants to access stuff on the machine I'd rather not have it. Apart from me not being able to expose this on Azure: Is this really needed given that Phantom works just fine without it, or something that might be fixed?

hardcodet avatar Sep 27 '17 09:09 hardcodet

Same error: ERROR HeadlessError: Error executing command to extract phantom ports: Error: Command failed: netstat -ano | findstr /R "<18580>" Access is denied.

thEpisode avatar Oct 15 '17 06:10 thEpisode

node-phantom-simple uses netstat to figure out which port PhantomJS starts on.

awlayton avatar Oct 17 '17 16:10 awlayton

And what is a solution?, my solution is create a new VM with linux and deploy a basic API 😢

thEpisode avatar Oct 26 '17 03:10 thEpisode