## TL;DR

`cy.visit()` fails when Cypress cannot load the page at all: the dev server is not running, the URL is wrong, or something blocks the request. Verify the server responds with curl first, then fix the URL, the server startup order, or the blocking proxy.

## Error

```text
CypressError: `cy.visit()` failed trying to load the service URL for that host and port.
We attempted to make an http request to this URL but the request failed without a response.
```

## Steps

1. In a terminal, run `curl -s -o /dev/null -w "%{http_code}" YOUR_HOST/`. Expected: 200. Anything else means the server is the problem, not Cypress.
2. If curl fails, start the dev server before Cypress (for example with `start-server-and-test`). Expected: curl returns 200, then `cy.visit()` succeeds.
3. Check `baseUrl` in `cypress.config.js` matches the real server port. Expected: the port in the config equals the port the server listens on.
4. If the page loads in a real browser but not in Cypress, check for proxy or VPN interference and try `cy.visit()` with the IP instead of the hostname. Expected: isolates DNS or proxy issues.
5. For `ERR_ABORTED` variants, the page itself cancels navigation (auth redirect loops); add `failOnStatusCode: false` temporarily to see the actual response. Expected: you see the real status code instead of a load error.

## When to use

- Failure happens on `cy.visit()`, before any page interaction.
- The same URL fails from curl, or works in a normal browser but not Cypress.

## When not to use

- The page loads but assertions on it fail (use the cy.get timeout skill).
- The failure is `We detected that the Chrome version` (browser binary issue).

## Tool compatibility

- Cypress 10 through 14; `start-server-and-test` for server orchestration.

## Variant phrasings

### cy.visit failed without a response

The request never completed: server down, refused connection, or DNS failure.

### cy.visit() timed out

The server accepted the connection but never sent a full page; check for hanging middleware.

## Why it happens

Cypress drives a real browser to a real URL. If nothing listens there, or the URL is wrong, there is no page to test. CI is the classic trigger: tests start before the server is ready.

## Edge cases

- `cy.visit()` to an external URL (not under test) hits cross-origin limits; keep visits on the app under test.
- Service workers from a previous run can serve stale failures; clear them with `cy.clearAllCookies()` plus a fresh profile in CI.
- HTTPS dev servers with self-signed certs need the cert trusted by the Cypress browser.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_A3eUaRJNxozO6qaVgQ-Fww
