Chat not loading when clicking fast

hi team,

We have integrated cometchat JS on our website, however when we click on a chat quickly as the page loads, we are getting an error. When we wait a bit, it loads fine, but when user clicks fast it is getting this error on the console

any idea how to fix it

Hi @flipspot
Can you please share your code snippet ?

What code snippet do you need exactly? How can i know which script of cometchat is causing this issue?

Does this happen with anyone else. we have toolbar chat, and if we quickly click on a chat before its loaded, we get this error. @priyadarshini.nadar

The error is occurring because the messages are being fetched before the user is logged in. Can you try moving the code of fetching messages on the success callback of login?

but the user is already logged in…

Hi @flipspot,
Can you share your code snippet?