net::ERR_EMPTY_RESPONSE means the browser did not receive a usable HTTP response. It does not prove that cy.intercept() caused the failure. The reliable fix is to identify which layer ended the exchange—your route handler, the origin server, a proxy, malformed headers, the browser connection, or a long-lived stream—then repair that layer.
Before changing Cypress configuration, record the Cypress package and binary versions, browser and operating-system versions, headed or headless mode, request URL and method, route matcher and handler, Command Log details, browser network information, and relevant application or proxy logs.
What ERR_EMPTY_RESPONSE tells you—and what it does not
Chrome reports net::ERR_EMPTY_RESPONSE when a connection closes or otherwise produces no usable response. The message is a symptom, not a root-cause diagnosis. A request displayed as intercepted may still fail before a stub replies, while a real upstream request can fail inside Cypress’s proxy even when the route definition is correct.
Start by deciding what the request is supposed to do:
#1 Best Overall
- DUAL-BAND WIFI 6 ROUTER: Wi-Fi 6(802.11ax) technology achieves faster speeds, greater capacity and reduced network congestion compared to the previous gen. All WiFi routers require a separate modem. Dual-Band WiFi routers do not support the 6 GHz band.
- AX1800: Enjoy smoother and more stable streaming, gaming, downloading with 1.8 Gbps total bandwidth (up to 1200 Mbps on 5 GHz and up to 574 Mbps on 2.4 GHz). Performance varies by conditions, distance to devices, and obstacles such as walls.
- CONNECT MORE DEVICES: Wi-Fi 6 technology communicates more data to more devices simultaneously using revolutionary OFDMA technology
- EXTENSIVE COVERAGE: Achieve the strong, reliable WiFi coverage with Archer AX1800 as it focuses signal strength to your devices far away using Beamforming technology, 4 high-gain antennas and an advanced front-end module (FEM) chipset
- OUR CYBERSECURITY COMMITMENT: TP-Link is a signatory of the U.S. Cybersecurity and Infrastructure Security Agency’s (CISA) Secure-by-Design pledge. This device is designed, built, and maintained, with advanced security as a core requirement.
- Stubbed request: Cypress should terminate the request with a fixture or a handler-generated response.
- Passthrough request: Cypress should observe or modify the request and let the real server answer.
That distinction determines the next checks. The cy.intercept() API supports matching, waiting, modifying, and stubbing, but the error text alone cannot identify which operation failed.
1. Capture a reproducible baseline
- Run
npx cypress versionand save both the npm package and binary versions. Record the browser name and exact version, operating system, and whether the test runs headed or headless. - Copy the failing method and URL exactly, including query parameters. Note whether application code or the test itself initiated the request.
- Save the route matcher and handler, for example
cy.intercept('GET', '**/api/orders', handler), including any asynchronous work, header edits, aliases, andreq.continue()orreq.reply()calls. - Open the Cypress Command Log and browser developer-tools network entry. Record whether Cypress matched the route, whether a request was sent upstream, timing, status, and response headers.
- Collect application-server, reverse-proxy, container, and TLS logs for the same timestamp. These often distinguish an origin reset from a test-runner problem.
Version matters. Cypress 16.0.0 documents native browser network interception for Chrome, Chromium, and Edge and includes interception and waiting changes. Read the version-specific notes in the Cypress changelog before applying advice written for an older release.
2. Verify the route matcher and handler
Match the intended request
A route can silently miss because the method, hostname, pathname, query string, or glob pattern differs from the actual request. Temporarily use an explicit matcher and log the request:
cy.intercept({ method: 'GET', pathname: '/api/orders' }, (req) => {
console.log('matched', req.method, req.url)
req.reply({ statusCode: 200, body: { orders: [] } })
}).as('orders')
cy.visit('/orders')
cy.wait('@orders').its('response.statusCode').should('eq', 200)
Use pathname when query parameters vary, or include the exact query when it is significant. Confirm that the intercept is registered before cy.visit() or the action that triggers the request; otherwise the request may occur before the route exists.
Rank #2
- Dual-band Wi-Fi with 5 GHz speeds up to 867 Mbps and 2.4 GHz speeds up to 300 Mbps, delivering 1200 Mbps of total bandwidth¹. Dual-band routers do not support 6 GHz. Performance varies by conditions, distance to devices, and obstacles such as walls.
- Covers up to 1,000 sq. ft. with four external antennas for stable wireless connections and optimal coverage.
- Supports IGMP Proxy/Snooping, Bridge and Tag VLAN to optimize IPTV streaming
- Access Point Mode - Supports AP Mode to transform your wired connection into wireless network, an ideal wireless router for home
- Advanced Security with WPA3 - The latest Wi-Fi security protocol, WPA3, brings new capabilities to improve cybersecurity in personal networks
Make completion explicit
A handler that never calls req.reply(), req.continue(), or returns a valid static response can leave the exchange unresolved. Keep the first diagnostic handler simple, then add custom logic back one piece at a time:
cy.intercept('POST', '**/api/login', (req) => {
req.reply({
statusCode: 200,
headers: { 'content-type': 'application/json' },
body: { token: 'test-token' }
})
})
Remove temporary header mutations, asynchronous calls, and body transformations. If the simple stub works, reintroduce each change separately. Cypress has recorded a fix for empty-string request or response header handling in an intercept handler; if your route edits headers, verify that your installed version includes the relevant fix and avoid emitting invalid values.
Check aliases and waits
An alias wait timeout is different from an empty response. Confirm that the request actually appears in the Command Log and that the alias is attached to the matching route. Do not “fix” an empty response by increasing responseTimeout until you know the request is merely slow rather than receiving no response.
3. Test the real origin outside Cypress
If the route is intended to pass through, reproduce the same method, URL, headers, cookies, and body with a normal browser or an HTTP client. A direct request that also fails points to the origin, DNS, TLS, or proxy. A direct request that succeeds narrows attention to Cypress’s browser connection, proxy path, or route handler.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Rank #3
- NIGHTHAWK WIFI 6 ROUTER FOR YOUR WHOLE HOME: Delivers fast, reliable WiFi across every room of your apartment or small home for streaming, gaming, video calls, and smart home devices, all running at the same time without slowing each other down.
- WORKS WITH YOUR EXISTING INTERNET SERVICE: Pairs with your existing modem or gateway via ethernet. Compatible with most cable, fiber, DSL, and satellite providers. Some gateways and modem router combos may require bridge mode. No coax needed.
- SET UP AND MANAGE YOUR NETWORK WITH THE NIGHTHAWK APP: Download the free Nighthawk app on iOS or Android for guided setup. Manage WiFi, run speed tests, pause devices, and set up guest networks from anywhere. Active internet required.
- READY FOR THE DEVICES YOU ALREADY OWN: Your phones, laptops, and TVs work right out of the box. WiFi 6 delivers speeds up to 1.8 Gbps across 2.4 GHz and 5 GHz bands. Backward compatible with WiFi 5 and earlier.
- COVERAGE IN EVERY ROOM: Covers up to 1,500 sq. ft. for up to 20 connected devices. Walls, floors, and interference can reduce range. Larger or multi-story homes may benefit from a NETGEAR Orbi mesh WiFi system.
Inspect the server and proxy path
- Verify that the API is listening on the host and port used by the browser inside the Cypress environment.
localhostin a container is not necessarily the host machine. - Check DNS resolution, IPv4 versus IPv6 binding, TLS certificates, and whether a reverse proxy closes idle or oversized connections.
- Correlate the Cypress timestamp with server access and error logs. No server log entry usually means the request never reached the origin.
- Review
HTTP_PROXY,HTTPS_PROXY, andNO_PROXYsettings inherited by the test process and CI runner.
Cypress issue #5895 describes a localhost API that worked outside Cypress but produced this browser error inside the runner. A reporter proposed HTTP_PROXY=localhost, but also described a listener warning and Cypress closure; it is an environment-specific workaround, not a general fix. Do not add it blindly.
4. Inspect raw response headers for proxy failures
If Cypress logs show an internal proxy exception, inspect the exact upstream headers rather than changing route waits. Header names must be valid HTTP tokens. Issue #28865 pairs ERR_EMPTY_RESPONSE with an invalid header named expires (note the trailing space) and ERR_INVALID_HTTP_TOKEN. The repair belongs in the server or intermediary emitting that header: remove the whitespace or correct the proxy configuration.
Also check duplicate or conflicting Content-Length and Transfer-Encoding, truncated compressed bodies, premature connection closes, and non-ASCII characters in header names. Capture headers at the origin and at the proxy when possible; a proxy may rewrite a valid response into an invalid one.
5. Treat retries as a limited diagnostic tool
Cypress’s 2019 article about Cypress 3.3.0 describes retrying some network failures and the retryOnNetworkFailure option for cy.visit() and cy.request(). That historical behavior and its “300%” network-speed headline do not establish current behavior or guarantee that an empty response will be repaired. Check the API for your installed release before using retry options.
Rank #4
- 𝐅𝐮𝐭𝐮𝐫𝐞-𝐏𝐫𝐨𝐨𝐟 𝐘𝐨𝐮𝐫 𝐇𝐨𝐦𝐞 𝐖𝐢𝐭𝐡 𝐖𝐢-𝐅𝐢 𝟕: Powered by Wi-Fi 7 technology, enjoy faster speeds with Multi-Link Operation, increased reliability with Multi-RUs, and more data capacity with 4K-QAM, delivering enhanced performance for all your devices.
- 𝐁𝐄𝟑𝟔𝟎𝟎 𝐃𝐮𝐚𝐥-𝐁𝐚𝐧𝐝 𝐖𝐢-𝐅𝐢 𝟕 𝐑𝐨𝐮𝐭𝐞𝐫: Delivers up to 2882 Mbps (5 GHz), and 688 Mbps (2.4 GHz) speeds for 4K/8K streaming, AR/VR gaming & more. Dual-band routers do not support 6 GHz. Performance varies by conditions, distance, and obstacles like walls.
- 𝐔𝐧𝐥𝐞𝐚𝐬𝐡 𝐌𝐮𝐥𝐭𝐢-𝐆𝐢𝐠 𝐒𝐩𝐞𝐞𝐝𝐬 𝐰𝐢𝐭𝐡 𝐃𝐮𝐚𝐥 𝟐.𝟓 𝐆𝐛𝐩𝐬 𝐏𝐨𝐫𝐭𝐬 𝐚𝐧𝐝 𝟑×𝟏𝐆𝐛𝐩𝐬 𝐋𝐀𝐍 𝐏𝐨𝐫𝐭𝐬: Maximize Gigabitplus internet with one 2.5G WAN/LAN port, one 2.5 Gbps LAN port, plus three additional 1 Gbps LAN ports. Break the 1G barrier for seamless, high-speed connectivity from the internet to multiple LAN devices for enhanced performance.
- 𝐍𝐞𝐱𝐭-𝐆𝐞𝐧 𝟐.𝟎 𝐆𝐇𝐳 𝐐𝐮𝐚𝐝-𝐂𝐨𝐫𝐞 𝐏𝐫𝐨𝐜𝐞𝐬𝐬𝐨𝐫: Experience power and precision with a state-of-the-art processor that effortlessly manages high throughput. Eliminate lag and enjoy fast connections with minimal latency, even during heavy data transmissions.
- 𝐂𝐨𝐯𝐞𝐫𝐚𝐠𝐞 𝐟𝐨𝐫 𝐄𝐯𝐞𝐫𝐲 𝐂𝐨𝐫𝐧𝐞𝐫 - Covers up to 2,000 sq. ft. for up to 60 devices at a time. 4 internal antennas and beamforming technology focus Wi-Fi signals toward hard-to-reach areas. Seamlessly connect phones, TVs, and gaming consoles.
A retry is useful only when logs show a transient connection reset or startup race. It cannot make a persistently broken server, invalid header, or unmatched stub succeed. Prefer waiting for your application to become ready and fixing the first failing layer.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.6. Debug EventSource and SSE separately
Server-sent events are not ordinary finite request/response exchanges. The initial connection remains open while the server sends a stream, so browser and proxy idle timeouts, buffering, compression, and connection handling matter.
Separate the request that creates backend data from the long-lived stream that delivers updates. Cypress discussion #29537 describes the trigger request succeeding while the EventSource stream failed with ERR_EMPTY_RESPONSE. Check stream-server logs, Content-Type: text/event-stream, Cache-Control: no-cache, proxy buffering settings, and keep-alive behavior.
Use a deterministic fake for UI tests
For a component test that verifies rendering and reconnection logic, replace EventSource before application code runs:
Recommended Free Tools
Best Value
- Dual band router upgrades to 1200 Mbps high speed internet (300mbps for 2.4GHz plus 900Mbps for 5GHz), reducing buffering and ideal for 4K stream
- Full Gigabit Ports - Gigabit Router with 4 Gigabit LAN ports, ideal for any internet plan and allow you to directly connect your wired devices
- Boosted Coverage - Four external antennas equipped with Beamforming technology extend and concentrate the Wi-Fi signals
- MU-MIMO technology - (5GHz band) allows high speeds for multiple devices simultaneously
- Access Point Mode - Supports AP Mode to transform your wired connection into wireless network, an ideal wireless router for home
cy.visit('/dashboard', {
onBeforeLoad(win) {
class FakeEventSource {
constructor() { this.onmessage = null; this.onerror = null }
close() {}
emit(data) { this.onmessage?.({ data: JSON.stringify(data) }) }
}
win.EventSource = FakeEventSource
}
})
cy.visit()‘s onBeforeLoad hook is documented at the Cypress API page. A fake proves only that the UI responds to events. Keep a separate integration test against the real SSE service to validate the stream itself; the community discussion is advice, not a formal support guarantee.
7. A layer-by-layer decision table
| Observation | Likely layer | Next action |
|---|---|---|
| Route never appears in Command Log | Matcher or registration | Register earlier; verify method, URL, origin, and alias. |
| Stub handler is entered but no response is recorded | Handler | Use a minimal req.reply(); remove async work and header edits. |
| Direct client also fails | Origin, DNS, TLS, or proxy | Read server/proxy logs and test host resolution and certificates. |
| Only Cypress fails; proxy error names a header | Malformed upstream response | Correct the emitting server or intermediary. |
| Trigger succeeds but EventSource fails | Streaming protocol or idle timeout | Inspect stream headers and buffering; test UI with a fake and stream separately. |
Or skip the browser setup
If your goal is to capture a page for diagnostics or documentation rather than exercise Cypress networking, ScreenshotNeo returns a screenshot or PDF with one request. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools to Claude, Cursor, and other MCP clients.
cURL:
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}`);
See the ScreenshotNeo documentation for the 63 capture options. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.
Common failed fixes
- Increasing timeouts: helps only when a valid response is slow; it does not repair an empty connection.
- Adding retries everywhere: can hide a deterministic server or matcher defect and lengthen CI runs.
- Changing unrelated route waits: cannot correct malformed headers or proxy failures.
- Forcing
HTTP_PROXY=localhost: is a report-specific workaround with documented side effects. - Mocking SSE and declaring victory: validates UI behavior, not the real stream.
What a useful bug report contains
Include a minimal test, Cypress package and binary versions, browser and OS, headed or headless mode, exact method and URL, matcher and handler, Command Log and network export, direct-client comparison, raw response headers, proxy variables, and synchronized origin logs. State whether the request should be stubbed, passed through, or streamed. This lets maintainers reproduce the failing layer instead of guessing from the browser error alone.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsFrequently Asked Questions
Does ERR_EMPTY_RESPONSE prove cy.intercept() canceled the request?
No. It only reports that the browser received no usable response; the origin, proxy, malformed headers, browser connection, route handler, or stream can be responsible.
Should I use a fake EventSource in every Cypress test?
No. Use it for deterministic UI tests, and keep a separate integration test for the real SSE endpoint.
When is a retry appropriate?
Only after logs show a transient network failure and your installed Cypress version supports the option. Retries do not repair persistent server or proxy defects.
Quick Recap
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.
Free tools Windows power users keep installed
One-click scans. No signup required.

