question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] page.route causes requests to timeout

See original GitHub issue

Context:

  • 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:open
  • Created 2 years ago
  • Reactions:6
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
David-Vithayathilcommented, Apr 27, 2022

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.

1reaction
monkekodecommented, Nov 17, 2021

Looks like this happens on sites owned by google: google.com, youtube.com, but not on facebook.com, microsoft.com.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found