You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SPEAKER-001: setSpeaker NotAllowedError is caught without crashing intermittently times out on Chromium (passes consistently on Firefox and WebKit). The test hits the 90s timeout during teardown (browserContext.close), with the console spammed by:
[MockEmpiricaProvider] handleChange called - forcing re-render
This is an infinite re-render loop in the MockEmpiricaProvider, not a test logic issue.
How to reproduce
# Run just this test on chromium — may need several attempts to trigger
npx playwright test --config playwright/playwright.config.mjs "video-call/mocked/Speaker" --grep "SPEAKER-001" --project chromium
The failure is non-deterministic. It passed in a full 249-test run but failed in an isolated 3-test run on the same commit.
Root cause hypothesis
The MockEmpiricaProvider's handleChange callback triggers a re-render whenever a game.get() reads a key that isn't in the mock's attrs. In SPEAKER-001, the game mock only defines dailyUrl:
When VideoCall reads game.get("recordingEnabled") (added in PR #1209) or any other key not in attrs, the mock may enter a re-render cycle. This was previously observed and documented — useMemo with Object.is() comparison on inline [] defaults creates new refs each render.
The fix applied earlier (stable defaults outside the component) may not cover all paths, or a new game.get() call for a missing key may be re-triggering the issue.
Suggested debugging approach
Check if adding recordingEnabled to test fixtures prevents the flake:
If this fixes it, the root cause is game.get() for missing keys triggering reactivity.
Instrument MockEmpiricaProvider to log which key access triggers handleChange — add a stack trace or key name to the log message.
Investigate why Chromium-only — may be a timing difference in React's batching or event loop scheduling that makes the re-render loop more likely to cascade on Chromium.
Consider making game.get() for missing keys return undefined without triggering reactivity — this would make the mock more robust against new keys being read from game state.
Problem
SPEAKER-001: setSpeaker NotAllowedError is caught without crashingintermittently times out on Chromium (passes consistently on Firefox and WebKit). The test hits the 90s timeout during teardown (browserContext.close), with the console spammed by:This is an infinite re-render loop in the MockEmpiricaProvider, not a test logic issue.
How to reproduce
The failure is non-deterministic. It passed in a full 249-test run but failed in an isolated 3-test run on the same commit.
Root cause hypothesis
The MockEmpiricaProvider's
handleChangecallback triggers a re-render whenever agame.get()reads a key that isn't in the mock'sattrs. In SPEAKER-001, the game mock only definesdailyUrl:When VideoCall reads
game.get("recordingEnabled")(added in PR #1209) or any other key not inattrs, the mock may enter a re-render cycle. This was previously observed and documented —useMemowithObject.is()comparison on inline[]defaults creates new refs each render.The fix applied earlier (stable defaults outside the component) may not cover all paths, or a new
game.get()call for a missing key may be re-triggering the issue.Suggested debugging approach
Check if adding
recordingEnabledto test fixtures prevents the flake:If this fixes it, the root cause is
game.get()for missing keys triggering reactivity.Instrument MockEmpiricaProvider to log which key access triggers
handleChange— add a stack trace or key name to the log message.Investigate why Chromium-only — may be a timing difference in React's batching or event loop scheduling that makes the re-render loop more likely to cascade on Chromium.
Consider making
game.get()for missing keys returnundefinedwithout triggering reactivity — this would make the mock more robust against new keys being read from game state.Context
playwright/mocks/MockEmpiricaProvider.jsx)playwright/component-tests/video-call/mocked/Speaker.ct.jsx:94test-results/video-call-mocked-Speaker.-2992c--is-caught-without-crashing-chromium/trace.zip