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

Ajax Synchronous Request Failing in Chrome #3970

Closed
mr-matt-b opened this issue Apr 16, 2019 · 2 comments
Closed

Ajax Synchronous Request Failing in Chrome #3970

mr-matt-b opened this issue Apr 16, 2019 · 2 comments

Comments

@mr-matt-b
Copy link

mr-matt-b commented Apr 16, 2019

Is this a Feature or Bug?

Bug

Current behavior:

I am getting the error

Error: NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'url ': Synchronous XHR in page dismissal.

when using Chrome 73. If I switch to Electron 59 everything passes fine.

Desired behavior:

To not get this error in Chrome 73.

Steps to reproduce: (app code and test code)

Not exactly sure how to reproduce this issue but i believe it's caused by an update to chrome that disallows synchronous ajax during end-of-page events (like beforeunload and unload). It's not mentioned in any release docs, but according to this stackoverflow response it was mentioned in a tweet somewhere. From experience, it happens when an ajax request is made in a test, and then is shown as aborted in the following test. Sorry if this issue wasn't detailed enough.

Versions

Cypress 3.2.0, Chrome Version 73.0.3683.103, Windows 10

@mr-matt-b
Copy link
Author

Never mind. I believe Cypress is actually working correctly and failing on a request that as of chrome v73 should not be happening. The request is made by a 3rd party tool which still appears to be using synchronous xhr requests in the beforeunload/unload events.

@al-2014
Copy link

al-2014 commented Feb 28, 2020

I'm Running Electron 78 and facing the same problem . did you find any work around ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants