Whatsapp Troubleshooting
Symptom: "WhatsApp needs authentication. Scan QR code." when syncing
Cause: The bridge session expired or was never linked — the sync endpoint returns PRECONDITION_FAILED with QR_READY.
Fix: Click Sync All again; the app fetches a fresh QR payload and opens the scan modal. Scan it with your phone, and the completed scan auto-retries the sync.
Symptom: "Sync failed. Could not sync. Ensure bridge is running."
Cause: The WhatsApp bridge service did not answer (it is down, restarting, or unreachable from the web app).
Fix: Confirm the bridge process is up, then retry Sync All once the service responds.
Symptom: Syncing works but a chat or group never appears
Cause: Only valid stored targets persist — unsupported chat ids are skipped during syncAll.
Fix: Check the contact's phone number format (country code, digits only) and re-run the sync; group chats must be real WhatsApp groups.
Symptom: "Cannot access a chat you did not create" / chats missing from the list
Cause: Your chats permission has access level "own", which scopes list, thread, and analysis reads to chats you created.
Fix: Ask a System Manager for all-scope chats access, or have the chat's creator link groups to the deal you share.
Symptom: Creating a deal group fails with "No edit permission for deals"
Cause: Group create/link/unlink write to the deal's whatsapp_client_group_id or whatsapp_team_group_id field, so deals edit access is checked first (own-scope users must own the deal).
Fix: Get deals edit permission (or work on deals you created), then retry.
