Companion ACKs a direct message that it then drops when the offline queue is full
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- c
- Domain
- backend, networking
Research direction
Start with addToOfflineQueue() in examples/companion_radio/MyMesh.cpp (lines 224–246) and the ACK path in BaseChatMesh::onPeerDataRecv() in src/helpers/BaseChatMesh.cpp (around lines 239–254). Trace how onMessageRecv() handles direct messages when the queue is full and how that result controls ACKs. Done when a dropped message is not acknowledged, with queue eviction behavior clarified if implementing the broader suggestion.
Written by the indexing model from the issue text.
Description
When the companion's offline queue is full (OFFLINE_QUEUE_SIZE, default 16) and holds no channel messages, addToOfflineQueue() drops the incoming direct message (examples/companion_radio/MyMesh.cpp, dev, lines 224-246). BaseChatMesh::onPeerDataRecv() still sends the ACK afterwards (src/helpers/BaseChatMesh.cpp, around lines 239-254), because onMessageRecv() returns void.
Result: the sender sees the message as delivered, but it never reaches the app. This happens when the phone is disconnected for a while and more than 16 DMs arrive.
Suggested fix, in increasing scope:
- Let
onMessageRecv()return whether the message was stored, and only ACK when it was. The sender then retries later, as it would for an unreachable node. - When the queue is full of DMs, evict other non-DM frames first, and only refuse (no ACK) as a last resort.
- Optionally, keep the offline queue in flash so a reboot or empty battery does not lose ACKed messages.
Related: #1834 (failed delivery shown but message received) is the inverse case; this one reports success while the message is lost.
- Dominant language
- C
- Stars
- 3.9k
- Forks
- 1.5k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 26
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from meshcore-dev/MeshCore
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
meshcore-dev/MeshCore#3622 ·
Maintainers usually reply within 1 day
-
[Feature Request] Set Australia (Mid) Preset to automatically enable 2 byte default path hash sizeOpen
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
meshcore-dev/MeshCore#3571 · 5 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
meshcore-dev/MeshCore#3567 · 1 comment ·
Maintainers usually reply within 1 day
-
RTC_RX8130CE writes and reads the one-hot WEEK register as a numberPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
meshcore-dev/MeshCore#3549 ·
Maintainers usually reply within 1 day
-
Repeater: CLI reply to 'setperm <key> 0' is lost when the removed ACL entry sits before the requester (stale ClientInfo* after array shift)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
meshcore-dev/MeshCore#3513 ·
Maintainers usually reply within 1 day
All issues in meshcore-dev/MeshCore
Similar issues
-
v9.6.0: CMake incorrectly enforces presence of libevdevPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
IoTSDK
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Azure/azure-iot-sdk-c#2776 ·
Maintainers usually reply within 2 days
-
[Bug] Unhandled ValueError terminates watchdog thread when GISRC value contains multiple colonsOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
bug Component component: net
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RT-Thread/rt-thread#11913 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
contiki-ng/contiki-ng#3289 ·
Maintainers usually reply within 3 days