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

Skip empty video chunks in writeVideoFrame #6818

merged 5 commits into from Mar 24, 2020


Copy link

@flotwig flotwig commented Mar 23, 2020

No users have run into this, but video recording can fail in writeVideoFrame and crash the process if an empty video chunk is received. This only seems to happen if there's some other error recording the video, but that will be caught later on, so this patch prevents errors with video recording from crashing the process immediately by skipping empty video chunks altogether.

@flotwig flotwig requested a review from kuceb March 23, 2020 16:32
Copy link

cypress-bot bot commented Mar 23, 2020

Thanks for the contribution! Below are some guidelines Cypress uses when doing PR reviews.

  • Please write [WIP] in the title of your Pull Request if your PR is not ready for review - someone will review your PR as soon as the [WIP] is removed.
  • Please familiarize yourself with the PR Review Checklist and feel free to make updates on your PR based on these guidelines.

PR Review Checklist

If any of the following requirements can't be met, leave a comment in the review selecting 'Request changes', otherwise 'Approve'.

User Experience

  • The feature/bugfix is self-documenting from within the product.
  • The change provides the end user with a way to fix their problem (no dead ends).


  • The code works and performs its intended function with the correct logic.
  • Performance has been factored in (for example, the code cleans up after itself to not cause memory leaks).
  • The code guards against edge cases and invalid input and has tests to cover it.


  • The code is readable (too many nested 'if's are a bad sign).
  • Names used for variables, methods, etc, clearly describe their function.
  • The code is easy to understood and there are relevant comments explaining.
  • New algorithms are documented in the code with link(s) to external docs (flowcharts, w3c, chrome, firefox).
  • There are comments containing link(s) to the addressed issue (in tests and code).


  • The change does not reimplement code.
  • There's not a module from the ecosystem that should be used instead.
  • There is no redundant or duplicate code.
  • There are no irrelevant comments left in the code.
  • Tests are testing the code’s intended functionality in the best way possible.


  • The original issue has been tagged with a release in ZenHub.

Copy link

cypress bot commented Mar 23, 2020

Test summary

7018 0 98 0

Run details

Project cypress
Status Passed
Commit 32e0a26
Started Mar 24, 2020 2:24 PM
Ended Mar 24, 2020 2:32 PM
Duration 07:41 💡
OS Linux Debian - 10.1
Browser Multiple

View run in Cypress Dashboard ➡️

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@brian-mann brian-mann self-requested a review March 23, 2020 17:46
Copy link

@brian-mann brian-mann left a comment

Choose a reason for hiding this comment

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

  • Can you write a single unit test for this? Otherwise this guard may get lost at some point.
  • Also can you add a note above the conditional explaining why this is important. The context is lost unless you read the comments.

@flotwig flotwig requested a review from brian-mann March 23, 2020 19:10
const { expect, sinon } = require('../spec_helper')
import videoCapture from '../../lib/video_capture'
import path from 'path'
import fse from 'fs-extra'
Copy link

Choose a reason for hiding this comment

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

there's a packages/fs you could use... but it will yell at you for using *sync methods

@flotwig flotwig merged commit 4edeec9 into develop Mar 24, 2020
Copy link

cypress-bot bot commented Mar 30, 2020

Released in 4.3.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Mar 30, 2020
@flotwig flotwig deleted the skip-empty-video-chunks branch January 24, 2022 18:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants