cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
47.04k stars 3.18k forks source link

Video is turned off after first spec using firefox < 93 #24162

Open rd-henning-ellerweg opened 2 years ago

rd-henning-ellerweg commented 2 years ago

Current behavior

I am running multiple test specs, using firefox 86. After the first test the video recording is turned off / does not happen. Using electron every spec is video recorded. Might be related to issue 18415

I am using https://download-installer.cdn.mozilla.net/pub/firefox/releases/86.0.1/linux-x86_64/de/firefox-86.0.1.tar.bz2

Starting cypress with path to firefox cypress run --browser ~/firefox/firefox

Output excerpt

  │ Cypress:        10.9.0  
  │ Browser:        Custom Firefox 86 (headless)
  │ Node Version:   v16.17.0 (/home/henning/.nvm/versions/node/v16.17.0/bin/node)
  │ Specs:          2 found (spec.cy.js, spec_2.cy.js)
  │ Searched:       cypress/e2e/**/*.cy.{js,jsx,ts,tsx}

  (Results)
  │ Tests:        1
  │ Passing:      1
  │ Screenshots:  0
  │ Video:        true
  │ Duration:     2 seconds
  │ Spec Ran:     spec.cy.js
  (Video)
  Started processing:  Compressing to 32 CRF
  Finished processing: /home/henning/Develop/workspaces/digital/cypress-video-test    (0 seconds)
                        /cypress/videos/spec.cy.js.mp4                                            

  (Results)
  │ Tests:        2    
  │ Passing:      2  
  │ Screenshots:  0  
  │ Video:        false 
  │ Duration:     2 seconds   
  │ Spec Ran:     spec_2.cy.js
  (Run Finished)    

cypress_debug.txt

Desired behavior

Video is produced / not turned off after first spec

Test code to reproduce

https://github.com/rd-henning-ellerweg/cypress-video-test

Cypress Version

10.9.0

Node version

v16.17.0

Operating System

wsl2 - Ubuntu 20.04.5 on Win 10.0.19044 Build 19044

Debug Logs

see attachment

Other

No response

AtofStryker commented 2 years ago

Hi @rd-henning-ellerweg . Thank you for opening an issue. Have you tried getting this to work outside the WSL environment? We currently do not support WSL due to some oddities within the environment.

rd-henning-ellerweg commented 2 years ago

Hi @AtofStryker Well my 'real' project shows the same symptoms when run in github actions. There we use a container based on https://github.com/cypress-io/cypress-docker-images/blob/master/browsers/node16.17.1-chrome106-ff105-edge/Dockerfile but uses the old firefox version. Getting the videos produced in my CI pipeline is as you might guess the real issue I am facing.

Anyway, I did the same thing on my windows machine, which yields the same result. I even updated to cypress 10.10.0 which fixed a firefox windows connection problem. Used https://archive.mozilla.org/pub/firefox/releases/86.0.1/win64/de/ using policies to turn off auto update https://www.journeybytes.com/disable-firefox-quantum-updates/#policies.json

AtofStryker commented 2 years ago

@rd-henning-ellerweg makes sense. I had issues getting this set up on MacOS (reverting to older versions of firefox is a bit of a pain on MacOS), but I did get this set up on my ubuntu machine and was able to reproduce it with the firefox 86 distribution you linked. Definitely a bit of a strange issue. Will work on getting this routed to a team.

AtofStryker commented 2 years ago