Ошибка No such session в selenium + chromedriver

chromedriver
selenium
python
Теги: #<Tag:0x00007fedb78d7a00> #<Tag:0x00007fedb78d7870> #<Tag:0x00007fedb78d7708>

(Kate) #1

Спустя несколько запусков тесты падают с ошибкой selenium.common.exceptions.WebDriverException: Message: unknown error: session deleted because of page crash.
И далее тесты начинают падать с ошибкой selenium.common.exceptions.WebDriverException: Message: no such session
В чем причина ошибки, в моем тесте или в нехватки памяти?
Использую вагрант, хром хедлес

Лог ошибки:

Traceback (most recent call last):
  File "/home/vagrant/proj/plvd/tests/tests_buy_good.py", line 39, in test_buy_good_with_logined_user
    self.catalog.click_first_good()
  File "/home/vagrant/proj/plvd/tests/pages.py", line 129, in click_first_good
    WebDriverWait(self.driver, 120).until(EC.element_to_be_clickable(GoodPageLocators.BUY_BTN))
  File "/home/vagrant/venv/lib/python3.5/site-packages/selenium/webdriver/support/wait.py", line 71, in until
    value = method(self._driver)
  File "/home/vagrant/venv/lib/python3.5/site-packages/selenium/webdriver/support/expected_conditions.py", line 284, in __call__
    if element and element.is_enabled():
  File "/home/vagrant/venv/lib/python3.5/site-packages/selenium/webdriver/remote/webelement.py", line 158, in is_enabled
    return self._execute(Command.IS_ELEMENT_ENABLED)['value']
  File "/home/vagrant/venv/lib/python3.5/site-packages/selenium/webdriver/remote/webelement.py", line 499, in _execute
    return self._parent.execute(command, params)
  File "/home/vagrant/venv/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 297, in execute
    self.error_handler.check_response(response)
  File "/home/vagrant/venv/lib/python3.5/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: session deleted because of page crash
from unknown error: cannot determine loading status
from tab crashed
  (Session info: headless chrome=62.0.3178.0)
  (Driver info: chromedriver=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 3.16.0-4-amd64 x86_64)


(Fuji F) #2

Я так понял, что советы из Гугла не помогли?


(Kate) #3

В гугле нашла только объяснение, что не хватает памяти