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 254 forks source link

Error when trying to get site with HTTP/2 #526

Open randolfvalerija opened 2 years ago

randolfvalerija commented 2 years ago

Hello @wkeeling,

I am currently running into some errors when trying to get the url of a site which uses HTTP/2.

chrome-version==100.0.4896 selenium==4.1.3 selenium-wire==4.6.3 url=https://selfservice.broomfield.org/web/search/DOCSEARCH335S1

see attached logs for more info

using the geckodriver I was able to access the site with no issues

http2-logs.txt

wkeeling commented 2 years ago

Thanks for raising this. It looks like it may be something to do with small data frames and Tomcat server and I notice that https://selfservice.broomfield.org/web/search/DOCSEARCH335S1 is using Tomcat.

Whilst I figure out the root cause from the Selenium Wire side, you can disable HTTP/2 so that you can visit the site using Chrome.

driver = webdriver.Chrome(
    seleniumwire_options={
        'mitm_http2': False
    }
)
randolfvalerija commented 2 years ago

thanks! That helps a lot!