For those who use selenium on heroku, we have described the solution in case of crash.
I got the following error when running selenium on heroku.
Running python manage.py task on ⬢ xxxxx... up, run.9999 (Hobby)
Message: unknown error: session deleted because of page crash
from unknown error: cannot determine loading status
from tab crashed
(Session info: headless chrome=81.0.4044.129)
Upon examination, it seems to be a crash due to lack of memory. Therefore, it seems that you should take measures to save memory of selenium so as not to run out of memory.
options = Options()
options.add_argument('--headless')
options.add_argument('--disable-gpu')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
options.add_argument('--remote-debugging-port=9222')
driver = webdriver.Chrome(settings.CHROME_PATH, options=options)
driver.set_window_size(950, 800)
How do I prevent headless Chromium from crashing? - Heroku Help https://help.heroku.com/DOB4Y0I4/how-do-i-prevent-headless-chromium-from-crashing
Suddenly a mysterious error in Rspec-Qiita https://qiita.com/mishitoshi/items/3ca5a9a26ceb7e2cf034
Selenium::WebDriver::Error::NoSuchDriverError - Today I Learned https://selleo.com/til/posts/mxkjoppuxm-seleniumwebdrivererrornosuchdrivererror
Recommended Posts