Skip to content

fix(e2e): give component lookups room for cold-start player creation - #896

Closed
tvanlaerhoven wants to merge 1 commit into
feature/cavynext-migrationfrom
devin/1786485825-e2e-cold-start-waittime
Closed

fix(e2e): give component lookups room for cold-start player creation#896
tvanlaerhoven wants to merge 1 commit into
feature/cavynext-migrationfrom
devin/1786485825-e2e-cold-start-waittime

Conversation

@tvanlaerhoven

@tvanlaerhoven tvanlaerhoven commented Aug 11, 2026

Copy link
Copy Markdown
Member

Summary

The e2e <Tester> never set waitTime, so spec.findComponent('Scene.player') — every spec's
first step, via preparePlayerWithSource() — gave up after cavynext's default 2000 ms:

<Tester specs={Specs} store={testHookStore} waitTime={30_000}>

The player is only registered in the hook store from onPlayerReady, and on an iOS/tvOS
simulator the first onPlayerReady after app launch takes 3–9 s (measured across recent
runs of #893: 3.2 s, 3.5 s, 4.5 s, 6.0 s, 8.9 s; Android is 0.3 s because its e2e app is built
--mode release, while iOS/tvOS run Debug off Metro). So the first player-dependent test(s) of
a run raced player creation and failed with

Could not find component with identifier Scene.player.
Hooked identifiers: Scene.THEOplayerView.

and passed on retry — the flakiness that is "mostly iOS, sometimes Android". waitTime is only
an upper bound on the polling loop (100 ms interval), so a generous value costs nothing once the
player is registered; the run with 8.9 s of cold start is comfortably inside 30 s.

Two things this does not fix, both in cavynext itself and patched separately:

  • WebSocketReporter.sendData() drops every event while the socket is still CONNECTING, so
    the ❌ … Caught error: … line of exactly these early failures never reaches the log — which
    is why the run summary reported failures while the log showed only green ticks. Symptom
    visible in every job: cavynext test suite started at … is missing from all 21 logs
    inspected, and printed results are always fewer than N examples (even green Android/web runs
    print 27 of 28).
  • The remaining iOS/tvOS flakes are unrelated to the race above: Player error … errorCode 5003 on "Set mp4 … dispatches a seeked event after seeking", and Expected true to be falsy on "… paused, play and playing events after pausing & resuming".

Link to Devin session: https://dolby.devinenterprise.com/sessions/9cbd83149afa4521a7b0cdfbb9b09118
Requested by: @tvanlaerhoven


Open in Devin Review

Co-Authored-By: tom.vanlaerhoven <tom.vanlaerhoven@dolby.com>
@tvanlaerhoven tvanlaerhoven self-assigned this Aug 11, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@devin-ai-integration
devin-ai-integration Bot deleted the devin/1786485825-e2e-cold-start-waittime branch August 11, 2026 22:55
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