RocketChat / RocketChat/Rocket.Chat
fix: JS Error "Invalid Token" after reloading page with active Livechat
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
A JavaScript error is triggered when a page embedding the Rocket.Chat Live Chat widget is reloaded while a conversation is currently in progress.
Steps to Reproduce:
Open a page with the integrated Live Chat widget.
Start a chat conversation (send/receive at least one message).
Reload the browser page (F5) while the chat session is active.
Observe the browser console.
Expected Behavior:
The widget should reload gracefully, re-establish the existing session, and display the previous message history without throwing errors.
Actual Behavior:
A JavaScript error is triggered (see screenshot/log below), potentially disrupting the widget initialization.
Server Setup Information:
- Version of Rocket.Chat Server: 8.2.1
- License Type: Starter
- Number of Users: 0-25
- Operating System: Debian
- Deployment Method: Docker
Client Setup Information
- Browser Version: Firefox 140.8.0
- Operating System: Windows 11
- Standard Livechat-Widget Installation
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reload flow with an active Live Chat conversation and inspect the browser console in Firefox. Trace widget initialization and restoration of the existing session after reload. Done means the widget reloads without the Invalid Token error, restores the session, and displays previous message history.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100