cypress-io / cypress

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

Can not play Vimeo video with error network policy #29849

Open peter-minhthuan opened 4 months ago

peter-minhthuan commented 4 months ago

Current behavior

Hi everyone, I'm testing play video with Vimeo. But when run test, I get the error like images bellow so I can't play Vimeo video.

image image (1)

Desired behavior

Can play Vimeo video without error

Test code to reproduce

  1. Visit to page watch video
  2. Wating for video load

Cypress Version

^13.6.6

Node version

v18.17.1

Operating System

window 10

Debug Logs

Other

jennifer-shehane commented 3 months ago

I can recreate with the following code, visiting a vimeo site:

it(`visits`, () => {
  cy.visit('https://elfsight.com/vimeo-video-gallery-widget/examples/')
})

Likely vimeo itself is checking for certain conditions before loading its video and it doesn't like some condition when the site is visited within Cypress, given some change we make to the browser. That would need to be investigated.

Screenshot 2024-07-15 at 12 25 10 PM

sergiuBQ commented 1 month ago

fyi @jennifer-shehane this started affecting youtube videos also, since Sep 3rd or 4th 2024. You should be able to replicate it by trying to play any public youtube video via cypress.

Screenshot 2024-09-16 at 14 27 24

For vimeo, this started happening since 27th of June 2024.

Please let us know if you have any updates on it. Thank you

Xiomycm15 commented 3 weeks ago

Hi team @jennifer-shehane,

I am also facing this issue in my test. I found it weird since the request for postman is working:

image

But on cypress, even when I setup the correct headers stills getting following behaviour for a vimeo video:

image image

Is this maybe related to the authentication?

Cordially,

Jeimmy Camacho Medina

MarkoAQA commented 1 week ago

@jennifer-shehane Any updates on this issue? In my case there's no issue when running Cypress locally in Electron (either in runner or headless mode), but when running the tests in CI/CD (via GH Actions) we're getting this error (it's also ran in Electron there). So, both Vimeo and YouTube videos are being blocked. Anyone else having same difficulties in the pipeline?

Update: The issue when running locally via Chrome or Firefox exists, but there's no issue when using Electron.