Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Selenium-wire proxy blocking requests #136

Closed
javo222 opened this issue Jul 21, 2020 · 5 comments
Closed

Selenium-wire proxy blocking requests #136

javo222 opened this issue Jul 21, 2020 · 5 comments

Comments

@javo222
Copy link

javo222 commented Jul 21, 2020

I've made a small sample code which shows that the proxy server (no proxy!) does not allow Selenium-wire to catch traffic when navigating to a new page.

#!C:/Python38-32/python.exe
	
from seleniumwire import webdriver  # Import from seleniumwire
from selenium.webdriver.common.keys import Keys

driver = webdriver.Firefox()

driver.get('https://www.google.se/')

useridInput = driver.find_element_by_name('q')
useridInput.click();
	
useridInput.send_keys('test'); 
driver.find_element_by_name("q").send_keys(Keys.ENTER)

for request in driver.requests:
    if request.response:
        print(
            request.url
        )

The first page is loaded correctly but after hitting ENTER, Firefox complains:
The proxy server is refusing connections
Firefox is configured to use a proxy server that is refusing connections.

I'm on a simple home network with no proxy configured in Firefox. When checking Firefox settings at the end of the script, I noticed the proxy settings are set to Manual.
image

Using Selenium instead of Selenium-wire and removing the driver.requests bit fixes the issue but prevents me from catching the XHR responses...

Edit:
I've found some similar topics/issues on this page but none of them seems to be the exact same.
I'm using selenium-wire-2.0.0

Here are the Debug logs:

DEBUG:seleniumwire.proxy.handler:http://seleniumwire/initialise 200
INFO:seleniumwire.proxy.client:Created proxy listening on 127.0.0.1:49160
DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:49162/session {"capabilities": {"firstMatch": [{}], "alwaysMatch": {"browserName": "firefox", "acceptInsecureCerts": true, "proxy": {"proxyType": "manual", "httpProxy": "127.0.0.1:49160", "sslProxy": "127.0.0.1:49160", "noProxy": []}}}, "desiredCapabilities": {"browserName": "firefox", "acceptInsecureCerts": true, "proxy": {"proxyType": "manual", "httpProxy": "127.0.0.1:49160", "sslProxy": "127.0.0.1:49160", "noProxy": []}, "marionette": true}}
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 127.0.0.1:49162
DEBUG:urllib3.connectionpool:http://127.0.0.1:49162 "POST /session HTTP/1.1" 200 831
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:49162/session/62474102-652e-45f8-b07f-258257a2f82b/url {"url": "https://www.google.se/"}
DEBUG:seleniumwire.proxy.handler:tracking-protection.cdn.mozilla.net:443 200
DEBUG:seleniumwire.proxy.handler:firefox.settings.services.mozilla.com:443 200
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
INFO:seleniumwire.proxy.handler:Capturing request: http://ocsp.digicert.com/
INFO:seleniumwire.proxy.handler:Capturing response: http://ocsp.digicert.com/ 200 OK
DEBUG:seleniumwire.proxy.handler:http://ocsp.digicert.com/ 200
INFO:seleniumwire.proxy.handler:Capturing request: https://tracking-protection.cdn.mozilla.net/social-track-digest256/1594235398
INFO:seleniumwire.proxy.handler:Capturing response: https://tracking-protection.cdn.mozilla.net/social-track-digest256/1594235398 200 OK
DEBUG:seleniumwire.proxy.handler:https://tracking-protection.cdn.mozilla.net/social-track-digest256/1594235398 200
DEBUG:seleniumwire.proxy.handler:tracking-protection.cdn.mozilla.net:443 200
INFO:seleniumwire.proxy.handler:Capturing request: http://detectportal.firefox.com/success.txt
DEBUG:seleniumwire.proxy.handler:snippets.cdn.mozilla.net:443 200
INFO:seleniumwire.proxy.handler:Capturing response: http://detectportal.firefox.com/success.txt 200 OK
DEBUG:seleniumwire.proxy.handler:http://detectportal.firefox.com/success.txt 200
INFO:seleniumwire.proxy.handler:Capturing request: http://detectportal.firefox.com/success.txt?ipv4
INFO:seleniumwire.proxy.handler:Capturing request: http://detectportal.firefox.com/success.txt?ipv6
INFO:seleniumwire.proxy.handler:Capturing response: http://detectportal.firefox.com/success.txt?ipv6 200 OK
DEBUG:seleniumwire.proxy.handler:http://detectportal.firefox.com/success.txt?ipv6 200
INFO:seleniumwire.proxy.handler:Capturing response: http://detectportal.firefox.com/success.txt?ipv4 200 OK
DEBUG:seleniumwire.proxy.handler:http://detectportal.firefox.com/success.txt?ipv4 200
INFO:seleniumwire.proxy.handler:Capturing request: https://www.google.se/
INFO:seleniumwire.proxy.handler:Capturing request: https://tracking-protection.cdn.mozilla.net/analytics-track-digest256/1589483333
INFO:seleniumwire.proxy.handler:Capturing response: https://tracking-protection.cdn.mozilla.net/analytics-track-digest256/1589483333 200 OK
DEBUG:seleniumwire.proxy.handler:https://tracking-protection.cdn.mozilla.net/analytics-track-digest256/1589483333 200
DEBUG:seleniumwire.proxy.handler:tracking-protection.cdn.mozilla.net:443 200
INFO:seleniumwire.proxy.handler:Capturing request: https://tracking-protection.cdn.mozilla.net/content-track-digest256/1594235398
INFO:seleniumwire.proxy.handler:Capturing request: https://snippets.cdn.mozilla.net/6/Firefox/78.0.2/20200708170202/WINNT_x86_64-msvc/en-US/release/Windows_NT%2010.0/default/default/
INFO:seleniumwire.proxy.handler:Capturing response: https://www.google.se/ 200 OK
DEBUG:seleniumwire.proxy.handler:https://www.google.se/ 200
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
DEBUG:seleniumwire.proxy.handler:consent.google.com:443 200
DEBUG:seleniumwire.proxy.handler:ssl.gstatic.com:443 200
INFO:seleniumwire.proxy.handler:Capturing request: https://www.google.se/tia/tia.png
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
DEBUG:seleniumwire.proxy.handler:www.gstatic.com:443 200
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
INFO:seleniumwire.proxy.handler:Capturing response: https://tracking-protection.cdn.mozilla.net/content-track-digest256/1594235398 200 OK
DEBUG:seleniumwire.proxy.handler:https://tracking-protection.cdn.mozilla.net/content-track-digest256/1594235398 200
DEBUG:seleniumwire.proxy.handler:tracking-protection.cdn.mozilla.net:443 200
INFO:seleniumwire.proxy.handler:Capturing response: https://snippets.cdn.mozilla.net/6/Firefox/78.0.2/20200708170202/WINNT_x86_64-msvc/en-US/release/Windows_NT%2010.0/default/default/ 302 Moved Temporarily
DEBUG:seleniumwire.proxy.handler:https://snippets.cdn.mozilla.net/6/Firefox/78.0.2/20200708170202/WINNT_x86_64-msvc/en-US/release/Windows_NT%2010.0/default/default/ 302
DEBUG:seleniumwire.proxy.handler:snippets.cdn.mozilla.net:443 200
INFO:seleniumwire.proxy.handler:Capturing response: https://www.google.se/tia/tia.png 200 OK
DEBUG:seleniumwire.proxy.handler:https://www.google.se/tia/tia.png 200
DEBUG:seleniumwire.proxy.handler:www.gstatic.com:443 200
INFO:seleniumwire.proxy.handler:Capturing request: https://consent.google.com/status?continue=https://www.google.se&m=0&pc=s&timestamp=1595317669&gl=SE
INFO:seleniumwire.proxy.handler:Capturing response: https://consent.google.com/status?continue=https://www.google.se&m=0&pc=s&timestamp=1595317669&gl=SE 204 No Content
DEBUG:seleniumwire.proxy.handler:https://consent.google.com/status?continue=https://www.google.se&m=0&pc=s&timestamp=1595317669&gl=SE 204
INFO:seleniumwire.proxy.handler:Capturing request: https://ssl.gstatic.com/gb/images/i1_1967ca6a.png
INFO:seleniumwire.proxy.handler:Capturing request: https://www.google.se/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png
INFO:seleniumwire.proxy.handler:Capturing response: https://ssl.gstatic.com/gb/images/i1_1967ca6a.png 200 OK
DEBUG:seleniumwire.proxy.handler:https://ssl.gstatic.com/gb/images/i1_1967ca6a.png 200
INFO:seleniumwire.proxy.handler:Capturing response: https://www.google.se/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png 200 OK
DEBUG:seleniumwire.proxy.handler:https://www.google.se/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png 200
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
INFO:seleniumwire.proxy.handler:Capturing request: https://www.gstatic.com/inputtools/images/tia.png
INFO:seleniumwire.proxy.handler:Capturing request: https://www.google.se/images/nav_logo299.webp
INFO:seleniumwire.proxy.handler:Capturing request: https://www.google.se/images/searchbox/desktop_searchbox_sprites302_hr.webp
INFO:seleniumwire.proxy.handler:Capturing request: https://tracking-protection.cdn.mozilla.net/mozstd-trackwhite-digest256/1589483333
INFO:seleniumwire.proxy.handler:Capturing request: https://snippets.cdn.mozilla.net/us-west/bundles-pregen/Firefox/release/en-us/default.json
INFO:seleniumwire.proxy.handler:Capturing request: https://www.gstatic.com/og/_/js/k=og.og2.en_US.tLR_BeNISzk.O/rt=j/m=def,aswid/exm=in,fot/d=1/ed=1/rs=AA2YrTswuefJcCFIbqItJ5vfQESOqkgl3g
INFO:seleniumwire.proxy.handler:Capturing request: https://www.google.se/xjs/_/js/k=xjs.s.sv.RxrsEIm2nko.O/ck=xjs.s.CIXMlJq8uc4.L.F4.O/m=IvlUe,MC8mtf,TJw5qb,Y33vzc,cdos,cr,hsm,iDPoPb,jsa,mvYTse,tg8oTe,d,csi/am=AAAAAAABAAAAS8DcDQDAfxAA4IISBwAAACBAS1KNBdIICQkBCAAAYBY2CAAB/d=1/dg=2/ct=zgms/rs=ACT90oF5ZCegqRRNj5lW6m5Xikc2XMemxw
INFO:seleniumwire.proxy.handler:Capturing request: https://www.google.se/gen_204?s=webhp&t=aft&atyp=csi&ei=pZ0WX8HANLCWlwTAzqPoAQ&rt=wsrt.16,aft.2854,prt.1829&bl=dOFG&ima=1&imad=0&imn=3
INFO:seleniumwire.proxy.handler:Capturing response: https://snippets.cdn.mozilla.net/us-west/bundles-pregen/Firefox/release/en-us/default.json 200 OK
DEBUG:seleniumwire.proxy.handler:https://snippets.cdn.mozilla.net/us-west/bundles-pregen/Firefox/release/en-us/default.json 200
DEBUG:seleniumwire.proxy.handler:firefox.settings.services.mozilla.com:443 200
INFO:seleniumwire.proxy.handler:Capturing response: https://www.gstatic.com/inputtools/images/tia.png 200 OK
DEBUG:seleniumwire.proxy.handler:https://www.gstatic.com/inputtools/images/tia.png 200
INFO:seleniumwire.proxy.handler:Capturing response: https://www.google.se/images/nav_logo299.webp 200 OK
INFO:seleniumwire.proxy.handler:Capturing response: https://www.google.se/images/searchbox/desktop_searchbox_sprites302_hr.webp 200 OK
DEBUG:seleniumwire.proxy.handler:https://www.google.se/images/nav_logo299.webp 200
DEBUG:seleniumwire.proxy.handler:https://www.google.se/images/searchbox/desktop_searchbox_sprites302_hr.webp 200
INFO:seleniumwire.proxy.handler:Capturing response: https://www.google.se/gen_204?s=webhp&t=aft&atyp=csi&ei=pZ0WX8HANLCWlwTAzqPoAQ&rt=wsrt.16,aft.2854,prt.1829&bl=dOFG&ima=1&imad=0&imn=3 204 No Content
INFO:seleniumwire.proxy.handler:Capturing request: http://detectportal.firefox.com/success.txt
DEBUG:seleniumwire.proxy.handler:https://www.google.se/gen_204?s=webhp&t=aft&atyp=csi&ei=pZ0WX8HANLCWlwTAzqPoAQ&rt=wsrt.16,aft.2854,prt.1829&bl=dOFG&ima=1&imad=0&imn=3 204
INFO:seleniumwire.proxy.handler:Capturing response: https://tracking-protection.cdn.mozilla.net/mozstd-trackwhite-digest256/1589483333 200 OK
DEBUG:seleniumwire.proxy.handler:https://tracking-protection.cdn.mozilla.net/mozstd-trackwhite-digest256/1589483333 200
DEBUG:seleniumwire.proxy.handler:tracking-protection.cdn.mozilla.net:443 200
INFO:seleniumwire.proxy.handler:Capturing request: https://tracking-protection.cdn.mozilla.net/google-trackwhite-digest256/1591202430
INFO:seleniumwire.proxy.handler:Capturing response: https://www.gstatic.com/og/_/js/k=og.og2.en_US.tLR_BeNISzk.O/rt=j/m=def,aswid/exm=in,fot/d=1/ed=1/rs=AA2YrTswuefJcCFIbqItJ5vfQESOqkgl3g 200 OK
DEBUG:seleniumwire.proxy.handler:https://www.gstatic.com/og/_/js/k=og.og2.en_US.tLR_BeNISzk.O/rt=j/m=def,aswid/exm=in,fot/d=1/ed=1/rs=AA2YrTswuefJcCFIbqItJ5vfQESOqkgl3g 200
INFO:seleniumwire.proxy.handler:Capturing response: http://detectportal.firefox.com/success.txt 200 OK
DEBUG:seleniumwire.proxy.handler:http://detectportal.firefox.com/success.txt 200
INFO:seleniumwire.proxy.handler:Capturing request: http://detectportal.firefox.com/success.txt?ipv4
INFO:seleniumwire.proxy.handler:Capturing request: http://detectportal.firefox.com/success.txt?ipv6
DEBUG:seleniumwire.proxy.handler:apis.google.com:443 200
INFO:seleniumwire.proxy.handler:Capturing response: http://detectportal.firefox.com/success.txt?ipv6 200 OK
INFO:seleniumwire.proxy.handler:Capturing response: http://detectportal.firefox.com/success.txt?ipv4 200 OK
DEBUG:seleniumwire.proxy.handler:http://detectportal.firefox.com/success.txt?ipv6 200
DEBUG:seleniumwire.proxy.handler:http://detectportal.firefox.com/success.txt?ipv4 200
INFO:seleniumwire.proxy.handler:Capturing response: https://www.google.se/xjs/_/js/k=xjs.s.sv.RxrsEIm2nko.O/ck=xjs.s.CIXMlJq8uc4.L.F4.O/m=IvlUe,MC8mtf,TJw5qb,Y33vzc,cdos,cr,hsm,iDPoPb,jsa,mvYTse,tg8oTe,d,csi/am=AAAAAAABAAAAS8DcDQDAfxAA4IISBwAAACBAS1KNBdIICQkBCAAAYBY2CAAB/d=1/dg=2/ct=zgms/rs=ACT90oF5ZCegqRRNj5lW6m5Xikc2XMemxw 200 OK
DEBUG:seleniumwire.proxy.handler:https://www.google.se/xjs/_/js/k=xjs.s.sv.RxrsEIm2nko.O/ck=xjs.s.CIXMlJq8uc4.L.F4.O/m=IvlUe,MC8mtf,TJw5qb,Y33vzc,cdos,cr,hsm,iDPoPb,jsa,mvYTse,tg8oTe,d,csi/am=AAAAAAABAAAAS8DcDQDAfxAA4IISBwAAACBAS1KNBdIICQkBCAAAYBY2CAAB/d=1/dg=2/ct=zgms/rs=ACT90oF5ZCegqRRNj5lW6m5Xikc2XMemxw 200
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
INFO:seleniumwire.proxy.handler:Capturing response: https://tracking-protection.cdn.mozilla.net/google-trackwhite-digest256/1591202430 200 OK
DEBUG:seleniumwire.proxy.handler:https://tracking-protection.cdn.mozilla.net/google-trackwhite-digest256/1591202430 200
DEBUG:seleniumwire.proxy.handler:tracking-protection.cdn.mozilla.net:443 200
INFO:seleniumwire.proxy.handler:Capturing request: https://www.google.se/xjs/_/js/k=xjs.s.sv.RxrsEIm2nko.O/ck=xjs.s.CIXMlJq8uc4.L.F4.O/am=AAAAAAABAAAAS8DcDQDAfxAA4IISBwAAACBAS1KNBdIICQkBCAAAYBY2CAAB/d=1/exm=IvlUe,MC8mtf,TJw5qb,Y33vzc,cdos,cr,csi,d,hsm,iDPoPb,jsa,mvYTse,tg8oTe/ed=1/dg=2/ct=zgms/rs=ACT90oF5ZCegqRRNj5lW6m5Xikc2XMemxw/m=RMhBfe,aa,abd,async,cvn5cb,dv7Bfe,dvl,foot,k27Oqb,kVbfxd,lu,m,mUpTid,mu,sb_wiz,sf,xiqEse,xz7cCd?xjs=s1
INFO:seleniumwire.proxy.handler:Capturing request: https://www.google.se/favicon.ico
INFO:seleniumwire.proxy.handler:Capturing request: https://apis.google.com/_/scs/abc-static/_/js/k=gapi.gapi.en.ZR5MgddWeJU.O/m=gapi_iframes,googleapis_client,plusone/rt=j/sv=1/d=1/ed=1/am=AAY/rs=AHpOoo-4Z3ZFsIV5SfJ3ya7-4n9QA-0-og/cb=gapi.loaded_0
INFO:seleniumwire.proxy.handler:Capturing request: https://tracking-protection.cdn.mozilla.net/allow-flashallow-digest256/1490633678
INFO:seleniumwire.proxy.handler:Capturing response: https://tracking-protection.cdn.mozilla.net/allow-flashallow-digest256/1490633678 200 OK
DEBUG:seleniumwire.proxy.handler:https://tracking-protection.cdn.mozilla.net/allow-flashallow-digest256/1490633678 200
DEBUG:seleniumwire.proxy.handler:tracking-protection.cdn.mozilla.net:443 200
INFO:seleniumwire.proxy.handler:Capturing response: https://www.google.se/favicon.ico 200 OK
DEBUG:seleniumwire.proxy.handler:https://www.google.se/favicon.ico 200
INFO:seleniumwire.proxy.handler:Capturing request: https://tracking-protection.cdn.mozilla.net/except-flashallow-digest256/1490633678
INFO:seleniumwire.proxy.handler:Capturing response: https://apis.google.com/_/scs/abc-static/_/js/k=gapi.gapi.en.ZR5MgddWeJU.O/m=gapi_iframes,googleapis_client,plusone/rt=j/sv=1/d=1/ed=1/am=AAY/rs=AHpOoo-4Z3ZFsIV5SfJ3ya7-4n9QA-0-og/cb=gapi.loaded_0 200 OK
DEBUG:seleniumwire.proxy.handler:https://apis.google.com/_/scs/abc-static/_/js/k=gapi.gapi.en.ZR5MgddWeJU.O/m=gapi_iframes,googleapis_client,plusone/rt=j/sv=1/d=1/ed=1/am=AAY/rs=AHpOoo-4Z3ZFsIV5SfJ3ya7-4n9QA-0-og/cb=gapi.loaded_0 200
INFO:seleniumwire.proxy.handler:Capturing response: https://tracking-protection.cdn.mozilla.net/except-flashallow-digest256/1490633678 200 OK
DEBUG:seleniumwire.proxy.handler:https://tracking-protection.cdn.mozilla.net/except-flashallow-digest256/1490633678 200
INFO:seleniumwire.proxy.handler:Capturing response: https://www.google.se/xjs/_/js/k=xjs.s.sv.RxrsEIm2nko.O/ck=xjs.s.CIXMlJq8uc4.L.F4.O/am=AAAAAAABAAAAS8DcDQDAfxAA4IISBwAAACBAS1KNBdIICQkBCAAAYBY2CAAB/d=1/exm=IvlUe,MC8mtf,TJw5qb,Y33vzc,cdos,cr,csi,d,hsm,iDPoPb,jsa,mvYTse,tg8oTe/ed=1/dg=2/ct=zgms/rs=ACT90oF5ZCegqRRNj5lW6m5Xikc2XMemxw/m=RMhBfe,aa,abd,async,cvn5cb,dv7Bfe,dvl,foot,k27Oqb,kVbfxd,lu,m,mUpTid,mu,sb_wiz,sf,xiqEse,xz7cCd?xjs=s1 200 OK
DEBUG:seleniumwire.proxy.handler:https://www.google.se/xjs/_/js/k=xjs.s.sv.RxrsEIm2nko.O/ck=xjs.s.CIXMlJq8uc4.L.F4.O/am=AAAAAAABAAAAS8DcDQDAfxAA4IISBwAAACBAS1KNBdIICQkBCAAAYBY2CAAB/d=1/exm=IvlUe,MC8mtf,TJw5qb,Y33vzc,cdos,cr,csi,d,hsm,iDPoPb,jsa,mvYTse,tg8oTe/ed=1/dg=2/ct=zgms/rs=ACT90oF5ZCegqRRNj5lW6m5Xikc2XMemxw/m=RMhBfe,aa,abd,async,cvn5cb,dv7Bfe,dvl,foot,k27Oqb,kVbfxd,lu,m,mUpTid,mu,sb_wiz,sf,xiqEse,xz7cCd?xjs=s1 200
DEBUG:seleniumwire.proxy.handler:tracking-protection.cdn.mozilla.net:443 200
INFO:seleniumwire.proxy.handler:Capturing request: https://tracking-protection.cdn.mozilla.net/block-flash-digest256/1496263270
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
INFO:seleniumwire.proxy.handler:Capturing request: https://www.google.se/xjs/_/js/k=xjs.s.sv.RxrsEIm2nko.O/ck=xjs.s.CIXMlJq8uc4.L.F4.O/am=AAAAAAABAAAAS8DcDQDAfxAA4IISBwAAACBAS1KNBdIICQkBCAAAYBY2CAAB/d=1/exm=IvlUe,MC8mtf,RMhBfe,TJw5qb,Y33vzc,aa,abd,async,cdos,cr,csi,cvn5cb,d,dv7Bfe,dvl,foot,hsm,iDPoPb,jsa,k27Oqb,kVbfxd,lu,m,mUpTid,mu,mvYTse,sb_wiz,sf,tg8oTe,xiqEse,xz7cCd/ed=1/dg=2/ct=zgms/rs=ACT90oF5ZCegqRRNj5lW6m5Xikc2XMemxw/m=MkHyGd,OG6ZHd,RqxLvf,rHjpXd,uiNkee?xjs=s2
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
INFO:seleniumwire.proxy.handler:Capturing request: https://www.google.se/gen_204?atyp=i&ei=pZ0WX8HANLCWlwTAzqPoAQ&vet=10ahUKEwiBp5C47d3qAhUwy4UKHUDnCB0QsmQIFQ..s&zx=1595317671451
INFO:seleniumwire.proxy.handler:Capturing response: https://tracking-protection.cdn.mozilla.net/block-flash-digest256/1496263270 200 OK
DEBUG:seleniumwire.proxy.handler:https://tracking-protection.cdn.mozilla.net/block-flash-digest256/1496263270 200
DEBUG:seleniumwire.proxy.handler:tracking-protection.cdn.mozilla.net:443 200
INFO:seleniumwire.proxy.handler:Capturing request: https://tracking-protection.cdn.mozilla.net/except-flash-digest256/1494877265
INFO:seleniumwire.proxy.handler:Capturing response: https://tracking-protection.cdn.mozilla.net/except-flash-digest256/1494877265 200 OK
DEBUG:seleniumwire.proxy.handler:https://tracking-protection.cdn.mozilla.net/except-flash-digest256/1494877265 200
DEBUG:seleniumwire.proxy.handler:tracking-protection.cdn.mozilla.net:443 200
INFO:seleniumwire.proxy.handler:Capturing response: https://www.google.se/gen_204?atyp=i&ei=pZ0WX8HANLCWlwTAzqPoAQ&vet=10ahUKEwiBp5C47d3qAhUwy4UKHUDnCB0QsmQIFQ..s&zx=1595317671451 204 No Content
INFO:seleniumwire.proxy.handler:Capturing request: https://tracking-protection.cdn.mozilla.net/block-flashsubdoc-digest256/1512160865
DEBUG:seleniumwire.proxy.handler:https://www.google.se/gen_204?atyp=i&ei=pZ0WX8HANLCWlwTAzqPoAQ&vet=10ahUKEwiBp5C47d3qAhUwy4UKHUDnCB0QsmQIFQ..s&zx=1595317671451 204
INFO:seleniumwire.proxy.handler:Capturing response: https://www.google.se/xjs/_/js/k=xjs.s.sv.RxrsEIm2nko.O/ck=xjs.s.CIXMlJq8uc4.L.F4.O/am=AAAAAAABAAAAS8DcDQDAfxAA4IISBwAAACBAS1KNBdIICQkBCAAAYBY2CAAB/d=1/exm=IvlUe,MC8mtf,RMhBfe,TJw5qb,Y33vzc,aa,abd,async,cdos,cr,csi,cvn5cb,d,dv7Bfe,dvl,foot,hsm,iDPoPb,jsa,k27Oqb,kVbfxd,lu,m,mUpTid,mu,mvYTse,sb_wiz,sf,tg8oTe,xiqEse,xz7cCd/ed=1/dg=2/ct=zgms/rs=ACT90oF5ZCegqRRNj5lW6m5Xikc2XMemxw/m=MkHyGd,OG6ZHd,RqxLvf,rHjpXd,uiNkee?xjs=s2 200 OK
DEBUG:seleniumwire.proxy.handler:https://www.google.se/xjs/_/js/k=xjs.s.sv.RxrsEIm2nko.O/ck=xjs.s.CIXMlJq8uc4.L.F4.O/am=AAAAAAABAAAAS8DcDQDAfxAA4IISBwAAACBAS1KNBdIICQkBCAAAYBY2CAAB/d=1/exm=IvlUe,MC8mtf,RMhBfe,TJw5qb,Y33vzc,aa,abd,async,cdos,cr,csi,cvn5cb,d,dv7Bfe,dvl,foot,hsm,iDPoPb,jsa,k27Oqb,kVbfxd,lu,m,mUpTid,mu,mvYTse,sb_wiz,sf,tg8oTe,xiqEse,xz7cCd/ed=1/dg=2/ct=zgms/rs=ACT90oF5ZCegqRRNj5lW6m5Xikc2XMemxw/m=MkHyGd,OG6ZHd,RqxLvf,rHjpXd,uiNkee?xjs=s2 200
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
DEBUG:urllib3.connectionpool:http://127.0.0.1:49162 "POST /session/62474102-652e-45f8-b07f-258257a2f82b/url HTTP/1.1" 200 14
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:49162/session/62474102-652e-45f8-b07f-258257a2f82b/element {"using": "css selector", "value": "[name=\"q\"]"}
DEBUG:seleniumwire.proxy.handler:adservice.google.se:443 200
DEBUG:seleniumwire.proxy.handler:ogs.google.se:443 200
INFO:seleniumwire.proxy.handler:Capturing request: https://www.google.se/complete/search?q&cp=0&client=psy-ab&xssi=t&gs_ri=gws-wiz&hl=sv&authuser=0&dpr=1&nolsbt=1
DEBUG:urllib3.connectionpool:http://127.0.0.1:49162 "POST /session/62474102-652e-45f8-b07f-258257a2f82b/element HTTP/1.1" 200 88
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:49162/session/62474102-652e-45f8-b07f-258257a2f82b/element/ddbb8c03-675f-4477-9b28-264335dede39/click {"id": "ddbb8c03-675f-4477-9b28-264335dede39"}
INFO:seleniumwire.proxy.handler:Capturing request: https://www.google.se/gen_204?atyp=csi&ei=pZ0WX8HANLCWlwTAzqPoAQ&s=webhp&t=all&bl=dOFG&imn=3&adh=&ima=1&imad=0&ime=1&imex=1&imeh=2&imea=0&imeb=0&wh=665&scp=0&sto=&sys=hc.4&rt=aft.2854,prt.1829,iml.2854,dcl.1864,xjsls.1911,xjses.3541,xjsee.3605,xjs.3605,ol.4280,wsrt.16,cst.0,dnst.0,rqst.1780,rspt.1774,sslt.10,rqstt.10,unt.2,cstt.10,dit.1868&zx=1595317671621
INFO:seleniumwire.proxy.handler:Capturing response: https://tracking-protection.cdn.mozilla.net/block-flashsubdoc-digest256/1512160865 200 OK
DEBUG:seleniumwire.proxy.handler:https://tracking-protection.cdn.mozilla.net/block-flashsubdoc-digest256/1512160865 200
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
DEBUG:seleniumwire.proxy.handler:tracking-protection.cdn.mozilla.net:443 200
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
INFO:seleniumwire.proxy.handler:Capturing response: https://www.google.se/gen_204?atyp=csi&ei=pZ0WX8HANLCWlwTAzqPoAQ&s=webhp&t=all&bl=dOFG&imn=3&adh=&ima=1&imad=0&ime=1&imex=1&imeh=2&imea=0&imeb=0&wh=665&scp=0&sto=&sys=hc.4&rt=aft.2854,prt.1829,iml.2854,dcl.1864,xjsls.1911,xjses.3541,xjsee.3605,xjs.3605,ol.4280,wsrt.16,cst.0,dnst.0,rqst.1780,rspt.1774,sslt.10,rqstt.10,unt.2,cstt.10,dit.1868&zx=1595317671621 204 No Content
DEBUG:seleniumwire.proxy.handler:https://www.google.se/gen_204?atyp=csi&ei=pZ0WX8HANLCWlwTAzqPoAQ&s=webhp&t=all&bl=dOFG&imn=3&adh=&ima=1&imad=0&ime=1&imex=1&imeh=2&imea=0&imeb=0&wh=665&scp=0&sto=&sys=hc.4&rt=aft.2854,prt.1829,iml.2854,dcl.1864,xjsls.1911,xjses.3541,xjsee.3605,xjs.3605,ol.4280,wsrt.16,cst.0,dnst.0,rqst.1780,rspt.1774,sslt.10,rqstt.10,unt.2,cstt.10,dit.1868&zx=1595317671621 204
INFO:seleniumwire.proxy.handler:Capturing response: https://www.google.se/complete/search?q&cp=0&client=psy-ab&xssi=t&gs_ri=gws-wiz&hl=sv&authuser=0&dpr=1&nolsbt=1 200 OK
DEBUG:seleniumwire.proxy.handler:https://www.google.se/complete/search?q&cp=0&client=psy-ab&xssi=t&gs_ri=gws-wiz&hl=sv&authuser=0&dpr=1&nolsbt=1 200
DEBUG:urllib3.connectionpool:http://127.0.0.1:49162 "POST /session/62474102-652e-45f8-b07f-258257a2f82b/element/ddbb8c03-675f-4477-9b28-264335dede39/click HTTP/1.1" 200 14
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:49162/session/62474102-652e-45f8-b07f-258257a2f82b/element/ddbb8c03-675f-4477-9b28-264335dede39/value {"text": "test", "value": ["t", "e", "s", "t"], "id": "ddbb8c03-675f-4477-9b28-264335dede39"}
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
DEBUG:urllib3.connectionpool:http://127.0.0.1:49162 "POST /session/62474102-652e-45f8-b07f-258257a2f82b/element/ddbb8c03-675f-4477-9b28-264335dede39/value HTTP/1.1" 200 14
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:49162/session/62474102-652e-45f8-b07f-258257a2f82b/element {"using": "css selector", "value": "[name=\"q\"]"}
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
DEBUG:urllib3.connectionpool:http://127.0.0.1:49162 "POST /session/62474102-652e-45f8-b07f-258257a2f82b/element HTTP/1.1" 200 88
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:49162/session/62474102-652e-45f8-b07f-258257a2f82b/element/ddbb8c03-675f-4477-9b28-264335dede39/value {"text": "\ue007", "value": ["\ue007"], "id": "ddbb8c03-675f-4477-9b28-264335dede39"}
DEBUG:urllib3.connectionpool:http://127.0.0.1:49162 "POST /session/62474102-652e-45f8-b07f-258257a2f82b/element/ddbb8c03-675f-4477-9b28-264335dede39/value HTTP/1.1" 200 14
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:seleniumwire.proxy.handler:www.google.se:443 200
DEBUG:seleniumwire.proxy.handler:[WinError 10053] An established connection was aborted by the software in your host machine
DEBUG:seleniumwire.proxy.handler:http://seleniumwire/requests 200
http://ocsp.digicert.com/
https://tracking-protection.cdn.mozilla.net/social-track-digest256/1594235398
http://detectportal.firefox.com/success.txt
http://detectportal.firefox.com/success.txt?ipv4
http://detectportal.firefox.com/success.txt?ipv6
https://www.google.se/
https://tracking-protection.cdn.mozilla.net/analytics-track-digest256/1589483333
https://tracking-protection.cdn.mozilla.net/content-track-digest256/1594235398
https://snippets.cdn.mozilla.net/6/Firefox/78.0.2/20200708170202/WINNT_x86_64-msvc/en-US/release/Windows_NT%2010.0/default/default/
https://www.google.se/tia/tia.png
https://consent.google.com/status?continue=https://www.google.se&m=0&pc=s&timestamp=1595317669&gl=SE
https://ssl.gstatic.com/gb/images/i1_1967ca6a.png
https://www.google.se/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png
https://www.gstatic.com/inputtools/images/tia.png
https://www.google.se/images/nav_logo299.webp
https://www.google.se/images/searchbox/desktop_searchbox_sprites302_hr.webp
https://tracking-protection.cdn.mozilla.net/mozstd-trackwhite-digest256/1589483333
https://snippets.cdn.mozilla.net/us-west/bundles-pregen/Firefox/release/en-us/default.json
https://www.gstatic.com/og/_/js/k=og.og2.en_US.tLR_BeNISzk.O/rt=j/m=def,aswid/exm=in,fot/d=1/ed=1/rs=AA2YrTswuefJcCFIbqItJ5vfQESOqkgl3g
https://www.google.se/xjs/_/js/k=xjs.s.sv.RxrsEIm2nko.O/ck=xjs.s.CIXMlJq8uc4.L.F4.O/m=IvlUe,MC8mtf,TJw5qb,Y33vzc,cdos,cr,hsm,iDPoPb,jsa,mvYTse,tg8oTe,d,csi/am=AAAAAAABAAAAS8DcDQDAfxAA4IISBwAAACBAS1KNBdIICQkBCAAAYBY2CAAB/d=1/dg=2/ct=zgms/rs=ACT90oF5ZCegqRRNj5lW6m5Xikc2XMemxw
https://www.google.se/gen_204?s=webhp&t=aft&atyp=csi&ei=pZ0WX8HANLCWlwTAzqPoAQ&rt=wsrt.16,aft.2854,prt.1829&bl=dOFG&ima=1&imad=0&imn=3
http://detectportal.firefox.com/success.txt
https://tracking-protection.cdn.mozilla.net/google-trackwhite-digest256/1591202430
http://detectportal.firefox.com/success.txt?ipv4
http://detectportal.firefox.com/success.txt?ipv6
https://www.google.se/xjs/_/js/k=xjs.s.sv.RxrsEIm2nko.O/ck=xjs.s.CIXMlJq8uc4.L.F4.O/am=AAAAAAABAAAAS8DcDQDAfxAA4IISBwAAACBAS1KNBdIICQkBCAAAYBY2CAAB/d=1/exm=IvlUe,MC8mtf,TJw5qb,Y33vzc,cdos,cr,csi,d,hsm,iDPoPb,jsa,mvYTse,tg8oTe/ed=1/dg=2/ct=zgms/rs=ACT90oF5ZCegqRRNj5lW6m5Xikc2XMemxw/m=RMhBfe,aa,abd,async,cvn5cb,dv7Bfe,dvl,foot,k27Oqb,kVbfxd,lu,m,mUpTid,mu,sb_wiz,sf,xiqEse,xz7cCd?xjs=s1
https://www.google.se/favicon.ico
https://apis.google.com/_/scs/abc-static/_/js/k=gapi.gapi.en.ZR5MgddWeJU.O/m=gapi_iframes,googleapis_client,plusone/rt=j/sv=1/d=1/ed=1/am=AAY/rs=AHpOoo-4Z3ZFsIV5SfJ3ya7-4n9QA-0-og/cb=gapi.loaded_0
https://tracking-protection.cdn.mozilla.net/allow-flashallow-digest256/1490633678
https://tracking-protection.cdn.mozilla.net/except-flashallow-digest256/1490633678
https://tracking-protection.cdn.mozilla.net/block-flash-digest256/1496263270
https://www.google.se/xjs/_/js/k=xjs.s.sv.RxrsEIm2nko.O/ck=xjs.s.CIXMlJq8uc4.L.F4.O/am=AAAAAAABAAAAS8DcDQDAfxAA4IISBwAAACBAS1KNBdIICQkBCAAAYBY2CAAB/d=1/exm=IvlUe,MC8mtf,RMhBfe,TJw5qb,Y33vzc,aa,abd,async,cdos,cr,csi,cvn5cb,d,dv7Bfe,dvl,foot,hsm,iDPoPb,jsa,k27Oqb,kVbfxd,lu,m,mUpTid,mu,mvYTse,sb_wiz,sf,tg8oTe,xiqEse,xz7cCd/ed=1/dg=2/ct=zgms/rs=ACT90oF5ZCegqRRNj5lW6m5Xikc2XMemxw/m=MkHyGd,OG6ZHd,RqxLvf,rHjpXd,uiNkee?xjs=s2
https://www.google.se/gen_204?atyp=i&ei=pZ0WX8HANLCWlwTAzqPoAQ&vet=10ahUKEwiBp5C47d3qAhUwy4UKHUDnCB0QsmQIFQ..s&zx=1595317671451
https://tracking-protection.cdn.mozilla.net/except-flash-digest256/1494877265
https://tracking-protection.cdn.mozilla.net/block-flashsubdoc-digest256/1512160865
https://www.google.se/complete/search?q&cp=0&client=psy-ab&xssi=t&gs_ri=gws-wiz&hl=sv&authuser=0&dpr=1&nolsbt=1
https://www.google.se/gen_204?atyp=csi&ei=pZ0WX8HANLCWlwTAzqPoAQ&s=webhp&t=all&bl=dOFG&imn=3&adh=&ima=1&imad=0&ime=1&imex=1&imeh=2&imea=0&imeb=0&wh=665&scp=0&sto=&sys=hc.4&rt=aft.2854,prt.1829,iml.2854,dcl.1864,xjsls.1911,xjses.3541,xjsee.3605,xjs.3605,ol.4280,wsrt.16,cst.0,dnst.0,rqst.1780,rspt.1774,sslt.10,rqstt.10,unt.2,cstt.10,dit.1868&zx=1595317671621
@P-Leo10
Copy link

P-Leo10 commented Jul 21, 2020

i have the same problem but i´m using Chrome

@wkeeling
Copy link
Owner

@javo222 thanks for this.

Selenium Wire works by transparently configuring the browser to point at Selenium Wire's own proxy server. That proxy server (running on 127.0.0.1:49818 in your example above) is used to capture requests made by the browser whilst Selenium Wire is running. After Selenium Wire ends, it shuts down its proxy server because it thinks it's done. However, if the browser is left open (which seems to be the case in your example above), the browser will still be pointing at the proxy server. Trying to use the browser will not work, because the proxy server has now gone away with the shutdown of Selenium Wire.

If you wish to manually interact with the browser, you'll need to keep Selenium Wire running by ensuring that your program does not end. You could potentially use a time.sleep() for that, or perhaps some other mechanism such as input().

@javo222
Copy link
Author

javo222 commented Jul 21, 2020

It works fine thank you!
I added this line in the end:
value = input("SCRIPT ENDED\n")

I'm sorry if I missed this in the documentation, or maybe it isn't there?

@javo222 javo222 closed this as completed Jul 21, 2020
@PoeLoren
Copy link

I met the same issue once open the page instead of selenium wire ends. Any suggestions?

@yeyuchen198
Copy link

'input("SCRIPT END")'works for me, thanks a lot! Both selenium-wire and undetected_chromedriver, this way works well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants