How to fix net::ERR_INTERNET_DISCONNECTED or net::ERR_FAILED in Playwright?

Playwright

These errors indicate network failure (offline state, blocked DNS, proxy/VPN issues, or request blocking).

Stabilize tests by mocking external dependencies or waiting for required routes.

await page.route('**/api/profile', route =>
  route.fulfill({
    status: 200,
    contentType: 'application/json',
    body: JSON.stringify({ id: 1, name: 'Ada' }),
  })
);

await page.goto('https://example.com/app');

For CI, verify outbound network access and proxy configuration.