chromedriver unexpectedly exited. Status code was: 127

See original GitHub issue

Anybody tried to run this in aws lambda function ?

For the life of me, I can’t get it to work…

I have super simple lambda function, that runs python 3.9 ( same issue in 3.8 ) In requirements.txt there is just helium, it will build and pull all needed packages.

Then I need to change chromedriver to executable, cause first it complained about that…

The function basically does only this:

from helium import *

    start_chrome(headless=True)
    start_chrome('google.com', headless=True)

But it always fails with:

/var/task/selenium/webdriver/firefox/firefox_profile.py:208: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if setting is None or setting is '':
[ERROR] WebDriverException: Message: Service /var/task/helium/_impl/webdrivers/linux/chromedriver unexpectedly exited. Status code was: 127
    raise WebDriverException(bdriver/common/service.py", line 109, in assert_process_still_running
{"errorMessage": "Message: Service /var/task/helium/_impl/webdrivers/linux/chromedriver unexpectedly exited. Status code was: 127\n", "errorType": "WebDriverException", "requestId": "2aa16ca2-06ba-4b94-849f-55267956b990", "stackTrace": ["  File \"/var/task/app.py\", line 11, in lambda_handler\n    start_chrome(headless=True)\n", "  File \"/var/task/helium/__init__.py\", line 76, in start_chrome\n    return _get_api_impl().start_chrome_impl(\n", "  File \"/var/task/helium/_impl/__init__.py\", line 101, in start_chrome_impl\n    self._start_chrome_driver(headless, maximize, options, capabilities)\n", "  File \"/var/task/helium/_impl/__init__.py\", line 110, in _start_chrome_driver\n    result = Chrome(\n", "  File \"/var/task/selenium/webdriver/chrome/webdriver.py\", line 73, in __init__\n    self.service.start()\n", "  File \"/var/task/selenium/webdriver/common/service.py\", line 98, in start\n    self.assert_process_still_running()\n", "  File \"/var/task/selenium/webdriver/common/service.py\", line 109, in assert_process_still_running\n    raise WebDriverException(\n"]}END RequestId: 2aa16ca2-06ba-4b94-849f-55267956b990

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
VladoPortoscommented, Feb 6, 2022

@dntzbgh Here is my working solution, it requires running lambda as docker image but otherwise works fine. https://rpi4cluster.com/aws/lambda_selenium/

0reactions
danbaghilovicicommented, Feb 3, 2022

Nice, please provide a link to your steps ( gist/ blog post / whatever you prefer). I’m also curious about how you did it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Message: Service chromedriver unexpectedly exited. Status ...
WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127. My issue was due to using a different version ...
Read more >
Chromedriver unexpectedly exits during pipeline run
WebDriverException: Message: Service /root/.wdm/drivers/chromedriver/linux64/99.0.4844.51/chromedriver unexpectedly exited. Status code was: 127.
Read more >
chromedriver unexpectedly exited. Status code was ... - GitHub
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* ...
Read more >
chromedriver_linux64 unexpectedly exited. Status code was
Status code was: 127. Trying to run chromedriver in Google Cloud Run using chromedriver_py, and I get this error. Any idea why this...
Read more >
Errors Using Selenium/Chromedriver in DataBricks
Chrome(). Error: WebdriverException: Message: 'chromedriver' executable needs to be in PATH. ... unexpectedly exited. Status code was: 127.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found