wkeeling / selenium-wire

Extends Selenium's Python bindings to give you the ability to inspect requests made by the browser.
MIT License
1.9k stars 251 forks source link

Opening a webpage with selenium-wire gives error "session deleted because of page crash" #626

Open alex4200 opened 1 year ago

alex4200 commented 1 year ago

When running selenium-wire 5.1.0 with chrome 107.0.5304.87 and chromedriver 107.0.5304.18 I get the error

Message: unknown error: session deleted because of page crash
from unknown error: cannot determine loading status

when I try to simply open a page. The used code is

    from seleniumwire import webdriver
    from selenium.webdriver.chrome.options import Options

    chrome_options = Options()
    chrome_options.add_argument("--headless")
    driver = webdriver.Chrome(options=chrome_options)

    # Load the URL
    driver.request_interceptor = interceptor
    driver.get(url)

using an interceptor that injects headers into each request.

Any ideas how to fix this problem?

wkeeling commented 1 year ago

What version of Python and Selenium are you running - and also what OS?

alex4200 commented 1 year ago

Its Debian GNU/Linux 10, selenium 4.6.0 and python 3.8