Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Add ability to exclude web sockets from WaitForNetworkIdle #12391

Open
2 tasks
JortsEnjoyer0 opened this issue May 5, 2024 · 1 comment
Open
2 tasks

Comments

@JortsEnjoyer0
Copy link

Minimal, reproducible example

Minimal example is go to any website (chat.openai.com, google oauth page, etc) the uses websockets and use waitForNetworkIdle.

Error string

Timeout error

Bug behavior

  • Flaky
  • PDF

Background

Websockets is not a valid "pending" connection and should be considered network idle or there should be an option to ignore websockets. Using networkidle0 or networkidle2 events of page.goto is not a solution due to the full page navigation requirement which is not compatible with app-like interfaces of modern web that use SPA or ajax.

Expectation

waitForNetworkIdle should return regardless of WebSocket connections.

Reality

waitForNetworkIdle does not return and will timeout even with concurrency set to some arbitrary number.

Puppeteer configuration file (if used)

Default config.

Puppeteer version

22.6.2

Node version

18.18.0

Package manager

npm

Package manager version

9.8.1

Operating system

Windows

Copy link

github-actions bot commented May 5, 2024

This issue has an outdated Puppeteer version: 22.6.2. Please verify your issue on the latest 22.7.1 version. Then update the form accordingly.


Analyzer run

@OrKoN OrKoN changed the title [Bug]: WaitForNetworkIdle rarely works and fails to return during network idle conditions. [Feature]: Add ability to exclude web sockets from WaitForNetworkIdle May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants