WebDriverException: Message: invalid argument: can't kill an exited process with GeckoDriver, Selenium and Python on RaspberryPi3

后端 未结 11 926
一整个雨季
一整个雨季 2020-11-22 11:04

Server: Raspberry Pi 3
OS: Dietpi - version 159
Geckodriver version: 0.22 for arm
Firefox version: 52.9.0
Python version: 3.5
Selenium version: 3.14.1 <

11条回答
  •  半阙折子戏
    2020-11-22 11:10

    Thumb rule

    A common cause for Browsers to crash during startup is running WebDriver initiated Browsers as root user (administrator) on Linux. While it is possible to work around this issue by passing --no-sandbox flag when creating your WebDriver session, such a configuration is unsupported and highly discouraged. You need to configure your environment to run Browser as a regular user instead.


    This error message...

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

    ...implies that the GeckoDriver was unable to initiate/spawn a new WebBrowsing Session i.e. Firefox Browser session.

    Your main issue is the incompatibility between the version of the binaries you are using as follows:

    • Your GeckoDriver version is 0.22.0.

    • Release Notes of GeckoDriver v0.21.0 (2018-06-15) clearly mentions the following:

    • Firefox 57 (and greater)

    • Selenium 3.11 (and greater)

    • Your Firefox version is 52.9.0.

    So there is a clear mismatch between GeckoDriver v0.22.0 and the Firefox Browser v57


    Solution

    • Upgrade GeckoDriver to GeckoDriver v0.22.0 level.
    • GeckoDriver is present in the specified location.
    • GeckoDriver is having executable permission for non-root users.
    • Upgrade Firefox version to Firefox v62.0.2 levels.
    • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
    • If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
    • Execute your Selenium Test as a non-root user.

    GeckoDriver, Selenium and Firefox Browser compatibility chart

提交回复
热议问题