Skip to content

chats list and contacts list return empty on self-hosted server (data exists in DB) #14

@juulieen

Description

@juulieen

Summary

beeper chats list and beeper contacts list return no results on a self-hosted Beeper Server, even though the internal SQLite database contains data. beeper messages search works correctly.

Environment

  • OS: Ubuntu 22.04 (headless ThinkPad T470s)
  • Beeper Server: 4.2.877 (stable channel)
  • beeper-cli: 0.6.2
  • Setup method: beeper setup --server --install + auth email start/response + verify recovery-key

Steps to reproduce

  1. Install Beeper Server on a headless Linux machine:
    beeper setup --server --install --channel stable --yes
  2. Authenticate via email flow and verify with recovery key
  3. Wait for server to reach Ready state (beeper doctor reports healthy)
  4. Run beeper chats list or beeper contacts list

Expected behavior

Chats and contacts should be listed.

Actual behavior

$ beeper chats list --limit 5
▎ No chats matched
  Connect an account or sync existing chats.

$ beeper contacts list --limit 5
✓ 0 contacts
▎ No contacts found

$ beeper contacts search "julien"
✓ 0 matches across 7 accounts

But message search works fine:

$ beeper messages search "bonjour" --limit 1
✓ 1 match
▎ you                                                 May 8
  Bonjour, je cherche à offrir une inscription...

And listing messages for a specific chat returns 500:

$ beeper messages list --chat !PJGX6eLAH5qLk7Cvozuu:beeper.local
Error: 500 Failed to execute tool: listMessages

Investigation

Server state is fully healthy:

  • beeper doctor → healthy, all E2EE secrets OK, firstSyncDone: true
  • beeper accounts list → 7 bridges all connected (WhatsApp, Signal, Facebook, Instagram, LinkedIn, Google Messages, Matrix)
  • No chat list filters active (chatFilter: "all")

API returns empty:

GET /v1/chats → {"items":[],"hasMore":false} (200 OK, 5ms)
GET /v1/chats?accountIDs=whatsapp → {"items":[],"hasMore":false}

But the SQLite database has the data:

-- ~/.beeper/profiles/server/server/index.db

SELECT COUNT(*) FROM threads;            -- 585
SELECT COUNT(*) FROM mx_room_messages;   -- 576
SELECT COUNT(*) FROM participants;       -- 6611
SELECT COUNT(*) FROM participant_identifiers; -- 2483
SELECT COUNT(*) FROM users;              -- 0  ← empty!

SELECT accountID, COUNT(*) FROM threads GROUP BY accountID;
-- whatsapp: 214, gmessages: 191, facebookgo: 66,
-- linkedin: 51, instagramgo: 36, signal: 13, ...

Key observation: The threads table (585 rows) and participants table (6611 rows) are populated, but the users table is empty (0 rows). The API likely queries users for contacts and a similar high-level view for chats, which are never populated.

Server logs show:

  • lazy-thread-loaded--sync events during sync
  • [syncEventsToAccount] queued N events for unloaded account warnings (750+ occurrences)
  • No errors related to the API endpoints

Reproduces on clean install — complete wipe of ~/.beeper/profiles/server/ and ~/.beeper/apps/server/ followed by fresh setup produces the same behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions