-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Fixture files defined in cy.route
with fx
and fixture
shortcut take longer to load, sometimes timeout.
#8181
Comments
The code around the I'm not able to reproduce this behavior from the information given. Please provide a repo or more code to reproduce the issue. Maybe it is dependent on the content in your json file - or if you have a My code that does not fail
it('test', () => {
cy.server()
cy.route('GET', `**/test/**`, `fixture:test.json`).as('something')
})
it('test2', () => {
cy.visit('https://example.cypress.io/commands/files')
cy.server()
cy.route('GET', 'comments/*', 'fixture:test.json').as('getComment')
cy.get('.fixture-btn').click()
cy.wait('@getComment')
})
{} |
@jennifer-shehane |
Yes, I believe that you may be encountering an error in 4.12.0. I need the exact code to run to reproduce it - as shown above, I'm not able to reproduce with the information given alone. The Please provide a full example so that we can begin work on fixing the issue. We will have to close this issue without this - since we will not have a path to move forward. |
@jennifer-shehane , I can understand, but I can't provide my repo details to you. we do not overwrite any inbuild cypress commands, only our custom things are doing like that. |
You'll need to revert to Cypress 4.11.0 for now then. Unfortunately we can't work on fixing this possible regression without a clear example given on how to reproduce the issue. |
@jennifer-shehane , Ok. One doubt , is there is any file size limit or any new json validation added in version 4.12.0 ? |
How large is your file? I tried this with a 1,400kb JSON file and it is not erroring with my example above. Are you positive that this fixture file exists? Previously, in 4.11.0, this would silently pass - not warning you that the file does not exist. We fixed this error, but it should show a better error than you're seeing if that is the case. |
@jennifer-shehane it was a file size issue, my file was the size of more than 8MB. Removed some content in the file, now it works. Can you please provide the max file size? |
I am able to recreate this sometimes with a JSON file that is 11mb in size. Sometimes it takes longer than 30seconds to load. I can recreate this below - with a lower timeout. it('test', () => {
cy.server()
Cypress.config('responseTimeout', 5000)
cy.route('GET', 'test', 'fixture:large_11mb.json')
}) You could increase the global This issue was introduced in 4.12.0. When downgrading - the file instantly resolves. 4.11.0Only took 0.02 seconds to run test 4.12.0Takes longer than 10 seconds, sometimes longer than 30 seconds (which is default timeout). |
cy.route
with fx
and fixture
shortcut take longer to load, sometimes timeout.
The code for this is done in cypress-io/cypress#8215, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior:
error :
The text was updated successfully, but these errors were encountered: