-
Notifications
You must be signed in to change notification settings - Fork 55
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
usePresence error - Uncaught (in promise) Error: Connection closed #1753
Comments
I have the exact same error, except I don't use the hook. The sample code I use is in the comment - #1565 (comment). |
Hello @bookercodes , @nikitadubyk ! Thank you for reporting this and providing steps to reproduce. We're going to investigate this and get back with an update as soon as possible! |
Hey @bookercodes , @nikitadubyk ! I was able to reproduce the issue with the provided code sample. I'm currently looking into its cause. |
Same errors on page reload after updating to v2. |
Hello, I am working on a tutorial I'm aiming to publish this week and keep getting this error. Can it safely be ignored or am I doing something wrong? |
Hey @bookercodes ! In the meantime, since this error occurs on page reload and essentially tries to close a connection a second time after it's already been closed, you can safely ignore it for now. The only real downside is that these errors might appear in your log monitoring tools. |
This has been fixed in #1761 and will be released in the next patch version for ably-js package. |
Hey, the fix for this issue has been released in 2.1.0 release of |
Great, thank you, I will update! |
When using
usePresence
, if I reload the page, I see the following error (with preserve log on)I wonder if maybe ably-js is trying to send an event like "leave" but the connection is already closed? Possibly related to this LOC?
The code to reproduce is very simple:
Why does this matter?
It might not. I don't think you can technically be "present" on a channel if the connection has closed, but I'd like to understand the error better in case I should be structuring my React component differently.
Thank you!
┆Issue is synchronized with this Jira Task by Unito
The text was updated successfully, but these errors were encountered: