Fix WhatsApp Admin QR bind and show the scan prompt only after Bind.

Use a current WA protocol version, start the sidecar via local tsx with inherited proxy, and stop auto-opening the QR UI on unbound connecting.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-17 23:54:48 +08:00
parent 5c6833612f
commit 9cf026f605
12 changed files with 593 additions and 101 deletions

View file

@ -793,9 +793,9 @@ export default {
"wa.sessionUnbindConfirm": "Stop sidecar and delete local WhatsApp auth (state/auth). You must scan again to rebind. Continue?",
"wa.sessionRebindConfirm": "Clear the old session and show a new QR code. Continue?",
"wa.sessionNotInstalled": "Sidecar not installed. Run whatsapp_install.ps1 first.",
"wa.sessionScanHint": "On your phone: WhatsApp → Linked devices → Link a device, then scan the QR below.",
"wa.sessionScanHint": "On your phone: WhatsApp → Linked devices → Link a device, then scan the QR below. Codes expire in about 20s; this page auto-refreshes to the latest one.",
"wa.sessionQrWaiting": "Waiting for QR…",
"wa.sessionQrStale": "QR may be expired. Click Scan to bind again.",
"wa.sessionQrStale": "This QR may have expired. Waiting for a new one…",
"wa.lifecycle.unbound": "Not bound",
"wa.lifecycle.bound_stopped": "Bound (sidecar stopped)",
"wa.lifecycle.bound_offline": "Bound (offline / reconnecting)",
@ -806,6 +806,9 @@ export default {
"wa.lifecycle.needs_rebind": "Session invalid (re-scan required)",
"wa.sessionPolling": "Refreshing status…",
"wa.sessionNeedsRebind": "WhatsApp rejected the stored session (e.g. disconnect=405). Click Re-scan bind, or remove the old oclaw linked device on your phone first.",
"wa.sessionPairingFail": "WhatsApp rejected pairing before a QR (often 405). Retrying with fresh keys; if it keeps failing, check proxy/DNS then click Scan to bind.",
"wa.sessionNetworkFail": "Cannot reach WhatsApp Web (certificate/timeout/ECONNRESET). Clash fake-ip is a common cause. Set HTTPS_PROXY or AIA_WHATSAPP_PROXY_URL to your local mixed-port proxy, then start the sidecar again.",
"wa.sessionRunnerWaiting": "Sidecar process is up, but Baileys has not written status yet (npx hang or missing proxy). Wait a bit, or check data/logs/whatsapp_sidecar.log.",
"wecom.autoBind": "Auto bind on first message",
"wecom.autoBindRole": "Auto bind role",
"wecom.autoBindTenant": "Auto bind team",