-
Notifications
You must be signed in to change notification settings - Fork 11k
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
[Bug]: Livechat - Calling registerGuest()
method with existing set token causes blank chat
#32042
Comments
Hello @harvard1932 can you give us more info? Where exactly is the chat history blank? In the livechat widget or in the main Rocket.Chat view? Do you have any errors on your browser console? What exactly are the steps to reproduce the issue? Thanks! |
I wanted to work in thus issue please Assign this issue to me. |
The issue is that javascript call to add chat information like customer name, email, etc. Would trigger the chat history to disappear on basically overwriting older call on which populates chat history. |
I have added some replication information on this bug |
sure assign it to me and I look into it |
@Visbhavesh no need for assignment, if you find something you want to work on, feel free to work on it and create a PR |
Ahh it seems that a livechat API call is overriding your livechat guest token and another conversation is being started (if you send a message in this empty chat you'll see that it creates another conversation as another guest). Some calls like If you need more help with this you'll probably have to share your script (or something similar to what are you doing) that calls the livechat API endpoints Cheers! |
to ensure it Check API Call Order: Review your script and ensure you're not calling registerGuest() and setToken() consecutively. |
Currently we are using:
});
because this.initialize doesnt have any official doc on being able to contain customfields. Thank you so much for your help! This only became of an issue in latest 6.6.4, and it wasn't really an issue in earlier versions. |
Yeah, you might be setting the the
I would also suggest removing the token from This will prevent the register guest to be called when the exact same token is already set on localstorage Hope this helps! |
registerGuest()
method with existing set token causes blank chat
Well.. Because we use the live chat from another domain, it wouldnt have access to the localstorage of the rocketchat server due to cross site limitation. It would still be better suited for rocket chat to fix the issue from the core, or add additional javascript API that allows for checking if guest token exists. |
Running into exact issue on the latest version 6.6.4 as mentioned in https://forums.rocket.chat/t/issue-blank-chats/19092
The text was updated successfully, but these errors were encountered: