Request is already handled!
See original GitHub issueError Information
Request is already handled!
To Reproduce
describe('Test', () => {
beforeEach(async () => {
jest.setTimeout = 30000;
await page.setRequestInterception(true);
page.on('request', request => {
request.continue();
})
await page.goto('https://www.google.com/');
});
afterEach(async () => {
page.removeListener("request", () => {});
})
it('case1:...', async () => {
await expect(page).toMatch('Google');
})
it('case2:...', async () => {
await expect(page).toMatch('Google');
})
});
Expected behavior
I want to modify some response data in every testcase, so help me plz.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
Node Puppeteer, page.on( "request" ) throw a ... - Stack Overflow
I'm having trouble understanding why the request would be already handled as the actual request page.goto is done while in the for loop....
Read more >Request is already handled · Issue #22 · gajus/puppeteer-proxy
Hi, I'm using below peace of code but I'm getting this error. await page.setRequestInterception(true); page.on("request", async (request) ...
Read more >[help] Puppeteer “Request already handled” : r/node - Reddit
Hey guys! I'm trying to intercept a request in puppeteer. I'm using page.setRequestIntercept and page.on(“request”, request => { // some ...
Read more >Request Interception - Puppeteer
By default Puppeteer will raise a Request is already handled! exception if request.abort , request.continue , or request.respond are called after any of ......
Read more >Enchant-puppeteer - npm.io
Enchant Puppeteer. Charm the mighty Puppeteer into supporting multiple, cooperative request intercept handlers. No more Request is already handled! errors.
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
Looks like this issue should be reopened, it’s a really weird behaviour.
I instead reposted https://github.com/smooth-code/jest-puppeteer/issues/308