Closed evgeniy-skakun closed 4 years ago
I'm facing the same issue
Any solutions?
Can you please check if you are connected to our WS servers? You can use CometChat.getConnectionStatus() and fetch messages if it returns CONNECTED
. Also, you can use the Connection Listener, which will give real-time updates of the WS Connection.
Documentation: https://prodocs.cometchat.com/docs/js-advanced-connection-listeners
@mayur-bhandari Do you mean that the main reason why I have this problem is the lack of connection and to avoid such a problem I need to wait until I have the connection status "connected"?
Hello,
Yes, the error is due to the connection to our WS server. Can you please share screenshot of the network tab (especially the WS section).
so far everything is working fine, I listen to the connect event and if status = connected
I execute messagesRequest.fetchPrevious()
. As I mentioned it is a floating error, so if everything is ok after testing, I will close the issue.
Describe the problem
Sometimes I see the browser throwing the
TypeError: Cannot read property 'jid' of undefined
error when doingthis.messagesRequest.fetchPrevious()
and I can't catch this errorWhat was the expected behavior?
when such an error occurs, I would like to be able to catch it
Reproduction
this is a floating error and I have no steps to reproduce
Environment