Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Replace the deprecated Network interception flow with Fetch. Call Fetch.enable, listen for Fetch.requestPaused, and finish every pause with exactly one of Fetch.continueRequest, Fetch.fulfillRequest, or Fetch.failRequest. Use the Fetch requestId, install the listener before navigation, and ensure only one interception owner is attached to the target.

Why Network.setRequestInterception fails

The command is deprecated

Network.setRequestInterception is an experimental, deprecated Chrome DevTools Protocol (CDP) command. Chromium’s protocol definition says: “Deprecated, please use Fetch.enable instead.” A wrapper may still expose the old method, but a current browser or generated client can reject it as unknown, silently fail to provide the events you expect, or behave differently from older examples.

The old event and command belong to the same legacy family

Migration is not just a one-line replacement. The legacy Network.requestIntercepted event and Network.continueInterceptedRequest command are deprecated too. Mixing a legacy event with Fetch commands, or a Fetch event with a legacy command, gives you the wrong identifier and can produce invalid-parameter errors or an interception that never completes.

A paused request blocks the page

After Fetch pauses a request, Chrome waits for your client. If a handler throws, no listener is attached, a URL branch does not match your assumptions, or a code path returns without replying, that request remains paused. The visible symptom is often a page that loads forever rather than a clear interception error.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Two consumers can steal each other’s events

Do not run independent interception owners on one target. A setup in which one process consumes Fetch.requestPaused while another expects Network.requestIntercepted can leave the second process with no events. Coordinate interception through one CDP session and one handler, or explicitly divide responsibility at a higher level.

The supported Fetch interception flow

Stage What to use Required decision
Enable Fetch.enable Provide an array of request patterns, or omit patterns to affect all requests according to Fetch behavior.
Event Fetch.requestPaused Read the event’s Fetch requestId and request details.
Allow Fetch.continueRequest Use for traffic that should proceed, optionally with request changes supported by Fetch.
Replace Fetch.fulfillRequest Return a synthetic response instead of contacting the origin.
Block Fetch.failRequest Terminate a request intentionally with a valid Fetch error reason.
Authentication Fetch.continueWithAuth Respond to authentication challenges when authentication handling is enabled.

The invariant is simple: each Fetch.requestPaused event must reach one completion command. Never pass a legacy Network interceptionId to a Fetch method.

Step-by-step migration from Network to Fetch

  1. Create one CDP session for the target. Keep the event listener and every Fetch command on that same session.
  2. Register the listener before navigation. Attach it before opening the page or performing any action that creates requests.
  3. Enable Fetch with matching patterns. Each pattern is a Fetch.RequestPattern object with urlPattern and optional resourceType and requestStage.
  4. Handle every pause. Continue ordinary requests, fail the ones you block, or fulfill those you replace.
  5. Contain handler failures. Log exceptions and apply a recovery policy so an exception cannot leave a request paused indefinitely.
  6. Remove competing interception code. Search for old Network listeners and commands in wrappers, plugins, and other processes attached to the same target.

Minimal raw CDP example

const cdp = await page.target().createCDPSession();

await cdp.send('Fetch.enable', {
  patterns: [{
    urlPattern: '*',
    requestStage: 'Request'
  }]
});

cdp.on('Fetch.requestPaused', async event => {
  try {
    const { requestId, request } = event;

    if (request.url.includes('/blocked-endpoint')) {
      await cdp.send('Fetch.failRequest', {
        requestId,
        errorReason: 'BlockedByClient'
      });
      return;
    }

    await cdp.send('Fetch.continueRequest', { requestId });
  } catch (error) {
    // Log the error and ensure your production code has a recovery policy.
    console.error('Fetch interception handler failed', error);
  }
});

The listener is attached before navigation, and the handler uses the requestId supplied by Fetch.requestPaused. The block branch sends Fetch.failRequest; every other branch sends Fetch.continueRequest.

Choosing a request pattern

Start with a narrow pattern when debugging. For example, a URL pattern for one host or path reduces noise and makes it easier to verify that the event is firing. Add resourceType when only documents, scripts, images, or another resource class matters. Add requestStage: 'Response' only when you need to inspect or replace a response; request-stage interception is sufficient for URL blocking and request edits.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Handling redirects, authentication, and response interception

Redirects

Treat each paused hop as its own event and use the identifier from that event. Do not cache one identifier and reuse it across a redirect chain. Continue or terminate each hop before waiting for the next.

Authentication challenges

When authentication is enabled and Chrome emits Fetch.authRequired, answer it with Fetch.continueWithAuth. A normal Fetch.continueRequest is not a substitute for an authentication response.

Response-stage work

To inspect or replace a response, enable a pattern with requestStage: 'Response'. Response-body operations are limited to a request paused at the response stage. A request paused at the initial request stage does not provide the same response data, so enabling the wrong stage is a common reason body-inspection code appears not to work.

Diagnosing common errors

“Unknown command” or “method not found”

Your browser target may expose an older or mismatched protocol, or your wrapper may rename or omit methods. Check the browser’s reported protocol version and the client library’s generated CDP API. If the client still calls Network.setRequestInterception, update the wrapper or use its Fetch-domain API. Do not assume that a method shown in an old blog post is available in the target you actually connected to.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

“Invalid parameters”

Verify that Fetch.enable receives an array of pattern objects, not a single object or a Network-domain pattern. Check spelling and casing for urlPattern, resourceType, and requestStage. Also confirm that the URL pattern matches the real request URL. A pattern that never matches can look like a broken event listener.

The handler never fires

  • Attach the listener before navigation or the action that creates the request.
  • Confirm that the listener is on the same CDP session that called Fetch.enable.
  • Temporarily use a broad pattern such as * to distinguish pattern mistakes from session mistakes.
  • Remove a second interception consumer that may be attached to the same target.
  • Log the complete event object while diagnosing, then narrow logging after the flow works.

The page loads forever

Find the paused request that has no completion command. Every handler branch must end with Fetch.continueRequest, Fetch.fulfillRequest, or Fetch.failRequest. Add a try/catch around asynchronous handler code and log failures. Avoid early returns before the completion call, including returns inside URL or resource-type conditionals.

It works once, then stalls on later requests

This usually indicates state that is reused incorrectly: a stale request identifier, a handler that only handles the first matching URL, or a competing consumer that receives subsequent events. Treat each event independently and use its own Fetch requestId.

Reliability and performance considerations

Keep the interception scope small

Pausing every request gives maximum control but increases handler traffic and the chance that an unrelated request exposes a bug. Use URL and resource-type patterns for production rules that target a known subset. Broaden the pattern only while troubleshooting or when the policy genuinely applies to all traffic.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Make completion deterministic

Do not perform unbounded work while a request is paused. If your policy needs asynchronous lookups, set an application timeout and choose a fallback action. A deterministic continue or fail decision is safer than leaving Chrome waiting for an external service.

Log identifiers and decisions

For each event, log the request URL, Fetch requestId, selected action, and any exception. This lets you distinguish a missing event from an event that was received but never completed. Remove sensitive headers and credentials from logs.

Coordinate ownership

One target should have one clearly owned interception pipeline. If a test runner, browser automation framework, and diagnostic tool all want interception, route their policies through one handler rather than enabling separate consumers.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Migration checklist

  • Replace Network.setRequestInterception with Fetch.enable.
  • Replace Network.requestIntercepted listeners with Fetch.requestPaused.
  • Replace Network.continueInterceptedRequest with Fetch.continueRequest, Fetch.fulfillRequest, or Fetch.failRequest.
  • Use Fetch’s requestId, never the legacy Network interception identifier.
  • Install the listener before navigation.
  • Resolve every pause, including error and authentication paths.
  • Use response-stage interception only for response work.
  • Remove or coordinate any second interception consumer attached to the target.

Or skip the browser setup

If your goal is a clean image or PDF of a page rather than request-level control, ScreenshotNeo returns a capture from one HTTP request. It accepts cookie and consent banners like a visitor, then removes more than 60 known consent platforms, newsletter popups, and chat widgets before the shot. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed; the response identifies the result with X-Page-Verdict and X-Billed headers. ScreenshotNeo also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

See the parameter reference in the ScreenshotNeo documentation. cURL:

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

There is a free plan with 1,000 screenshots per month and no card. Paid plans start at $5 for 3,000 screenshots. Create a free ScreenshotNeo account to try it.

FAQ

Frequently Asked Questions

Can I keep Network.enable while migrating to Fetch?

Yes. Network-domain telemetry can coexist with Fetch interception, but the interception decision must come from the Fetch handler. Do not keep legacy Network interception commands or listeners active.

Which Fetch action should I use for a blocked URL?

Use Fetch.failRequest with an appropriate error reason when the request should terminate. Use Fetch.fulfillRequest only when you intentionally want to return a synthetic response.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why does response-body code fail at request stage?

Response-body methods require a request paused at the response stage. Enable a matching pattern with requestStage set to Response before attempting response inspection.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.