question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Network.requestIntercepted does not intercept requests when chrome is started with a new user-data-dir for the first time

See original GitHub issue

When attempting to run the code from Intercept-and-block-requests-by-URL the first time chrome is started with a new user-data-dir Network.requestIntercepted doesn’t intercept requests. If Chrome is stopped and started again with the same user-data-dir it works as expected. This only happens when not using the --headless flag. When used in conjunction with chrome-launcher it seems as though the code doesn’t work as chrome-launcher creates a new user-data-dir every time. Here is a repo demonstrating this behavior: https://github.com/JarrodCTaylor/cri-request-interception

Component Version
Operating system macOS Sierra 10.12.6
Node.js 8.2.1
Chrome/Chromium/… 61.0.3163.79
chrome-remote-interface 0.24.5

Is Chrome running in a container? NO

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Network.requestIntercepted does not intercept requests when ...
Issue 764505 : Network.requestIntercepted does not intercept requests when chrome is started with a new user-data-dir for the first time.
Read more >
Intercepting and Modifying responses with Chrome via the ...
I've started to use Chrome and its devtools protocol in order to hook into requests and responses as they are happening and modify...
Read more >
Use of Network.setRequestInterception · Issue #31 · RLesur/crrri
I tried to do it this way, but it doesn't seem to work : ... This first creates a promise for intercepted network...
Read more >
Using Network.requestIntercepted with Puppeteer
requestIntercepted and I can't work out why. Any help appreciated. // console command // node chrome-commands.js http://yahoo.com test var ...
Read more >
Diff - 7114a66134..b6ba996636 - chromium/src - Git at Google
Has no effect unless --user-data-dir is also supplied. ... Switch to an existing tab for a suggestion opened from the New Tab Page....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found