Skip to content

[BUG] Messages not delivered when sending via admin token - "appid is invalid" suddenly occurs #3568

@ashin0808

Description

@ashin0808

OpenIM Server Version

3.7.0

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Docker Deployment

Bug Description and Steps to Reproduce

[v3.7.0] Messages not delivered when sending via admin token - "appid is invalid" suddenly occurs

Hi OpenIM team,

We are running OpenIM v3.7.0 deployed via docker-compose in production.

Our messaging flow is:

Sender: our own backend server (not SDK) sends messages using the admin token via OpenIM API.
Receiver: clients use the official SDK to receive messages.
All clients are connected via WebSocket and sending/receiving heartbeats normally.
Initially, everything worked as expected. However, recently we suddenly observed that a large number of messages failed to reach the client.

Key points:

WebSocket connections remain active and heartbeats are normal during the issue.
Messages are sent from the server side with admin token, but fail to be delivered to clients.
Logs show "appid is invalid" in the push service and "redis: nil" in the message service.
The problem started suddenly without any changes to configs or deployment.
Restarting services temporarily restores functionality, but the issue comes back.
Logs:

push failed {"error": "code 20001, msg appid is invalid"}

GetMessagesBySeq failed {"error": "redis: nil"}

Example client connection log shows the user still online:

WebSocket connected, sending heartbeats normally

No message received during push failure period

Environment:

Version: OpenIM v3.7.0
Deployment: docker-compose (MongoDB, Redis, Kafka, etcd, MinIO)
Redis password configured and accessible by all services
Nginx used for SSL termination and WebSocket proxying, heartbeat interval < timeout
Questions:

Could "appid is invalid" occur when sending messages via admin token if some internal appid or session expires?
Why would "appid" suddenly become invalid without any deployment or configuration changes?
Can this "appid is invalid" cause Redis not to store messages ("redis: nil")?
Are there any known issues in v3.7.0 with admin token message sending that would require upgrading or fixing?
Request:

Please help:

Confirm the root cause of "appid is invalid" in this scenario.
Suggest how to configure/admin token message sending to avoid this issue.
Let us know if this is a known bug and if there is a patch or workaround available.
Thanks!

Screenshots Link

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions