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

ffmpeg error with Chrome 89 #15300

Closed
mdantonio opened this issue Mar 3, 2021 · 8 comments · Fixed by #15295
Closed

ffmpeg error with Chrome 89 #15300

mdantonio opened this issue Mar 3, 2021 · 8 comments · Fixed by #15295

Comments

@mdantonio
Copy link

Current behavior

After upgrading to google-chrome 89 Cypress fails:

Warning: We failed to record the video.

This error will not alter the exit code.

Error: ffmpeg exited with code 1: Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

    at ChildProcess.<anonymous> (/usr/local/Cypress/6.5.0/Cypress/resources/app/packages/server/node_modules/fluent-ffmpeg/lib/processor.js:182:22)
    at ChildProcess.emit (events.js:315:20)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)

Error: ffmpeg exited with code 1: Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

    at ChildProcess.<anonymous> (/usr/local/Cypress/6.5.0/Cypress/resources/app/packages/server/node_modules/fluent-ffmpeg/lib/processor.js:182:22)
    at ChildProcess.emit (events.js:315:20)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)

Error: ffmpeg exited with code 1: Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

    at ChildProcess.<anonymous> (/usr/local/Cypress/6.5.0/Cypress/resources/app/packages/server/node_modules/fluent-ffmpeg/lib/processor.js:182:22)
    at ChildProcess.emit (events.js:315:20)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)

Error: Command failed with exit code 1: cypress run --record --group totp --browser chrome
    at makeError (/app/node_modules/start-server-and-test/node_modules/execa/lib/error.js:56:11)
    at handlePromise (/app/node_modules/start-server-and-test/node_modules/execa/index.js:114:26)
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  command: 'cypress run --record --group totp --browser chrome',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: undefined,
  stderr: undefined,
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}
error Command failed with exit code 1.

Desired behavior

google-chrome 89 should work

Test code to reproduce

cypress run --browser chrome

having installed chrome 89 (the new stable version since yesterday):

$ google-chrome-stable --version
Google Chrome 89.0.4389.72 

It works with chrome 88

$ google-chrome-stable --version
Google Chrome 88.0.4324.182 

Versions

Cypress 6.6.0
Google Chrome 89.0.4389.72

@grahamhar
Copy link

I managed to get some additional information by setting the environment variable

DEBUG=cypress:server:video

The error indicates the source video generated is 1050x839 and the height is not divisible by 2

I can't copy the error due to not having access so attempting via a photo of the screen

image

@mcmarkj
Copy link

mcmarkj commented Mar 3, 2021

Also spotted here: cypress-io/cypress-docker-images#450

It appears the first spec that it runs works fine, then the second spec has a different resolution

Working spec:
2021-03-03T13:38:00.239Z] cypress:server:video capture stderr log { message: ' Stream #0:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 1050x842 [SAR 1:1 DAR 525:421], 25 fps, 25 tbr, 25 tbn, 25 tbc' } +0ms

Failing Spec:
[2021-03-03T13:38:33.085Z] cypress:server:video capture stderr log { message: '[libx264 @ 0x6916800] height not divisible by 2 (1050x891)' } +4ms

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Mar 3, 2021

We also encountered this error when upgrading to the new Electron version because it uses Chrome 89. There is already a PR open to fix this in our next release. #15295

We'll close this issue as it is pending release, but has yet to be released. We'll update this issue and reference the changelog when it's released.

In the meantime, there are a few workarounds you might consider:

@mcmarkj
Copy link

mcmarkj commented Mar 12, 2021

@jennifer-shehane out of curiosity how frequently do you cut releases, or at which point?
I'm refreshing the changelog page multiple times daily, as this is quite a big thing breaking CI for us so keen to get the fix in asap.

@bahmutov
Copy link
Contributor

@mcmarkj https://docs.cypress.io/faq/questions/general-questions-faq.html#How-often-are-Cypress-Test-Runner-versions-released so we should release a new version on Monday

@jennifer-shehane
Copy link
Member

@mcmarkj We usually release every 2 weeks, but we've been trying to juggle some feature work between 6.7 and breaking 7.0, so there's been some delay.

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Mar 15, 2021

6.7.0 should go out today though! 🤞

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 15, 2021

Released in 6.7.0.

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

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

Successfully merging a pull request may close this issue.

5 participants