Closed Bug 1855291 Opened 2 years ago Closed 2 years ago

Crash in [@ mozilla.appservices.fxaclient.FxaException$Other: at mozilla.appservices.fxaclient.FfiConverterTypeFxaError.read(fxa_client.kt)]

Categories

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

Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
firefox118 --- unaffected
firefox119 --- fixed
firefox120 --- fixed

People

(Reporter: cpeterson, Assigned: bdk)

Details

(Keywords: crash, regression)

Crash Data

Attachments

(2 files)

This crash looks like a possible regression in Fx 119 or 120.

Crash report: https://crash-stats.mozilla.org/report/index/86bdbbe5-0f4d-461a-9117-e76f60230926

Exception: mozilla.appservices.fxaclient.FxaException$Other
Message: "other error" or "network error"

Frame   Module  Function  Source
0   mozilla.appservices.fxaclient.FfiConverterTypeFxaError  read  fxa_client.kt:4
1   mozilla.appservices.fxaclient.FfiConverterTypeFxaError  read  fxa_client.kt:1
2   mozilla.appservices.fxaclient.FfiConverter$DefaultImpls   liftFromRustBuffer  fxa_client.kt:13
3   mozilla.appservices.fxaclient.FfiConverterRustBuffer$DefaultImpls   liftFromRustBuffer  fxa_client.kt:6
4   mozilla.appservices.fxaclient.FfiConverterTypeFxaError  liftFromRustBuffer  fxa_client.kt:2
5   mozilla.appservices.fxaclient.FfiConverterTypeFxaError  liftFromRustBuffer  fxa_client.kt:1
6   mozilla.appservices.fxaclient.FfiConverterRustBuffer$DefaultImpls   lift  fxa_client.kt:7
7   mozilla.appservices.fxaclient.FfiConverterTypeFxaError  lift  fxa_client.kt:3
8   mozilla.appservices.fxaclient.FfiConverterTypeFxaError  lift  fxa_client.kt:2
9   mozilla.appservices.fxaclient.FxaException$ErrorHandler   lift  fxa_client.kt:2
10  mozilla.appservices.fxaclient.FxaException$ErrorHandler   lift  fxa_client.kt:1
11  mozilla.appservices.fxaclient.Fxa_clientKt  checkCallStatus   fxa_client.kt:75
12  mozilla.appservices.fxaclient.Fxa_clientKt  access$checkCallStatus  fxa_client.kt:1
13  mozilla.appservices.fxaclient.FirefoxAccount  getManageAccountUrl   fxa_client.kt:69
14  mozilla.appservices.fxaclient.PersistedFirefoxAccount   getManageAccountURL   PersistedFirefoxAccount.kt:8
15  mozilla.components.service.fxa.FirefoxAccount   getManageAccountURL   FirefoxAccount.kt:5
16  org.mozilla.fenix.settings.account.AccountSettingsFragment$getClickListenerForManageAccount$1$1   invokeSuspend   AccountSettingsFragment.kt:54
17  kotlin.coroutines.jvm.internal.BaseContinuationImpl   resumeWith  ContinuationImpl.kt:9
18  kotlinx.coroutines.DispatchedTask   run   DispatchedTask.kt:112
19  android.os.Handler  handleCallback  Handler.java:942
20  android.os.Handler  dispatchMessage   Handler.java:99
21  android.os.Looper   loopOnce  Looper.java:223
22  android.os.Looper   loop  Looper.java:324
23  android.app.ActivityThread  main  ActivityThread.java:8489
24  java.lang.reflect.Method  invoke  Method.java:-2  False
25  com.android.internal.os.RuntimeInit$MethodAndArgsCaller   run   RuntimeInit.java:582
26  com.android.internal.os.ZygoteInit  main  ZygoteInit.java:996
Severity: -- → S3
Component: General → Accounts and Sync

:royang this is very low volume, but any idea what this was caused by?

Flags: needinfo?(royang)

Looks like this needs application services help. I can follow the call to here: https://github.com/mozilla/application-services/blob/760cfdb46ff7b572b0a40d3778a5384c112fd8ec/components/fxa-client/ios/FxAClient/PersistedFirefoxAccount.swift#L199C6-L199C6. But looks like there was a Fxa Error when getting mange account status.

Flags: needinfo?(royang)

Ben, does this ring a bell to you? You have a PR up which touches some of this IIUC, so your thoughts would be appreciated!

Flags: needinfo?(bdeankawamura)

Looks like this is happening because the account settings fragment is asking FirefoxAccount for a manage account URL and the Rust component is throwing. I'm not sure what the "Other" error is, but a network error seems like a normal situation to me.

I think the simplest fix would be to wrap getManageAccountURL with handleFxaExceptions. This means that it will now can return a null result, so all callers may need to be adjusted to handle that. But I'm guessing that should be relatively easy, the account settings fragment already has a branch for null.

Flags: needinfo?(bdeankawamura)

Once PR#3918 is merged I put up a PR for this (assuming the above is correct).

:bdk we are the last week of beta Fx119 - will this be safe to uplift for Fx119 before RC week?
Can this be assigned?

Flags: needinfo?(bdeankawamura)

Definitely not. I didn't realize it was this pressing. Let me try to put something together using the current code.

Flags: needinfo?(bdeankawamura)

https://github.com/mozilla-mobile/firefox-android/pull/4018 is approved. I'm not sure what the next step is for uplift, just tell me if you need help moving this along.

Once this lands in main, you can follow the guide here https://github.com/mozilla-mobile/firefox-android/blob/main/docs/shared/uplift_guide.md
(Summary - create a backport to releases_v119, add an uplift request on the backport, and RelMan will take handle it after that)

Status: NEW → RESOLVED
Closed: 2 years ago
Flags: qe-verify+
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch
Assignee: nobody → bdeankawamura

I'm I doing something wrong with the backport request? I don't see mergify responding to my action.

Hello,

We've verified the Manage Account & Account settings sections on the latest Nightly (120.0a1) from 13nd of October 2023, and we did not receive any crashes. We've tried to open the "Manage account" section, it behaved well, without any issues encountered. All of the options in the Account settings are working properly.

Devices used for testing:

  • Samsung Galaxy S22 (Android 13)
  • Lenovo Tab P11 Plus (Android 12)

Is there anything the QA should verify regarding this ticket?
Thanks!

Flags: needinfo?(bdeankawamura)

The backport was created but it wasn't added as an attachment here (will reach out to see why BMO Github Automation didn't run)
This still needs an uplift request for review before I can merge it

To unblock getting details to merge https://github.com/mozilla-mobile/firefox-android/pull/4064
I need info on the following:

Beta/Release Uplift Approval Request

  • User impact if declined:
  • Is this code covered by automated tests?:
  • Has the fix been verified in Nightly?:
  • Needs manual test from QE?:
  • If yes, steps to reproduce:
  • List of other uplifts needed:
  • Risk to taking this patch:
  • Why is the change risky/not risky? (and alternatives if risky):
  • String changes made/needed:

Managed to get the attachment added to the bug, the uplift request can be added there now

Comment on attachment 9358322 [details] [review]
[mozilla-mobile/firefox-android] Bug 1855291 - Handle FxA exceptions in getManageAccountURL (backport #4018) (#4064)

Beta/Release Uplift Approval Request

  • User impact if declined: Some crashes in firefox-android
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The code changed is very small and handleFxaExceptions is already used in other methods for similar functionality.
  • String changes made/needed:
  • Is Android affected?: Yes
Flags: needinfo?(bdeankawamura)
Attachment #9358322 - Flags: approval-mozilla-beta?
Comment on attachment 9358322 [details] [review] [mozilla-mobile/firefox-android] Bug 1855291 - Handle FxA exceptions in getManageAccountURL (backport #4018) (#4064) Approved for Fenix 119.0b9
Attachment #9358322 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: