Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Crash in [@ mozilla.appservices.fxaclient.FxaException$Network: at mozilla.appservices.fxaclient.rust.RustError.intoException(RustError.kt:5)] #8492

Closed
mstange opened this issue Sep 24, 2020 · 4 comments
Assignees
Labels
🐞 bug Something isn't working 💥 crash <firefox-accounts> Component: FxA

Comments

@mstange
Copy link

mstange commented Sep 24, 2020

In the last day, the rate of crashes with this signature has gone up considerably. Maybe a regression from #7856? @grigoryk

It sounds similar to #7536 which was about not handling network failures, if I understand things correctly.

Crash report: https://crash-stats.mozilla.org/report/index/92c220aa-3be3-4c80-b071-af3e30200924

Java stack trace:

mozilla.appservices.fxaclient.FxaException$Network
	at mozilla.appservices.fxaclient.rust.RustError.intoException(RustError.kt:5)
	at mozilla.appservices.fxaclient.FirefoxAccount.getTokenServerEndpointURL(FirefoxAccount.kt:9)
	at mozilla.components.service.fxa.FirefoxAccount.getTokenServerEndpointURL(FirefoxAccount.kt:1)
	at mozilla.components.service.fxa.manager.FxaAccountManager.maybeUpdateSyncAuthInfoCache(FxaAccountManager.kt:13)
	at mozilla.components.service.fxa.manager.FxaAccountManager$maybeUpdateSyncAuthInfoCache$1.invokeSuspend(Unknown Source:11)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:3)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:21)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:919)

┆Issue is synchronized with this Jira Task

@grigoryk grigoryk added the <firefox-accounts> Component: FxA label Sep 24, 2020
@grigoryk grigoryk added this to 🏃‍♀️ In Progress in A-C: Android Components Sprint Planning Sep 24, 2020
@grigoryk
Copy link
Contributor

Given timing, most likely a regression from #7856. Here's a Sentry report with a bit more detail, showing the same spike: https://sentry.prod.mozaws.net/operations/firefox-nightly/issues/8905012/?query=is%3Aunresolved

mozilla.appservices.fxaclient.Network: Network error: [no-sentry] Network error: Java error: "fetch error: org.mozilla.geckoview.WebRequestError: Request failed, error=0x25, category=0x5"
    at mozilla.appservices.fxaclient.rust.RustError.intoException(RustError.kt:5)
    at mozilla.appservices.fxaclient.FirefoxAccount.getTokenServerEndpointURL(FirefoxAccount.kt:9)
    at mozilla.components.service.fxa.FirefoxAccount.getTokenServerEndpointURL(FirefoxAccount.kt:1)
    at mozilla.components.service.fxa.manager.FxaAccountManager.maybeUpdateSyncAuthInfoCache(FxaAccountManager.kt:13)
    at mozilla.components.service.fxa.manager.FxaAccountManager$maybeUpdateSyncAuthInfoCache$1.invokeSuspend
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:3)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:21)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:919)

@grigoryk
Copy link
Contributor

We're not handling network failures within getTokenServerEndpointURL, which could happen if remote config needs to be populated within the fxaclient (on startup?).

It's not obvious to me why this is spiking now, as far as I can tell prior to #7856 we were just as vulnerable to this, and I don't think behaviour of getTokenServerEndpointURL changed recently within appservices either.

Either way, patch incoming to handle these failures gracefully.

@grigoryk grigoryk self-assigned this Sep 24, 2020
@grigoryk grigoryk added 🐞 bug Something isn't working 💥 crash labels Sep 24, 2020
grigoryk pushed a commit to grigoryk/android-components that referenced this issue Sep 25, 2020
grigoryk pushed a commit to grigoryk/android-components that referenced this issue Sep 25, 2020
grigoryk pushed a commit to grigoryk/android-components that referenced this issue Sep 25, 2020
grigoryk pushed a commit to grigoryk/android-components that referenced this issue Sep 25, 2020
grigoryk pushed a commit to grigoryk/android-components that referenced this issue Sep 25, 2020
@mergify mergify bot closed this as completed in 01306f8 Sep 25, 2020
A-C: Android Components Sprint Planning automation moved this from 🏃‍♀️ In Progress to 🏁 Done Sep 25, 2020
@mstange
Copy link
Author

mstange commented Sep 29, 2020

Looks like it worked! The graph went back down.

@grigoryk
Copy link
Contributor

grigoryk commented Oct 1, 2020

Excellent!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Something isn't working 💥 crash <firefox-accounts> Component: FxA
Projects
No open projects
Development

No branches or pull requests

2 participants