---
title: "Reproduce a failed third-party script by blocking its URL | Proofline"
description: "A page that breaks for only some users may depend on a script from another domain that failed to load for them."
url: https://proofline.sh/learn/block-request-repro/
---

[Learning center](/learn/)

# Reproduce a failed third-party script by blocking its URL

A page that breaks for only some users may depend on a script from another domain that failed to load for them. A content blocker removed it, a corporate proxy refused it, or the vendor's CDN was down. The maintainer's browser loads it fine. Blocking that one URL makes the failure replay on any machine, and the result shows whether the page degrades or breaks.

Broken dependencies The Proofline team November 22, 2026 3 min read

## Find the request that failed

In the reporter's Network panel, filter by the third-party domain or sort by status. A request that never got a response shows a status such as `(blocked:other)`, `(failed)` or `(canceled)`. [A request with no status code](/learn/failed-request-no-status/) explains each. Copy the request's full URL and the initiator, from the **Initiator** column, which tells the maintainer which code depended on it.

If the reporter cannot open DevTools, ask whether they use a content blocker, a VPN or a work network, and whether the page works in a window with extensions off. [Works in incognito](/learn/works-in-incognito/) covers that split.

## Block it in DevTools

1.  Right-click the request in the Network panel and choose **Block request URL** or **Block request domain**.
2.  Or open the **Network request blocking** drawer tab, enable it, and add a pattern such as `*analytics.example-cdn.test/*`.
3.  Reload and reproduce.

[Chrome DevTools: Block requests](https://developer.chrome.com/docs/devtools/network-request-blocking)

## Block it in a script

Playwright can fail matching requests from a route handler. It works in all three engines:

```
await page.route('**/analytics.example-cdn.test/**', route => route.abort());
await page.goto('https://staging.example.test/checkout');
```

In Chromium, the DevTools Protocol's `Network.setBlockedURLs` blocks requests the way the DevTools drawer does. We tried both against a fixture. The route's abort failed the request with `net::ERR_FAILED`. The protocol's blocking reported no error text and a blocked reason of `inspector`. Neither matches an extension's block exactly, which Chrome reports as `net::ERR_BLOCKED_BY_CLIENT`, but the page's code sees the same thing in each case: the script or request did not load. [Playwright: `route.abort()`](https://playwright.dev/docs/api/class-route#route-abort)

`route.abort()` takes an error code, such as `route.abort('blockedbyclient')` or `route.abort('timedout')`, if the page's handling differs by error.

## Test the failure modes that differ

A third-party resource can fail in more than one way, and pages often handle only one.

| Failure | How to reproduce | What the page sees |
| --- | --- | --- |
| Blocked or refused | `route.abort()` | An error event on the script, or a rejected `fetch` |
| Slow, then times out | A route that waits before `route.abort('timedout')` | Nothing for a long time, then an error |
| Loads, but returns an error page | `route.fulfill({ status: 503, body: '' })` | The script element loads nothing useful; a global the page expects is missing |
| Loads an older or different version | `route.fulfill({ path: 'old-vendor.js' })` | A global with a different API |

The slow case matters most for scripts loaded synchronously in `<head>`, which block parsing until they finish or fail.

## Report the dependency

Say which URL failed, how (blocked, timed out, error status), and what the page did: a missing button, a blank section, a frozen checkout. Add the initiator, so the maintainer knows which code assumed the script was present. A line such as `checkout.js:212 window.vendorPay.init()` is often the whole bug.

## Worked example: a checkout that needed an analytics script

This example is fictional. A small share of users report that the **Pay** button does nothing. Support cannot reproduce it.

One user's Network panel shows `https://metrics.example-cdn.test/tag.js` as `(blocked:other)`, and the Console shows `TypeError: window.tagQueue is undefined` at `checkout.js:88`. The developer blocks the same URL with `page.route` and the **Pay** button stops working on every run. The checkout code pushed a "payment started" event to the analytics queue before submitting the form, and the push threw when the queue did not exist. The fix guarded the push, and the blocked-URL script became a test that checkout works with every third-party script blocked.

## Questions

### Should a site work with all third-party scripts blocked?

Core actions such as signing in and paying usually should, and the test above checks it. Some features, such as an embedded map, legitimately need their script; they should fail visibly rather than break the rest of the page.

### Does blocking affect requests from service workers?

Requests made by a service worker can bypass page-level routing. Block service workers in the context, as [the service worker guide](/learn/service-worker-controlled-page/) shows, so every request goes through the route.

### Can I reproduce a DNS failure?

`route.abort('namenotresolved')` gives the page the error a DNS failure produces, without changing your machine's DNS.

Return to [reproducing what someone else saw](/learn/replay-browser-bug-report/) for the other layers a replay needs.

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [A request with no status code: read (failed), (canceled) and (blocked)](/learn/failed-request-no-status/)
    
    Network outages The Proofline team November 20, 2026 4 min read
    
-   ### [Works in incognito but not in a normal window: extension or stored data?](/learn/works-in-incognito/)
    
    Broken dependencies The Proofline team November 20, 2026 4 min read
