-
-
Notifications
You must be signed in to change notification settings - Fork 880
Open
Description
Messages are being marked as "delivered" (double gray check) but the recipient never sees them. This occurs when WhatsApp's Phone Number (PN) to Linked Identity (LID) session migration fails silently.
Environment
- whatsmeow version: v0.0.0-20251203212742-364369929a75
- Go version: go 1.24.0
Steps to Reproduce
- Send a message to a contact whose account has been migrated to WhatsApp's LID system
- The message shows as "delivered" on sender side (double gray check)
- Recipient never receives the message on their main device
- Expected Behavior
- Message should be delivered and visible on all recipient devices, or sender should receive a retry request to re-encrypt with proper session.
Actual Behavior
- Message is encrypted successfully for secondary devices (:57, :58) using pkmsg (pre-key message)
- Main device (:0) encryption fails silently: no signal session established with _1:0
- No session migration occurs: No sessions or sender keys found to migrate from to _1
- Delivery receipt is received (because secondary devices got it)
- No retry receipt is ever received for the main device
- Recipient never sees the message on their primary device
Log Evidence
[WARN] Failed to encrypt <msgID> for <PN>@s.whatsapp.net: can't encrypt message for device: no signal session established with <LID>_1:0
[DEBUG] No sessions or sender keys found to migrate from <PN> to <LID>_1
[DEBUG] Sending <msgID> to <PN>@s.whatsapp.net with pkmsg (prekey) to <LID>_1:57, <LID>_1:58
Root Cause Analysis
The issue appears to be in the PN→LID session migration logic. When WhatsApp migrates a user from phone number addressing to Linked Identity:
- Existing Signal sessions are tied to the old PN identifier
- Migration should copy/recreate sessions for the new LID identifier
- Migration fails: "No sessions or sender keys found to migrate"
- Main device (:0) has no valid session, but secondary devices can receive via pre-key messages
- Delivery receipts from secondary devices trick the sender into thinking message was delivered
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels