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

fix: prevent timing out on short/skipped videos #28643

Merged
merged 11 commits into from Jan 11, 2024

Conversation

emilyrohrbough
Copy link
Member

@emilyrohrbough emilyrohrbough commented Jan 4, 2024

This change prevents timing out when creating videos for short or skipped specs. This change will:

  1. if the spec was skipped by the cloud , immediately end- we know no more frames are coming
  2. otherwise, wait for 3000 ms for at least frames, then end regardless of frames written

The originally timeout logic was introduced because ffmpeg crashes in firefox if less than 2 frames were written to the input stream. This changed technically could resurfaces #6408, where the error We failed to record the video was observed for less than 2 frames. However, under the circumstances additional frames were never written, the fix to handle the We failed to record the video error was just replaced the We failed to capture ... TimeoutError error reported in #27898.

To handle the known scenario where ffmpeg did not receive enough frames, the error message has been updated to provide context to the Cypress issue.

Before After
Screen Shot 2024-01-05 at 2 00 17 PM Screen Shot 2024-01-05 at 12 27 10 PM

Steps to test

How has the user experience changed?

PR Tasks

@emilyrohrbough emilyrohrbough marked this pull request as ready for review January 5, 2024 20:01
@AtofStryker AtofStryker self-requested a review January 8, 2024 14:39
Co-authored-by: Bill Glesias <bglesias@gmail.com>
Copy link

cypress bot commented Jan 8, 2024

2 flaky tests on run #53421 ↗︎

0 551 8 0 Flakiness 2

Details:

Update CHANGELOG.md
Project: cypress Commit: 37f1266bd3
Status: Passed Duration: 12:22 💡
Started: Jan 11, 2024 3:39 PM Ended: Jan 11, 2024 3:51 PM
Flakiness  runs.cy.ts • 1 flaky test • app-e2e

View Output

Test Artifacts
... > displays a list of recorded runs if a run has been recorded Test Replay Screenshots
Flakiness  specs_list_latest_runs.cy.ts • 1 flaky test • app-e2e

View Output

Test Artifacts
App/Cloud Integration - Latest runs and Average duration > when no runs are recorded > shows placeholders for all visible specs Test Replay Screenshots

Review all test suite changes for PR #28643 ↗︎

@emilyrohrbough emilyrohrbough merged commit 4b1df35 into develop Jan 11, 2024
80 of 82 checks passed
@emilyrohrbough emilyrohrbough deleted the em/fix-short-video-hang branch January 11, 2024 15:56
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 17, 2024

Released in 13.6.3.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v13.6.3, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jan 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'Warning: We failed capturing this video' error when tests are very short duration (2 secs or less) or skipped
3 participants