(Created on )

Puppeteer: Response is missing for the interception

Cooperative interception selected respond but has no response payload.


Cooperative interception selected respond but has no response payload.

Error message

Response is missing for the interception

How this error happens

Cooperative interception needs a response payload when its selected action is respond. Passing null leaves that payload missing.

The snippets use an open Chrome/CDP page named page.

await page.setRequestInterception(
    true
);

page.on("request", async (request) => {
    await request.respond(
        null,
        0
    );
});

await page.goto(
    "https://example.com/"
);

How to fix

Pass a response object. Check shared-listener ownership before selecting a response.

await page.setRequestInterception(
    true
);

page.on("request", async (request) => {
    if (request.isInterceptResolutionHandled()) {
        return;
    }

    await request.respond(
        {
            status: 200,
            contentType: "text/html",
            body: "<p>Mock response</p>",
        },
        0
    );
});

await page.goto(
    "https://example.com/"
);

Things to keep in mind

The intentionally invalid null argument is JavaScript; TypeScript should reject it. Depending on interception mode, invalid payloads can fail before cooperative finalization reaches this exact message.

All Puppeteer errors

Keep Reading

Puppeteer Guides

All Guides →