[v2.3.7] Groups broken with Chatwoot integration: `No session found to decrypt message` (skmsg, @lid), `formatInternational` TypeError, and group sends from Chatwoot silently dropped
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 15/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- docker, postgresql, redis, typescript
調査の方向性
Start with the ChatwootService path that eventWhatsapp takes in the stack traces, where formatInternational is read from an undefined value on fromMe group messages, and with the decryption failure in the Baileys group cipher for @lid participants. Reproduce a group message with addressingMode: "lid" and check whether the group is stored and forwarded. Done means group messages from others and from the phone reach Chatwoot, and a Chatwoot reply is delivered to the group. Check whether PR #2275 is already in the code.
索引モデルが issue の本文から書いたものです。
説明
Environment
- Evolution API:
evoapicloud/evolution-api:v2.3.7(Baileys7.0.0-rc.9), Docker, PostgreSQL 16 + Redis 7 (AOF) - Chatwoot:
chatwoot/chatwoot:v4.18.0(self-hosted), native Evolution ↔ Chatwoot integration - Instance: WhatsApp Business number linked via QR (multi-device, the phone stays connected as the primary device)
- Instance settings:
groupsIgnore: false; Chatwoot integrationignoreJids: [],importMessages: true,reopenConversation: true - Groups use
addressingMode: "lid"(participants arrive as@lidwithparticipantAltas@s.whatsapp.net)
Summary
Private chats work in both directions (Chatwoot messages get a WhatsApp source_id). Group chats fail in three different ways:
1. Messages from other participants are not decrypted (never reach the DB or Chatwoot)
A text message sent to the group by another participant:
{"level":50,"msg":"failed to decrypt message","messageType":"skmsg","author":"<redacted>@lid",
"key":{"remoteJid":"<redacted>@g.us","fromMe":false,"participant":"<redacted>@lid",
"participantAlt":"<redacted>@s.whatsapp.net","addressingMode":"lid"},
"err":{"type":"Error","message":"No session found to decrypt message",
"stack":"Error: No session found to decrypt message
at GroupCipher.decrypt (file:///evolution/node_modules/baileys/lib/Signal/Group/group_cipher.js:35:19)
at async file:///evolution/node_modules/baileys/lib/Utils/auth-utils.js:220:36"},
"isSessionRecordError":false}
{"level":50,"error":{},"msg":"transaction failed, rolling back"}
The message is not saved in the Message table and is not forwarded to Chatwoot.
2. Messages sent to the group from the phone (fromMe) crash the Chatwoot service
An image sent to the group from the primary phone (fromMe: true, participant @lid) is stored in Message (status: SERVER_ACK), but the Chatwoot integration throws:
ERROR [ChatwootService] TypeError: Cannot read properties of undefined (reading 'formatInternational')
at ut.eventWhatsapp (/evolution/dist/main.js:139:2685)
at async messages.upsert (/evolution/dist/main.js:245:30481)
at async /evolution/dist/main.js:263:3930
The message never appears in the Chatwoot conversation for that group.
3. Messages sent from Chatwoot to the group are silently dropped
An agent replies (text or image) in the group conversation in Chatwoot. Chatwoot's WebhookJob to /chatwoot/webhook/<instance> completes successfully (~0.5 s, no error), but Evolution logs nothing (LOG_LEVEL=ERROR,WARN,INFO,LOG), nothing is sent to WhatsApp, nothing is stored in Message, and the Chatwoot message stays sent with an empty source_id. The same flow works for private chats.
Steps to reproduce
- Connect an instance on v2.3.7 with the Chatwoot integration,
groupsIgnore: falseandignoreJids: []. - In a group that uses LID addressing: (a) have another participant send a text, (b) send an image from the primary phone, (c) reply from Chatwoot in the group conversation.
Expected
Group messages are decrypted, forwarded to Chatwoot, and Chatwoot replies are delivered to the group.
Possibly related
- PR #2275 (Chatwoot/LID robustness,
participantAltguard) — merged intodevelop; unclear whether it is in v2.3.7 or 2.4.0. - Issue #1872 ("[META] @lid vs @jid handling").
- 2.4.0-rc1 release notes mention LID mapping; 2.4.0-rc2 notes do not mention Chatwoot or groups.
Is this already fixed in 2.4.0-rc2, or is there a recommended way to get the group sender keys re-distributed to the linked device?
- 主要言語
- TypeScript
- スター
- 10.2k
- フォーク
- 7.5k
- 平均マージ
- 6日 19時間
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
evolution-foundation/evolution-api のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
evolution-foundation/evolution-api#2796 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
evolution-foundation/evolution-api#2795 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
evolution-foundation/evolution-api#2782 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
evolution-foundation/evolution-api#2723 ·
メンテナーはふだん 4 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
evolution-foundation/evolution-api#2704 ·
メンテナーはふだん 4 日以内に返信
evolution-foundation/evolution-api の issue をすべて見る
似ている issue
-
[Bug]: Manager UI logo fails to load — broken external URL対応中かも @kavindu-udara が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
excalidraw/excalidraw#12743 ·
メンテナーはふだん 1 日以内に返信
-
area: cli priority: P2 type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
appandflow/stim#6381 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area: ui-kit type: chore
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
schlessera/brain-kit#4598 ·
メンテナーはふだん 1 日以内に返信
-
good first issue spec
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100