teodesian / Selenium-Remote-Driver

Perl Bindings to the Selenium Webdriver server
174 stars 90 forks source link

Could not create new session: invalid argument: can't kill an exited process at game.pl line 156. #446

Closed davewood closed 4 years ago

davewood commented 4 years ago

It worked once but now that I exited the container and restarted it it throws this error:

Could not create new session: invalid argument: can't kill an exited process at game.pl line 156.

carton exec perl -MCarp::Always game.pl 
Could not create new session: invalid argument: can't kill an exited process at /headless/game/local/lib/perl5/Selenium/Remote/Driver.pm line 572.
        Selenium::Remote::Driver::_request_new_session(Selenium::Firefox=HASH(0x2f9a1b0), HASH(0x2f1b9e8)) called at /headless/game/local/lib/perl5/Selenium/Remote/Driver.pm line 439
        Selenium::Remote::Driver::new_session(Selenium::Firefox=HASH(0x2f9a1b0), HASH(0x29a1328)) called at /headless/game/local/lib/perl5/Selenium/Remote/Driver.pm line 281
        Selenium::Remote::Driver::BUILD(Selenium::Firefox=HASH(0x2f9a1b0), HASH(0x2989ca0)) called at (eval 87) line 422
        Selenium::Firefox::new("Selenium::Firefox", "auto_close", 1) called at game.pl line 156
Killing Driver PID 345 listening on port 51023...

156: my $driver = Selenium::Firefox->new(auto_close => 1);

this perl script is running inside a docker container.

teodesian commented 4 years ago

That is strange. Git grep in the repo returns nothing, and the line upon which we fail here suggests this is coming from the upstream driver. Not sure I can do anything about this.

davewood commented 4 years ago

this might be related.

https://stackoverflow.com/questions/52534658/webdriverexception-message-invalid-argument-cant-kill-an-exited-process-with

I upgraded geckodriver from 0.24 to 0.26 and rebuilt all perl modules

firefox-esr/stable,now 68.6.1esr-1~deb10u1

I can start firefox, but if i run the perl script I still get the same error.

I dont know If im supposed to pass headless=true to firefox options somehow.

davewood commented 4 years ago

if i completely remove the docker image and rebuild it from scratch it works again.

davewood commented 4 years ago

I am closing this issue since it doesnt appear to be caused by Selenium::Remote::Driver.

thank you for the quick feedback.