Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Error “selenium server did not return proper status” when starts PhantomJS

by aitap (Curate)
on Oct 19, 2014 at 18:46 UTC ( [id://1104334]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Error “selenium server did not return proper status” when starts PhantomJS
in thread Error “selenium server did not return proper status” when starts PhantomJS

No file matching 'C:\Strawberry\perl\site\lib\Selenium\Remote\RemoteConnection.pm' is loaded.
Does f C:/Strawberry/perl/site/lib/Selenium/Remote/RemoteConnection.pm not work, either? The idea was to examine the variables $self and $status near the place of the error (sub BUILD in RemoteConnection.pm, lines 44-49 in my installation).

Replies are listed 'Best First'.
Re^4: Error “selenium server did not return proper status” when starts PhantomJS
by natalie_g (Initiate) on Nov 21, 2015 at 00:21 UTC

    Sorry for slow poke ...

    So I stumbled accross this thread because I have the same problem. And an ugly fix/work-around. Can't do any better because I don't know anything about perl.

    1. Open StrawberryPerl\perl\vendor\lib\LWP\Protocol\http.pm
    2. Find sub _new_socket
    3. Set $host = '127.0.0.1' (maybe '::1' works, too?)

    How did I find this solution? The debugging helped. The error reported by IO::Socket::INET is "bad address". Originally the host was "localhost". I have no idea why "localhost" is a bad address but "127.0.0.1" works.

    For reference:

    • nslookup localhost = no result
    • ping localhost = ::1
    • http://localhost:8910/ in browser opens as expected
    • Windows 10, 64bit
    • perl v5.22.0 MSWin32-x64-multi-thread
    • Several network cards/adapters but only one enabled
    • IPv4 and IPv6
    • Default Windows Firewall
    • Avast Free AntiVirus
      I found this fix as well, but it caused other issues as it affected everything. I found a better solution was to add this into ../Selenium/Remote/RemoteConnection.pm

      Around line 103, before

      my $request = HTTP::Request->new($method, $fullurl, $header, $cont +ent);
      Add in this line:
      $fullurl =~ s/localhost/127.0.0.1/;
      It accomplishes the same thing but limits the effect to Selenium only.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1104334]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2024-04-19 16:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found