Skip to content

Messages are stored and searchable, but message list becomes empty after refresh in channels and DMs #40152

@mrkotelap-eng

Description

@mrkotelap-eng

Description

We are experiencing an issue where messages are successfully stored in Rocket.Chat and can be found via message search, but the main message list in channels and direct messages becomes empty after a page refresh or after leaving and re-entering the room.

This happens consistently and makes the chat unusable, even though the data is still present in MongoDB.

Environment

  • Rocket.Chat version: 8.3.2
  • MongoDB version: 8.0.20
  • Deployment method: Docker Compose
  • OS: Ubuntu Server 24.04.4 LTS
  • Browser(s): Chrome, Edge
  • Desktop app: Official Rocket.Chat Desktop App
  • Network: local/self-hosted deployment

What we see

  • Messages are sent successfully
  • Messages are stored in MongoDB
  • Messages are found by Rocket.Chat search
  • Unread counters work
  • Opening a room may show unread count correctly
  • After refresh, the room/channel opens but the main message area is empty
  • If searching for the message, Rocket.Chat finds it and can navigate to it
  • However, normal room history is still not rendered in the main view

Reproduction steps

  1. Open Rocket.Chat
  2. Create a channel (for example test) or open a DM
  3. Send several messages
  4. Confirm they are visible immediately after sending
  5. Refresh the page (F5) or leave the room and open it again
  6. The message list becomes empty
  7. Use message search
  8. The messages are found in search results

Expected behavior

Previously sent messages should remain visible in the room/channel after refresh or after re-entering the room.

Actual behavior

The room/channel message list is empty after refresh, but messages still exist and are searchable.

Important checks already done

1. MongoDB confirms messages exist

We checked MongoDB directly and messages are present in the rocketchat_message collection.

Example:

  • room exists in rocketchat_room
  • subscriptions exist in rocketchat_subscription
  • messages exist in rocketchat_message
  • lastMessage is present in the room document
  • msgs counter is correct

2. Search works

Rocket.Chat search finds the messages by content.

3. Happens in multiple clients

The problem reproduces in:

  • Chrome
  • Edge
  • Official Rocket.Chat Desktop App
  • mobile browser / phone

So this does not appear to be limited to one browser cache.

4. Happens in a clean new workspace too

We created a second clean Rocket.Chat instance on a separate port with:

  • fresh MongoDB
  • fresh Rocket.Chat
  • no migrated data
  • minimal default setup

The same issue still happens there:

  • messages are visible immediately after sending
  • after refresh, the room becomes empty
  • search still finds the messages

5. UTF8/customization rollback

We tested with:

  • UTF8 settings restored / simplified
  • custom regex removed
  • no improvement

6. No relevant server-side save errors

Rocket.Chat logs do not show message-save failures.
MongoDB stores the messages normally.

Relevant observations

  • This affects both channels and DMs
  • The issue is not data loss
  • It looks like a rendering / room history loading / pagination / main room view problem
  • Search sees the data, but the main timeline does not render it after refresh

Logs

Rocket.Chat starts normally and connects to MongoDB successfully.

Example startup lines:

  • Connected to MongoDB database: rocketchat
  • SERVER RUNNING

The only recurring log issues are external timeout errors to Rocket.Chat Cloud / Marketplace, which do not seem related:

  • Failed to communicate with Rocket.Chat Cloud
  • Error getting app request stats from marketplace

Additional note

This is reproducible and blocks normal usage of Rocket.Chat because users cannot see room history after reload, even though all messages are still stored and searchable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions