graphql-ws: Subscriptions aren't re-submitted properly on reconnection after connection failures
Screenshot First websocket and its related subscriptions
Next valid connection with its related subscriptions:
As you can see, the second screenshot has much less subscriptions sent to the server.
Expected Behaviour
No subscriptions are lost while reconnecting to a server
Actual Behaviour
It managed to reconnect to the server properly but didn’t send the whole set of subscriptions
Debug Information
This seems to happen only when the websockets aren’t able to reconnect right away to a server. In my case: I restarted my server locally and because it’s using typescript and transpiling on the fly with babel, it takes a little while to restart properly. So to reproduce I just launched my client, my server and then restarted my server and waited.
I am joining a har
file below that has content as well, you can open this in any Chromium browser (sadly Firefox doesn’t handle HAR with content yet) by dragging the file into your dev tools network
panel.
It should load the whole story and you would be able to see my network at the moment of the bug happening.
websockets-operations-after-reconnection.har.zip
Further Information
As with the previous issue, please let me know if you need more information and/or help 🙏
Thank you again for your great work on this new library!
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 23 (15 by maintainers)
Commits related to this issue
- chore(release): 🎉 3.1.0 [skip ci] # [3.1.0](https://github.com/enisdenjo/graphql-ws/compare/v3.0.2...v3.1.0) (2020-12-11) ### Bug Fixes * **client:** Time retries and socket change waits ([7c707db... — committed to enisdenjo/graphql-ws by semantic-release-bot 4 years ago
- fix(client): Stabilize and simplify internals (#100) Closes #99, closes #85 — committed to enisdenjo/graphql-ws by enisdenjo 3 years ago
- chore(release): 🎉 4.1.2 [skip ci] ## [4.1.2](https://github.com/enisdenjo/graphql-ws/compare/v4.1.1...v4.1.2) (2021-01-24) ### Bug Fixes * **client:** Stabilize and simplify internals ([#100](http... — committed to enisdenjo/graphql-ws by semantic-release-bot 3 years ago
- chore(release): 🎉 1.0.0 [skip ci] # 1.0.0 (2023-03-16) ### Bug Fixes * Add `browser` export map ([ea306db](https://github.com/ilijaNL/graphql-ws/commit/ea306db45a05ab712782b17c5a3a1ec60537eaa4)) *... — committed to ilijaNL/graphql-transport-ws by semantic-release-bot a year ago
I’ve managed to find some revelations in the meantime, bear with me - a fix is coming!
Wohoo! 🍾
Very nice news, thanks for sharing. 😄
I come bearing good news 😅
As you can see on the left it took some time for my server to restart (intended) and it seems all subscriptions were re-established properly.
So I’d say that rewrite brought some good stuff along!
Great stuff man, thanks so much for your help! 👏 I’ll keep an eye on this and will let you know in case I see something weird.
Hey @enisdenjo
Thanks for the update! I will take some time today to check that. Thank you so much for getting back to me on this, I am very sorry I didn’t have any moment to try and reproduce on a smaller repo. I haven’t forgotten though and will get back on it as soon as possible.
In the meantime I’ll try your update and will let you know!
You rock!