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

'We failed to record the video' error in Firefox when running 2 spec files #6408

Closed
jennifer-shehane opened this issue Feb 11, 2020 · 3 comments · Fixed by #7192
Closed

'We failed to record the video' error in Firefox when running 2 spec files #6408

jennifer-shehane opened this issue Feb 11, 2020 · 3 comments · Fixed by #7192
Labels
browser: firefox type: unexpected behavior User expected result, but got another v4.0.0 🐛 Issue present since 4.0.0

Comments

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Feb 11, 2020

Current behavior:

When running cypress run --browser firefox over 2 specs files, the below warning is printed. This warning does not print when only running 1 spec file.

(Running in develop gives a slightly better stack trace, so I've pasted the warning from develop branch)

Error

Screen Shot 2020-02-14 at 1 07 07 PM

Warning: We failed to record the video.

This error will not alter the exit code.

Error: ffmpeg exited with code 1: pipe:0: Function not implemented

    at ChildProcess.<anonymous> (/Users/jennifer/Dev/cypress/packages/server/node_modules/fluent-ffmpeg/lib/processor.js:182:22)
    at ChildProcess.emit (events.js:203:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)

Warning: We failed processing this video.

This error will not alter the exit code.

Error: ffmpeg exited with code 1: pipe:0: Function not implemented

    at ChildProcess.<anonymous> (/Users/jennifer/Dev/cypress/packages/server/node_modules/fluent-ffmpeg/lib/processor.js:182:22)
    at ChildProcess.emit (events.js:203:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
From previous event:
    at deferredPromise (/Users/jennifer/Dev/cypress/packages/server/lib/video_capture.js:21:19)
    at Object.start (/Users/jennifer/Dev/cypress/packages/server/lib/video_capture.js:65:19)
    at /Users/jennifer/Dev/cypress/packages/server/lib/modes/run.js:669:6
    at /Users/jennifer/Dev/cypress/packages/server/node_modules/fs-extra/lib/mkdirs/mkdirs.js:56:16
    at callback (/Users/jennifer/Dev/cypress/packages/server/node_modules/graceful-fs/polyfills.js:289:20)
    at FSReqCallback.oncomplete (fs.js:166:5)
From previous event:
    at Object.createVideoRecording (/Users/jennifer/Dev/cypress/packages/server/lib/modes/run.js:667:4)
    at Object.<anonymous> (/Users/jennifer/Dev/cypress/packages/server/lib/modes/run.js:724:15)
From previous event:
    at Object.runSpec (/Users/jennifer/Dev/cypress/packages/server/lib/modes/run.js:1277:17)
    at runEachSpec (/Users/jennifer/Dev/cypress/packages/server/lib/modes/run.js:1220:19)
From previous event:
    at serial (/Users/jennifer/Dev/cypress/packages/server/lib/modes/run.js:372:20)
    at iterateThroughSpecs (/Users/jennifer/Dev/cypress/packages/server/lib/modes/run.js:433:10)
    at Object.runSpecs (/Users/jennifer/Dev/cypress/packages/server/lib/modes/run.js:1227:12)
    at runAllSpecs (/Users/jennifer/Dev/cypress/packages/server/lib/modes/run.js:1399:25)
    at /Users/jennifer/Dev/cypress/packages/server/lib/modes/run.js:1446:18
From previous event:
    at /Users/jennifer/Dev/cypress/packages/server/lib/modes/run.js:1384:10
From previous event:
    at /Users/jennifer/Dev/cypress/packages/server/lib/modes/run.js:1358:8
    at processImmediate (internal/timers.js:439:21)

Debug logs around the warning:

  cypress:server:browsers killing browser process +2s
info @benmalka/foxdriver:Client connection closed by server
  cypress:server:preprocessor removeFile /Users/jennifer/Dev/cypress-transform-test/cypress/integration/spec2.js +1s
  cypress:server:preprocessor base emitter plugin close event +0ms
  cypress:server:preprocessor base emitter native close event +0ms
  cypress:browserify close: /Users/jennifer/Dev/cypress-transform-test/cypress/integration/spec2.js +1s
  cypress:browserify close: /Users/jennifer/Dev/cypress-transform-test/cypress/integration/spec2.js +0ms
  cypress:server:browsers browser process killed +48ms
  cypress:server:run ending the video recording { name: '/Users/jennifer/Dev/cypress-transform-test/cypress/videos/spec2.js.mp4', videoCompression: 32, shouldUploadVideo: true } +49ms
  cypress:server:video capture stderr log { message: 'pipe:0: Function not implemented' } +5s
  cypress:server:video capture stderr log { message: '' } +2ms
  cypress:server:video capture errored: { error: 'ffmpeg exited with code 1: pipe:0: Function not implemented\n', stdout: '', stderr: 'ffmpeg version N-92718-g092cb17983-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2000-2018 the FFmpeg developers\n' + '  built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)\n' + '  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavWarning: We failed to record the video.

This error will not alter the exit code.

Error: ffmpeg exited with code 1: pipe:0: Function not implemented

    at ChildProcess.<anonymous> (/Users/jennifer/Dev/cypress/packages/server/node_modules/fluent-ffmpeg/lib/processor.js:182:22)
    at ChildProcess.emit (events.js:203:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)

pack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay\n' + '  libavutil      56. 24.101 / 56. 24.101\n' + '  libavcodec     58. 42.102 / 58. 42.102\n' + '  libavformat    58. 24.101 / 58. 24.101\n' + '  libavdevice    58.  6.101 / 58.  6.101\n' + '  libavfilter     7. 46.101 /  7. 46.101\n' + '  libswscale      5.  4.100 /  5.  4.100\n' + '  libswresample   3.  4.100 /  3.  4.100\n' + '  libpostproc    55.  4.100 / 55.  4.100\n' + 'pipe:0: Function not implemented\n' } +2ms

Desired behavior:

Record video in Firefox for multiple spec files.

Test code to reproduce

spec.js

it('test', () => {
  expect(true).to.be.true
})

spec2.js

it('test', () => {
  expect(true).to.be.true
})

Versions

Cypress 4.0.0 and 4.0.1
Firefox 72
MacOS Mohave

@cypress-bot cypress-bot bot added the stage: needs investigating Someone from Cypress needs to look at this label Feb 11, 2020
@jennifer-shehane jennifer-shehane added v4.0.0 🐛 Issue present since 4.0.0 type: unexpected behavior User expected result, but got another stage: needs investigating Someone from Cypress needs to look at this and removed stage: needs investigating Someone from Cypress needs to look at this labels Feb 11, 2020
@flotwig
Copy link
Contributor

flotwig commented Mar 11, 2020

You can see this in CI here: https://circleci.com/gh/cypress-io/cypress/278863

Is this the same error that you get if ffmpeg hasn't received any frames at the time that the video recording ends? If so, it could be that the driver video-recorder hasn't sent any frames yet, for some reason

@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review stage: work in progress and removed stage: needs investigating Someone from Cypress needs to look at this stage: needs review The PR code is done & tested, needs review stage: work in progress labels May 4, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 6, 2020

The code for this is done in cypress-io/cypress#7192, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels May 6, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 20, 2020

Released in 4.6.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
browser: firefox type: unexpected behavior User expected result, but got another v4.0.0 🐛 Issue present since 4.0.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants