Skip to content
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

XHR's pend forever when browser navigates in >= Chrome 71 #3973

Closed
brian-mann opened this issue Apr 16, 2019 · 3 comments · Fixed by #3974
Closed

XHR's pend forever when browser navigates in >= Chrome 71 #3973

brian-mann opened this issue Apr 16, 2019 · 3 comments · Fixed by #3974
Assignees
Labels
browser: chrome pkg/driver This is due to an issue in the packages/driver directory type: bug

Comments

@brian-mann
Copy link
Member

brian-mann commented Apr 16, 2019

As of Chrome 71 - Chrome now fires readystatechange events asynchronously when the page is unloading - which means these events are never received.

Because we're never notified when the XHR's are aborted internally by the browser we never finish them correctly - and awaiting them with cy.wait('...') never completes.

Electron:

Screenshot 2019-04-16 03 46 28

Chrome >= 71:
image

@brian-mann brian-mann self-assigned this Apr 16, 2019
@brian-mann
Copy link
Member Author

brian-mann commented Apr 16, 2019

Changed the implementation to no longer rely on internal XHR events to create a consistent experience between newer and older browsers.

There's now a new canceled XHR status to indicate the difference between calling xhr.abort() and the browser canceling the request due to page navigation.

image

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Apr 16, 2019

The code for this is done in cypress-io/cypress#3974, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 17, 2019

Released in 3.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser: chrome pkg/driver This is due to an issue in the packages/driver directory type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants