-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Reconnection not working on Chrome #27
Labels
bug
Something isn't working
good first issue
Good for newcomers
released
Has been released and published
Comments
Great catch! I've noticed it also with #22 (comment) but you beat me to creating an issue. Thanks for reporting! I'll take care of it soon. 👍 |
enisdenjo
pushed a commit
that referenced
this issue
Jun 9, 2022
## [1.2.1](v1.2.0...v1.2.1) (2022-06-09) ### Bug Fixes * **client:** Retry network errors even if they occur during event emission ([489b1b0](489b1b0)), closes [#27](#27) ### Performance Improvements * **client:** Avoid recreating result variables when reading the response stream ([16f6a6c](16f6a6c))
🎉 This issue has been resolved in version 1.2.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Seems like this issue is still present in Safari and Firefox.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
good first issue
Good for newcomers
released
Has been released and published
Screenshot
Expected Behaviour
Disconnecting the client from the internet and the reconnecting should cause it to reconnect when
graphql-sse
performs a re-connection attempt.I'm using a mostly standard setup of the
graphql-sse
client with Relay.Actual Behaviour
I see an error ending up in the console as in the screenshot. It's not being handled by
graphql-sse
and reconnecting. The error ends up at the top of my sink.Firefox and Edge actually work for me. The problem is in Chrome and Safari.
Debug Information
I discovered that the error surfaces in this
catch
clause in the form of aTypeError
with the message:network error
(which is standard with the Fetch API AFAIK) but since it was never converted to aNetworkError
, it doesn't trigger a retry.I dug deeper to find the source of the error and see why it wasn't converted to
NetworkError
and noticed that it was thrown from thetoAsyncIterator
function, from which apparently you didn't anticipate network errors occurring.Further Information
ERR_NETWORK_CHANGED
Pleas let me know if you aren't able to reproduce and whether I can help with anything.
The text was updated successfully, but these errors were encountered: