heroku-buildpack-google-chrome
heroku-buildpack-google-chrome copied to clipboard
unknown error: session deleted because of page crash
Hey all!
Have been using the Chrome + ChromeDriver Buildpacks for a couple years for a Python script that I run each day. I pushed a new commit that did not impact my webdriver code and received the following error when my script ran:
File "update_data.py", line 111, in download
zenplanner(client_dict, download_dates, driver)
File "/app/download_methods.py", line 384, in zenplanner
driver.get(zenplanner_urls[report])
File "/app/.heroku/python/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 333, in get
self.execute(Command.GET, {'url': url})
File "/app/.heroku/python/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/app/.heroku/python/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: session deleted because of page crash
from tab crashed
(Session info: headless chrome=83.0.4103.116)
As a follow up, the exact same code works normally on my local machine. I only receive this error when the script runs through Heroku.
I'd appreciate any guidance you all can provide to resolve this issue!
Thanks, Matt
Getting same error here.
Try adding the Chrome option disable-dev-shm-usage
, this helped fixed the issue for me since /dev/shm
is too small on Heroku to run Chrome.
Created a blog post on how to solve this issue and also on how to add the ability to save screenshots: Heroku: Use Selenium to run Google Chrome in a Python Script