-
Notifications
You must be signed in to change notification settings - Fork 376
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
Cannot read properties of null (reading 'once') in 'promise.js' #974
Comments
You shouldn't use Use |
Thanks @sonnyp for the reply and insight! The reason why I'm sometimes using Using If I want to achieve the same without Sorry for replying on an issue that you closed, just wanted to add additional information in case it is of any use 🙇 |
That's the expected behavior. It's a bug otherwise.
Honestly, I would much rather receive PRs with tests and documentation / explanations. I don't use xmpp.js in a professional setup currently as such all of my work here is 100% volunteer. I could use some help :) |
Regarding network reliability, I think our best bet is to have a built-in/upstream solution. Something like #1005 . I believe @singpolyma will rebase it so we could have it in the next release of xmpp.js |
Describe the bug
Upon calling client.disconnect(); I notice I sometimes having the following problem raised in promise.js
Sadly, I'm not completely sure about how to reproduce this problem as it might be related to the reconnection mechanism being triggered, or because of multiple disconnection attempts being called in parallel?
Logs
It seems that the problem is that the
socket
has been reset tonull
(maybe while the promise was awaited?), probably by the_detachSocket
method. but I'm not sure of the order of events that allow this to happen. It seems this happens while handling a timeout error from a ping we send from clients to the server in order to check if the client is indeed still connected; so maybe there was some concurrent event happing at that time leading to the socket being reset.Environment
As much as possible information about the environment running xmpp.js
browser: Chrome 109.0.0
Xmpp.js version: 0.13.1
The text was updated successfully, but these errors were encountered: