CSS.enable with request interceptor stops execution
See original GitHub issueHello. I found an error while recording coverage and tracing data. The puppeteer stops at the CDP call “CSS.enable” and cannot continue execution if the request interceptor was previously enabled.
Code to reproduce the bug:
const puppeteer = require('puppeteer');
const test = async () => {
const browser = await puppeteer.launch({});
const page = await browser.newPage();
// if you remove the interceptor, the bug will not be reproduced
await page.setRequestInterception(true);
page.on('request', (interceptedRequest) => {
interceptedRequest.continue();
});
await page.tracing.start({});
await page.coverage.startCSSCoverage(); // <-- stayed here
await page.goto('https://google.com');
await page.coverage.stopCSSCoverage();
await page.tracing.stop();
};
test();
- Puppeteer version: 2.0.0
- Platform / OS version: Windows 10 or MacOS 10.14.6
- Node.js version: 10.15.1, 12.13.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:6 (1 by maintainers)
Top Results From Across the Web
CSS.enable with request interceptor stops execution #5141
Hello. I found an error while recording coverage and tracing data. The puppeteer stops at the CDP call “CSS.enable” and cannot continue ...
Read more >Spring MVC Interceptor HandlerInterceptorAdapter ...
The logic is really simple, I am just logging the timings of handler method execution and total time taken in processing the request...
Read more >Intercepting JavaScript Fetch API requests and responses
We demonstrate intercepting JavaScript Fetch API calls using monkey patching and the fetch-intercept library.
Read more >Cypress cy.intercept Problems - Gleb Bahmutov
The command cy.intercept can match requests using a substring, a minimatch, or a regular expression. By default, it intercepts requests matching ...
Read more >Display a loader on every HTTP request using Interceptor in ...
After making a http request, some actions need navigation to a new page, the loader will stop when the http request finalize and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, this workaround works. But in my case, I want to use coverage more than once on one page.
We are closing this issue. If the issue still persists in the latest version of Puppeteer, please reopen the issue and update the description. We will try our best to accomodate it!