Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unknown error: session deleted because of page crash #92

Open
mattblank11 opened this issue Jul 16, 2020 · 2 comments
Open

unknown error: session deleted because of page crash #92

mattblank11 opened this issue Jul 16, 2020 · 2 comments

Comments

@mattblank11
Copy link

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

@kingkong-cmd
Copy link

Getting same error here.

@jacektrocinski
Copy link

jacektrocinski commented Nov 15, 2020

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

abysswarrior added a commit to abysswarrior/crypto-funds-portfolio that referenced this issue May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants