[BUG] page.route causes requests to timeout
See original GitHub issueContext:
- Playwright Version: 1.16.3
- Operating System: Mac
- Node.js version: v16.8.0
- Browser: Chromium
- Extra: -
System:
- OS: macOS 11.6
- Memory: 752.16 MB / 16.00 GB
Binaries:
- Node: 16.8.0 - /usr/local/bin/node
- Yarn: 1.22.17 - /usr/local/bin/yarn
- npm: 7.21.0 - /usr/local/bin/npm
Languages:
- Bash: 3.2.57 - /bin/bash
npmPackages:
- playwright: ^1.14.1 => 1.16.3
Code Snippet
import {chromium} from "playwright";
const b = await chromium.launch({
headless: false
})
const p = await b.newPage();
await p.route(() => false, async (route) => {
await route.continue();
});
await p.goto('https://www.google.com');
Describe the bug
Any usage of page.route makes subsequest requests timeout. Even though no routes are matched and all requests are set to continue. If I remove the p.route part, it starts to work.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:8 (6 by maintainers)
Top Results From Across the Web
11 Ways to Fix the ERR_CONNECTION_TIMED_OUT Error
Server timeout and error messages occur when a program attempts to connect to a non-existent server, either because it is down or because...
Read more >cy.wait() always gives a timeout error: No request ever occurred.
CypressError: Timed out retrying: cy.wait() timed out waiting 5000ms for the 1st request to the route: 'create'. No request ever occurred.
Read more >How to Get to the Bottom of Network Timeout Issues
This article looks into how to identify and troubleshoot the root causes of timeout issues reported in the service logs, which can often...
Read more >How to Fix the 504 Gateway Timeout Error on Your Site - Kinsta
A 504 Gateway Timeout error indicates that the web server is waiting too long to respond from another server and “timing out.” There...
Read more >ruby on rails - Intermittent timeouts from an app that should ...
It's the request to the Rails app that is timing out. I end up seeing the generic "Application Error" page. – Ryan Porter....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The issue is not restricted to google.com
I have written a playwright test script that visits a website and uses page.route to intercept and inject a JS script. The request hangs only for chromium browser and works consistently for firefox.
Looks like this happens on sites owned by google: google.com, youtube.com, but not on facebook.com, microsoft.com.