Skip to content

'Network.setRequestInterceptionEnabled' wasn't found undefined #1129

@und3fined

Description

@und3fined

Hi there,

Network.setRequestInterceptionEnabled is removed in Chrome DevTools Protocol

I'm tested in HeadlessChrome/64.0.3248.0

Please update puppeteer for new CDP, Thanks.

How to fix?

  • Edit puppeteer/lib/NetworkManager.js
  • Change Network.setRequestInterceptionEnabled to Network.setRequestInterception
async _updateProtocolRequestInterception() {
    const enabled = this._userRequestInterceptionEnabled || !!this._credentials;
    if (enabled === this._protocolRequestInterceptionEnabled) return;
    this._protocolRequestInterceptionEnabled = enabled;
    await this._client.send("Network.setRequestInterception", {
        patterns: [{ urlPattern: '*' }]
    });
}

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