Closed Bug 2091690 Opened 7 days ago Closed 5 days ago

Firefox crashes after completing pairing from a scanned pairing link on a cold start

Categories

(Firefox for Android :: Accounts and Sync, defect)

All
Android
defect
Points:
2

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: towhite, Assigned: towhite)

References

(Blocks 1 open bug)

Details

(Whiteboard: [android-activation-trust] [fxdroid])

Attachments

(1 file)

Steps to reproduce

  1. Install Firefox Nightly for Android, complete onboarding, and make sure Firefox is not running.
  2. On desktop Firefox Nightly, open https://accounts.firefox.com/pair/authority/scan_qr to show the pairing QR code.
  3. Scan the QR code with the system camera app, which opens the pairing link in the Firefox auth custom tab.
  4. Complete pairing.

Expected

Pairing completes and the device is signed in.

Actual

Firefox crashes on the main thread as authentication finishes. The custom tab disappears and the camera app is shown again, which looks the same as bug 2090906.

Seen on Nightly 162.0a1 on a Samsung device.

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
    at mozilla.components.service.fxa.manager.FxaAccountManager.authenticationSideEffects(FxaAccountManager.kt:27)
    at mozilla.components.service.fxa.manager.FxaAccountManager.accountStateSideEffects(FxaAccountManager.kt:259)
    at mozilla.components.service.fxa.manager.FxaAccountManager.processQueue(FxaAccountManager.kt:408)
    at mozilla.components.service.fxa.manager.FxaAccountManager$finishAuthentication$2.invokeSuspend(FxaAccountManager.kt:147)

The line numbers are from the R8-minified build. The null is most likely account.getCurrentDeviceId()!! in authenticationSideEffects: after a pairing CompleteOAuthFlow, the account has no current device id yet when the Connected side effects run for Event.Progress.AuthData. Because this throws before notifyObservers { onAuthenticated(...) }, no account observer is told about the sign-in.

Unable to reproduce with the current Nightly on Pixel 7 or Samsung Z Flip 7.

Status: ASSIGNED → RESOLVED
Closed: 5 days ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: