New issue
Advanced search Search tips

Issue 811385 link

Starred by 11 users

Issue metadata

Status: Duplicate
Merged: issue 764505
Owner:
Closed: Dec 29
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Network.setRequestInterception stopped working

Reported by valerybu...@gmail.com, Feb 12 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36

Steps to reproduce the problem:
1. In background script of unpacked chrome extension:
  chrome.debugger.attach(debuggee, "1.2", () => {
    chrome.debugger.sendCommand(debuggee, "Network.setRequestInterception", { patterns: [{ urlPattern: "*" }] })
    chrome.debugger.sendCommand(debuggee, "Network.enable")
  })

2. Subscribe to events:
  chrome.debugger.onEvent.addListener((source, method, params) => {
    console.log(method)
  })

3. Navigate to localhost for example.
4. Notice that only Network events are logged, without any Interception events.

What is the expected behavior?
Interception events are emitted along with Network events.

What went wrong?
No observed Interception events.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 64.0.3282.140  Channel: stable
OS Version: OS X 10.13.2
Flash Version: 

It worked for me a couple of weeks ago, not sure if API just changed with Chrome update or something else. Couldn't find any info about that.
 
Probably component for this issue should be Platform>DevTools>Platform, but I cannot find a way to change it.

Cc: ellyjo...@chromium.org
Components: -Blink>Network Platform>Apps>DevTools
Labels: Needs-Bisect Needs-Triage-M64
Cc: -ellyjo...@chromium.org
Components: -Platform>Apps>DevTools Platform>DevTools>Network
Owner: caseq@chromium.org
Status: Assigned (was: Unconfirmed)
valery, could you help us out and create a small standalone extension with these calls in it?

Comment 4 by caseq@chromium.org, Feb 12 2018

I just tried it on m64 and it works for me.
Labels: Triaged-ET Needs-Feedback
valerybugakov@ Thanks for the issue.

As per comment #3, adding Needs-Feedback label.
Please provide sample extension which will help in further triaging of the issue.

Thanks..
Hello, I'm sorry to see this kind of bugs not yet fixed. 

Please, consider that it actually broke all scripts using requestIntercepted.

If you need a node test script, here's attached.

Thanks
test_no_request_interception.js
1.0 KB View Download

Comment 7 by caseq@chromium.org, Feb 25 2018

I don't see how the script at #6 is supposed to work on any version, given is awaits requestIntercepted (line 24) before it performs any network activity (line #34).

@caseq 

requestIntercepted is a devtools protocol method, it registers a callback to be called whenever a network request is going to be performed. 

Anyway, it is supposed to work because with protocol 1.2 it worked on previous chromium versions-according to method name changes etc. 

It turns out that now you need to add :
chromeFlags: [
      "--test-type"
    ]

in order for the previous script to work - test_no_request_interception.js. 
Attaching the new script wich works.

I'm sorry but it's really frustrating and time consuming to keep up with all these frequent breaking changes with Devtools and Google Chrome.
test_with_option.js
1.1 KB View Download
Project Member

Comment 9 by bugdroid1@chromium.org, Dec 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4c806b8b802c5bcd93831229bedd8164d8a68a26

commit 4c806b8b802c5bcd93831229bedd8164d8a68a26
Author: Andrey Kosyakov <caseq@chromium.org>
Date: Fri Dec 28 20:17:50 2018

DevTools: enable only one DevToolsURLRequestInterceptor per BrowserContext

Bug:  811385 , 764505 
Change-Id: I924aa64f71b2012f21ce0dc7e309cf354bbeb6e4
Reviewed-on: https://chromium-review.googlesource.com/c/1391678
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619186}
[modify] https://crrev.com/4c806b8b802c5bcd93831229bedd8164d8a68a26/content/browser/devtools/devtools_url_request_interceptor.cc
[modify] https://crrev.com/4c806b8b802c5bcd93831229bedd8164d8a68a26/content/browser/devtools/devtools_url_request_interceptor.h
[modify] https://crrev.com/4c806b8b802c5bcd93831229bedd8164d8a68a26/content/browser/storage_partition_impl_map.cc

Mergedinto: 764505
Status: Duplicate (was: Assigned)
Cc: caseq@chromium.org
 Issue 847015  has been merged into this issue.
Cc: dgozman@chromium.org
 Issue 820332  has been merged into this issue.
Issue 836423 has been merged into this issue.

Sign in to add a comment