Skip to content

fix: treat timeout 0 as the default wait, not unlimited - #2647

Open
gyanu2507 wants to merge 2 commits into
ChromeDevTools:mainfrom
gyanu2507:fix/timeout-zero-means-default
Open

fix: treat timeout 0 as the default wait, not unlimited#2647
gyanu2507 wants to merge 2 commits into
ChromeDevTools:mainfrom
gyanu2507:fix/timeout-zero-means-default

Conversation

@gyanu2507

@gyanu2507 gyanu2507 commented Sep 3, 2026

Copy link
Copy Markdown

Summary

timeoutSchema documents that timeout: 0 uses the default wait. The transform used value && value <= 0, which is falsy for 0, so the number 0 was passed through to Puppeteer. In Puppeteer, timeout: 0 means wait forever.

Agents that pass 0 expecting the normal default can hang navigate_page / new_page on a stuck load.

Test plan

  • timeout: 0 and -1 parse to undefined
  • timeout: 500 stays 500
  • omitted timeout stays omitted

@google-cla

google-cla Bot commented Sep 3, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@wolfib
wolfib self-requested a review September 3, 2026 10:43
The schema text says 0 uses the default timeout, but `value && value <= 0`
is falsy for 0, so Puppeteer got timeout: 0 and waited forever.
@gyanu2507
gyanu2507 force-pushed the fix/timeout-zero-means-default branch from 591af93 to ad23966 Compare September 4, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant