Use this page when chat doesn't behave the way you expect. Find your symptom below; each section explains what's going on and how to fix it.
Before you start, check two things. They solve most problems:
- Listen for
errorevents in your app. Most failures are reported there, not thrown. See Chat Events. - Check membership. A user who isn't a member of a conversation gets
ROOM_NOT_FOUND, not "forbidden". See Members.
| Symptom | Jump to |
|---|---|
ROOM_NOT_FOUND on connect or send | User can't see the conversation |
| Duplicate messages after a retry | Duplicates |
| Gaps after reconnecting | Missed messages |
| Others don't see my message | Message not showing |
| Can't edit or delete | Edit / delete fails |
Connection closes with 4403 | Origin refused |
| User still shows online | Stale presence |
"I get ROOM_NOT_FOUND for a conversation that exists"
Livqeno answers "not found" to users who aren't members, so outsiders can't learn which conversations exist. Check, on your backend:
- The conversation has members. One created without
membersis locked to everyone. See Conversations. - This user is a member:
listMembers('support-room-42'). - The
userIdinaddMemberand increateTokenmatch exactly. - The token response's
pendingMembershipis empty. - Your API key and the user's token are for the same environment.
"My retried send created a duplicate message"
This shouldn't happen. Retries are caught on the server.
- Make sure you retry with the same
clientMessageId. A new id each time means a new message. See Messages → Idempotency. - If it still happens every time, it's a bug. Please report it.
"I reconnected and missed messages"
The SDK catches up for you after a reconnect. Missed messages arrive through
the normal message event. When catch-up ends, recovered fires:
chat.on('recovered', (summary) => {
if (summary.gap) reloadView(); // some history was skipped
// summary.errors: rooms that will retry on the next reconnect
});If you use the raw WebSocket instead of the SDK, load what you missed with a cursor. See Message History.
"A message I sent isn't showing up for other users"
- Listen for
errorevents. A refused message never comes back as amessageevent. If you only listen for success, you miss the failure. - Check the token. It needs
chat:sendfor that conversation. See Authentication. - Check the other user is connected to the same conversation. They only
get live events for conversations they joined in
connect(). Otherwise they'll see it later in history.
"Deleting or editing someone else's message fails"
This is expected:
- Only the author can edit.
- Deleting someone else's message needs
chat:moderate(aMODERATORorADMIN). See Moderation.
"The connection closes with 4403"
Your site's address (its origin, like https://app.example.com) isn't on
the project's allowed list. The token is fine, and retrying won't help.
Add the origin under Project Settings → Security → Allowed Origins.
localhost is allowed by default. See
Browser security.
"Someone still shows online after closing the tab"
If the tab closed without a clean disconnect, the server finds out when their presence expires. That takes up to 45 seconds. See Presence.
Still stuck?
- Look up the error code in Errors.
- Debug the raw frames with WebSocket Protocol.
- When you report a bug, include your SDK version. Import it and log it:
import { CHAT_SDK_VERSION } from '@livqeno/chat'; console.log(CHAT_SDK_VERSION);