Error 463 permanent on cold sends for instances paired before v0.7.2 — NCT salt never backfilled
Maintainer thường phản hồi trong vòng 5 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Bắt đầu với đường dẫn events.Connected và handleAppStateSyncKeyShare, sau đó kiểm tra cstoken.go, message.go và hành vi của kho lưu trữ salt NCT được mô tả trong issue. So sánh lệnh gọi regular_high FetchAppState thông thường với bootstrap bắt buộc được đề xuất và xác minh rằng một instance pre-v0.7.2 có salt rỗng có thể khôi phục các lần gửi lạnh mà không lặp lại bootstrap vô thời hạn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Instances that were paired before v0.7.2 (when the project dropped the custom whatsmeow-lib fork and switched to official upstream go.mau.fi/whatsmeow) never receive the NCT salt, and therefore can never generate a <cstoken> for first-contact (cold) 1:1 sends. This makes error 463 (NackCallerReachoutTimelocked) permanent for any pre-v0.7.2 instance trying to message a number it has never talked to before — it never self-heals, no matter how many times the instance reconnects.
Root cause
generateCsToken(whatsmeowcstoken.go) requirescli.Store.NCTSalt.GetNCTSalt(ctx)to return a non-empty salt. We confirmed via direct Postgres inspection thatwhatsmeow_nct_saltis completely empty (0 rows) for an instance that has been connected and working for months.- The salt is only delivered through two whatsmeow-internal paths: (1) the one-time History Sync payload sent right after a fresh QR pairing (
message.go,historySync.GetNctSalt()), or (2) an App State Sync patch (regular_highcategory,nct_salt_syncmutation index) fetched viaFetchAppState. - Instances paired before v0.7.2 went through their one-time History Sync using the old custom fork, which had no concept of NCT salt at all — that one-time opportunity is gone forever for those instances.
- Going forward,
regular_highshould self-heal viahandleAppStateSyncKeyShare, but that function callsFetchAppState(ctx, name, false, onlyResyncIfNotSynced=true)— andonlyIfNotSyncedskips categories that already have some stored version, even if that version predates cstoken support and never actually captured the salt mutation. So already-synced-but-stale categories are never re-fetched, and the instance is stuck permanently.
How Baileys solved the identical problem
Baileys hit the exact same gap and fixed it in WhiskeySockets/Baileys#2438 with a dedicated ensureNctSaltSynced() (in chats.ts): on every connection.update → open, if no salt is stored yet, it force-fetches regular_high on its own — independent of the normal "already synced" gating, guarded on the persisted regular_high version so it bootstraps at most once and never loops for accounts that legitimately have no salt yet.
Suggested fix
Port the equivalent of ensureNctSaltSynced() into evolution-go (or ideally into go.mau.fi/whatsmeow itself, so all consumers benefit): on events.Connected, if cli.Store.NCTSalt.GetNCTSalt(ctx) is empty, call cli.FetchAppState(ctx, appstate.WAPatchRegularHigh, true, false) once (forcing fullSync=true, onlyIfNotSynced=false specifically for this bootstrap case), guarded so it only runs once per process/instance to avoid loops for accounts that genuinely have no salt provisioned server-side yet.
Impact
Affects any instance paired before the org's whatsmeow upgrade (in our case, before 2026-07-03 / v0.7.2). For anyone doing bulk migrations of older instances (e.g. from a different provider) into evolution-go, this silently breaks first-contact/cold outreach sends indefinitely, with no error message pointing at the actual cause (surfaces only as server returned error 463 on /send/text, identical to the generic reach-out time-lock).
Environment
- evolution-go v0.7.2 (
go.mau.fi/whatsmeow v0.0.0-20260630180629-b572e5bcb92b) - Instance paired 2026-02-18 (pre-v0.7.2, custom
whatsmeow-libfork era) - Confirmed via direct query:
whatsmeow_nct_salt= 0 rows,whatsmeow_privacy_tokens= 0 rows for the affected contact,whatsmeow_lid_mapcorrectly populated (so LID resolution is not the issue)
- Ngôn ngữ chính
- Go
- Star
- 890
- Fork
- 473
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của evolution-foundation/evolution-go
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
evolution-foundation/evolution-go#193 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
evolution-foundation/evolution-go#104 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
evolution-foundation/evolution-go#101 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
evolution-foundation/evolution-go#97 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
evolution-foundation/evolution-go#204 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
Tất cả issue của evolution-foundation/evolution-go
Issue tương tự
-
agent-butler-finding chore
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
jordansmall/spindrift#4146 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
IBM/ibmcloud-volume-file-vpc#119 ·
-
security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
IBM/networking-go-sdk#339 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
kubernetes-sigs/mcp-lifecycle-operator#439 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: global bug dx priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày