Skip to content

[Question] Protocol error (Network.getResponseBody): No resource with given identifier foundError #3617

@oleksii-hryhurko

Description

@oleksii-hryhurko

Hi i am trying to write something like network listener but sometimes i get this error, can you help me solve this problem:
Playwright v. 1.3.0
Code:
page.on('response', response => { if (response.url().endsWith('api/2/json')) { response.body().then(body => { console.log(response.request().postData()) console.log(res.toString()) }) } })
Stacktrace:
Protocol error (Network.getResponseBody): No resource with given identifier foundError: at node_modules/playwright/lib/chromium/crConnection.js:131:63 at CRSession.send (node_modules/playwright/lib/chromium/crConnection.js:130:16) at CRSession.send (node_modules/playwright/lib/helper.js:80:31) at Response.getResponseBody [as _getResponseBodyCallback] (node_modules/playwright/lib/chromium/crNetworkManager.js:218:49) at node_modules/playwright/lib/network.js:233:29

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions