'Cypress visit uncaught reference

I'm trying to load "https://www.easports.com/fifa/ultimate-team/web-app/".

When the URL is loaded, I see Uncaught ReferenceError: data is not defined".

Is there some configuration I need to set?

error image my code is:

describe('My firts cypress', () =>{    
    it ('navegate to FUT web app', () =>{        
        cy.visit('https://www.easports.com/fifa/ultimate-team/web-app/')        
    })
})

after add uncaught:exception to return false...



Solution 1:[1]

As the error says it is not from Cypress but from your applcation. When you open console you should be able to look into the details. To bypass this error you can

Cypress.on('uncaught:exception', (err, runnable) => {
    // returning false here prevents Cypress from
    // failing the test
    return false
  })

to your index.js under support folder.

This will stop failing your test if there is uncaught exception. See cypress doc.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Pigbrainflower