Conversation
Poll the nonvisual Debug and socket readiness predicates every 200ms while preserving their existing timeouts and cancellation behavior. Add account-free Chromium regressions and test instructions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Use explicit 200 ms interval polling for the
Debug.VERSIONand socket-state waits inClient.inject(). Both predicates describe application state, not rendering, but Puppeteer's default polling depends on animation callbacks.When animation callbacks stop and timers continue, initialization currently times out even after those values become ready. This change keeps the existing predicates, timeouts, and abort behavior while allowing the waits to observe readiness without rendering.
Add account-free Chromium tests that exercise actual Client initialization using offline fixtures, plus instructions for running them independently of the authenticated integration suite. No dependency, public API/type, or navigation changes.
Head:
kondv:kondv-whatsapp-polling-prat358051d12b76aa4d5544a2fbc86ebf3f93d11358.Related Issue(s)
Fixes #201940
Follow-up to #201653's
waitForFunctionconversion, not a resubmission of that merged fix. This does not duplicate #201853's post-authentication Stream changes or #201893's navigation handling. Navigation and browser-cleanup changes are not included.Testing Summary
Test Details
The same new regression file was run against upstream and the polling patch. The publication commit was rerun after committing:
064a3d5a5a3dce1281a6a12740b5a7051339d154358051d12b76aa4d5544a2fbc86ebf3f93d11358Command:
An existing Chromium executable was selected with
PUPPETEER_EXECUTABLE_PATH.The fixtures suppress animation callbacks and make readiness arrive after the first predicate check. Both delayed cases now emit one synthetic QR without false authentication or ready events. Controls cover immediate readiness, unchanged timeouts, initial-wait cancellation on destroy, authentication-strategy errors, and an already-connected socket. Each test closes its dedicated browser and checks temporary-profile removal and the absence of browser script errors.
Node syntax checks, targeted ESLint, Prettier,
git diff --check, and commitlint pass. Commitlint reported 0 problems and 0 warnings before committing and for the committed message.The full
npm testsuite was not run because it requires an authenticated account and sends real messages. There is no separate build script.These account-free tests establish the failure mechanism, not how often rendering pauses occur in normal browser operation or production stability. Timer polling can still be throttled or suspended; this is not a guarantee of progress during arbitrary suspension.
Environment
064a3d5a5a3dce1281a6a12740b5a7051339d154plus this patch (package version 1.34.7)Type of Change
Checklist
npm test).index.d.ts) have been updated if necessary.example.js) / documentation have been updated if applicable.The focused offline suite passes; the authenticated suite was not run. No public type change is needed.
tests/README.mddocuments the account-free test command.