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

Interceptor issue in 4.5.5 #459

Closed mxrch closed 2 years ago

mxrch commented 2 years ago

Hi ! I was investigating a recent weird bug in GHunt since a few weeks, with some users having this issue but not everyone, and it seems related to the 4.5.5 version, in the 4.5.4 version it runs fine ! If you want an environment to debug you can git clone GHunt and checkout at the https://github.com/mxrch/GHunt/commit/ab51b889587a5c7a5e6565e8226fd0883676c0d3 commit. The broken functionality is in https://github.com/mxrch/GHunt/blob/master/check_and_gen.py, where I set interceptors to get specific headers, but when printing received requests by the interceptors, none are received in the 4.5.5, but I can see all of them in 4.5.4, so you can just install the requirements, make sure you have Google Chrome and run the check_and_gen.py file ! :)

mxrch commented 2 years ago

Oops, sorry I haven't seen https://github.com/wkeeling/selenium-wire/issues/452.

wkeeling commented 2 years ago

Thanks for raising this.

Yes I think you may be hitting #452 when configuring the webdriver.

I'll have a fix available soon, but in the meantime you can work around the issue by passing ChromeOptions using the options argument, not chrome_options as described in the linked issue. Hope that helps!