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

Comments

2 participants
@brian-mann
Copy link
Member

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

This comment has been minimized.

Copy link
Member Author

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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
You can’t perform that action at this time.