New issue
Advanced search Search tips

Issue 847015 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 811385
Owner:
Closed: Jan 10
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

setRequestInterception don't send events when Debugger events are enable

Reported by chevalie...@gmail.com, May 26 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/66.0.3359.139 Chrome/66.0.3359.139 Safari/537.36

Steps to reproduce the problem:
1. Start chrome in headless mode:
chromium-browser --remote-debugging-port=9999 --user-data-dir=/tmp/dd19 --no-first-run --headless
2. Execute the following script (uses chrome_devtools python dependancy):
import chrome_devtools
import time

debug_host = '127.0.0.1'
debug_port = 9999

debugger = chrome_devtools.ChromeInterface(host=debug_host, port=debug_port)
debugger.Network.enable()
debugger.Page.enable()
debugger.Debugger.enable()

debugger.Runtime.evaluate(expression='window.location="http://www.ostorlab.co"')
time.sleep(3)

javascript = "function simulateEvent() {var event = new MouseEvent('click');var cb = document.querySelectorAll('#banner > div:nth-child(1) > div > div:nth-child(3) > span > a'); var cancelled = !cb[0].dispatchEvent(event);}simulateEvent()"

debugger.Network.setRequestInterception(patterns=[{'urlPattern': 'http://*', 'urlPattern': 'https://*'}])

debugger.Runtime.evaluate(expression=javascript)

for i in range(10):
    print(debugger.wait_event('Network.requestIntercepted'))

3. Comment the line debugger.Debugger.enable() and run the script again.

What is the expected behavior?
In both cases the request intercepted event must be sent, it is triggered only when debugger is disabled.

What went wrong?
Enable debugger events causes request interception to fail. Other variants of this script don't trigger the bug.

Did this work before? N/A 

Chrome version: 66.0.3359.139  Channel: stable
OS Version: 
Flash Version:
 
Labels: Needs-Triage-M66
Owner: caseq@chromium.org
Status: Assigned (was: Unconfirmed)
Mergedinto: 811385
Status: Duplicate (was: Assigned)
I think this was another manifestation of  issue 811385  and should be fixed by now. Feel free to re-open if it happens again.

Sign in to add a comment