ThoughtfulDev / EagleEye

Stalk your Friends. Find their Instagram, FB and Twitter Profiles using Image Recognition and Reverse Image Search.
Do What The F*ck You Want To Public License
4.24k stars 560 forks source link

selenium.common.exception.WebDriverException: Message: invalid argument: can't kill an exited process #66

Closed ovninosa closed 4 years ago

ovninosa commented 5 years ago

When I run the docker file, I receive this message:

selenium.common.exception.WebDriverException: Message: invalid argument: can't kill an exited process

Any idea to fix it? Thanks.

ThoughtfulDev commented 5 years ago

When exactly does this Happen?

nsandoval commented 5 years ago

Hi! same here...

Running in DOCKER MODE
==> Skipping jitters since specified in config.json
==> Opening Webdriver
Traceback (most recent call last):
  File "eagle-eye.py", line 261, in <module>
    main(skipFB=args.skipfb, skipY=args.skipyandex, FBUrls=[], jsonRep=jsonRepFile, dockerMode=aDocker, dockerName=aName)
  File "eagle-eye.py", line 100, in main
    f.grabData()
  File "/EagleEye/grabber/facebook.py", line 16, in grabData
    driver = cfg.getWebDriver()
  File "/EagleEye/utils/config.py", line 43, in getWebDriver
    return webdriver.Firefox(profile)
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/firefox/webdriver.py", line 174, in __init__
    keep_alive=True)
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: invalid argument: can't kill an exited process

I had also changed the GeckoDriver version from dockerfile but the error remains.

ThoughtfulDev commented 5 years ago

Are you using the Linux Subsystem in Windows? If so this isn't tested. PLease try using a Linux distro.

ovninosa commented 5 years ago

I use macOS

pyronlaboratory commented 5 years ago

I'm using a Linux distro on Heroku. I'm using the following buildpacks: http://github.com/buitron/geckodriver-buildpack http://github.com/buitron/firefox-buildpack

I'm struggling with the same error.

I read on stackoverflow, that this error implies that the GeckoDriver was unable to initiate/spawn a new WebBrowsing Session i.e. Firefox Browser session. Not really sure why though.

I wanted to post a new issue, but I though it could be a possible duplicate, hence posting here.

Any thoughts?!

ThoughtfulDev commented 5 years ago

Hey @ronnielivingsince1994 , thank you for linking the other issue. I have not tested this setup on Heroku and as far as i know the webdriver still needs a x-server to run.

So when using the dockerfile you need to run the docker container using the following arguments:

sudo docker run -t --net=host --env="DISPLAY" \
                           --volume="$HOME/.Xauthority:/root/.Xauthority:rw"  \

You need to set the DISPLAY env varibale for Xorg and mount your local .Xauthority so that the docker container can access the hosts x-server. So your docker host still needs a xorg server and desktop environment to run the container. Maybe you can install a desktop environment on heroku and a vnc-server and try it that way?

Hope i could help :)

ThoughtfulDev commented 5 years ago

I will add the x-server requirement to the README as i am in the process of redoing the formatting of the README.

Rual26 commented 5 years ago

Hi, I have the same problem, but in Ubuntu. Can you help me?

ThoughtfulDev commented 5 years ago

Have you used the docker container or how did you install? Try increasing the timeout in the config

tonybounty commented 4 years ago

I've the same error on Ubuntu with Docker. I checked several times docker arguments. All seems correct.

ThoughtfulDev commented 4 years ago

Try increasing the timeout in the config file (and run without docker once).

jimmy0435 commented 4 years ago

I have the same issue on Ubuntu 18.04. Both Docker and install directly. Finally, I found that cause by the privilege, try to not run with "root".

ThoughtfulDev commented 4 years ago

I didnt run with root at any time. This might cause issues regarding the firefox profile i think.

jimmy0435 commented 4 years ago

Yes, it could be.