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.

Request is already handled!

See original GitHub issue

Error 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:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

5reactions
dfilatovcommented, Nov 11, 2019

Looks like this issue should be reopened, it’s a really weird behaviour.

0reactions
rodoabadcommented, Jan 21, 2020
Read more comments on GitHub >

github_iconTop 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 >

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