Cypress: experimental Fetch Polyfill - 'getReader' of undefined

Created on 28 Aug 2020  路  1Comment  路  Source: cypress-io/cypress

Current behavior:

Is impossible to reproduce video contents with Shaka Player when experimentalFetchPolyfill is enabled.
Shaka player throws the following error:

ERROR: Shaka Error NETWORK.HTTP_ERROR (https://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd,TypeError: Cannot read property 'getReader' of undefined,0)

  • experimentalFetchPolyfill: true
    KO

  • experimentalFetchPolyfill: false
    OK

Test code to reproduce

describe('Test player', () => {
  it('VOD', () => {
    cy.visit('https://shaka-player-demo.appspot.com/demo/#audiolang=it-IT;textlang=it-IT;uilang=it-IT;asset=https://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd;panel=HOME;build=uncompiled');
    cy.wait(60000);
  });
});

Versions

Cypress v5.0.0

fetch polyfill bug

Most helpful comment

@DanieleDiLucido the experimental fetch polyfill does not support streaming responses, see https://www.cypress.io/blog/2020/06/29/experimental-fetch-polyfill/#limitations

I suggest waiting a few days when we release the new network stubbing API with cy.route2 that might solve mocking needs without the fetch polyfill. The PR https://github.com/cypress-io/cypress/pull/4176 has already been merged into develop and will be released within a day or two.

>All comments

@DanieleDiLucido the experimental fetch polyfill does not support streaming responses, see https://www.cypress.io/blog/2020/06/29/experimental-fetch-polyfill/#limitations

I suggest waiting a few days when we release the new network stubbing API with cy.route2 that might solve mocking needs without the fetch polyfill. The PR https://github.com/cypress-io/cypress/pull/4176 has already been merged into develop and will be released within a day or two.

Was this page helpful?
0 / 5 - 0 ratings