Skip to content

bug(macos): WhatsApp reconnect flow on Mac (needs repro) #1346

Closed

Description

@khaira777

Parent: #830 (chat leftovers, 9 Sep report). Needs repro. platform: macOS. Verified against main @ 8e39053.

Report

WhatsApp reconnection is confusing or broken on Mac.

What we know

Steps to try (macOS, DMG and Mac App Store builds)

  1. Pair, quit the app, reopen. Does it reconnect without a QR?
  2. Pair, put the Mac to sleep for at least 10 minutes, then wake it.
  3. Pair, then unlink the device from the phone. Is the re-pair QR shown clearly?
  4. On the MAS build, check that auth files persist in the sandbox container.

Acceptance

  • A repro and fix, plus a clear UI state for "reconnecting" vs "re-pair needed". Or cannot reproduce on 3.13.0, and close.

Activity

  1. khaira777 commented on Oct 26, 2026

    @khaira777
    ContributorAuthor

    Looking into this issue now.

  2. khaira777 commented on Oct 26, 2026

    @khaira777
    ContributorAuthor

    Reproduction and verification results for macOS WhatsApp reconnect and re-pair flow (addressed in #1385):

    1. Pairing credential persistence race (515 restartRequired & app quit):
      • queueCredentialWrite() queued saveCreds() asynchronously on creds.update, allowing an immediate 515 restartRequired reconnect or requestShutdown() to read stale/incomplete auth state before the write flushed. flushCredentialWrites() is now awaited before reconnect and during shutdown.
    2. 515 restartRequired vs 408 unpaired QR timeout:
      • Status 515 now triggers an immediate ~250ms reconnect without incrementing reconnectAttempts or setting lastError.
      • When 408 occurs with no registered credentials (creds.me?.id absent), the service stops background retry loops and transitions cleanly to disconnected so the user can explicitly generate a new QR code.
    3. Reconnect vs re-pair UI state & pairing-code timer:
      • Status API now exposes hasRegisteredCredentials so the UI distinguishes transient reconnects from unpaired re-pair flows.
      • The 60s QR timeout timer skips waiting_pairing and restores pairingMode cleanly if a pairing-code request fails.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededplatform:macosmacOS-specifictype:bugA confirmed defect in existing behavior

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions