[Bug]: page.waitForNetworkIdle timeout inconsistently
See original GitHub issueBug description
For some reason page.waitForNetworkIdle is timing out for no reason. the network is empty and even so it timeout after 30 seconds.
This error happens only sometimes and is very weird. Despite of that, I find a way to make it fail consistently by repeating some steps multiple times
Steps to reproduce the problem:
I created a repo with some simple puppeteer code
Locally
you can reproduce it locally by (my current local environment is WSL2 ubuntu)
- clone the repo
- install dependencies
yarn yarn start
In GitHub Actions
- Create a new issue in the reproduction repo or use the issue
test - Create any comment
- Check the actions tab
Puppeteer version
“puppeteer”: “14.1.1”,
Node.js version
Local v16.15.0 / node 16
npm version
local 8.9.0 / actions https://github.com/actions/checkout
What operating system are you seeing the problem on?
Linux
Relevant log output
file:///home/runner/work/puppetter-timeout-reproduction/puppetter-timeout-reproduction/upleveled-drone.mjs:18421
rejectCallback(new TimeoutError("Timeout exceeded while waiting for event"));
^
TimeoutError: Timeout exceeded while waiting for event
at Timeout.<anonymous> (file:///home/runner/work/puppetter-timeout-reproduction/puppetter-timeout-reproduction/upleveled-drone.mjs:18421:22)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
Thanks for any attention that you gave to this issue, puppeteer is an amazing tool that we use every day in my company. I am also open to creating a PR if we are able to identify what is the problem.
Good energy 👍👍👍👍
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:12 (3 by maintainers)
Top Results From Across the Web
puppeteer wait for network idle after click
Any simple solution like page.waitForNavigation , e.g., page.waitForNetwork({waitUntil: 'networkidle0'}) ? Else, I'll raise a bug to the ...
Read more >Page.waitForNetworkIdle() method
Page.waitForNetworkIdle() method. Signature:. class Page { waitForNetworkIdle(options?: { idleTime?: number; timeout?: number; }): Promise<void>; } ...
Read more >⚓ Query: Advanced Search
T304084 GuzzleHttp\Exception\ConnectException: cURL error 28: Operation timed out after 5000 milliseconds with 0 bytes received (see ...
Read more >Navigating & waiting
Every script that we will write will almost certainly do three key things: Navigating to some web page Waiting for something Possibly getting...
Read more >cypress-network-idle
waitForNetworkIdle (2000) ... registerVisit({ timeout: 1000 }) it('waits for network idle', ... Return to top of pageSupport.
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
Yeah, looks like some sort of bug! Thanks for reporting.
Hey, didn’t have time to look into that yet. The code for the function is here https://github.com/puppeteer/puppeteer/blob/main/src/common/Page.ts#L1944 It looks like sometimes the request count does not update as expected.