A few debugging notes I wrote for myself that I'll leave here to make future me less sad. - Q. Is the cause related to using `applicationScope`? - Bug [2003023](https://bugzilla.mozilla.org/show_bug.cgi?id=2003023) - Refactor manual CoroutineScope usage to lifecycle-aware scopes - No, because we've been setting the RustHttpConfig from an IO dispatcher since 2021 (see: [link](https://searchfox.org/firefox-main/rev/a7b3748dfc3d43ff7c8f32b8b6299fdb153e0c10/mobile/android/focus-android/app/src/main/java/org/mozilla/focus/FocusApplication.kt#160)) - Sentry has some more symbolicated crash stats, like [this one](https://mozilla.sentry.io/issues/6731080403/?project=6176960&query=is%3Aunresolved) that suggests it's a remote settings worker syncing. - On Jan 19th it seems like the events doubled since the previous day, but this is untrue - Sentry error reporting only goes back 90 days. - Goes back at least as far as 147. - Q. Why does this not occur on Fenix? - Fenix guards against this by blocking the `onCreate` from finishing until `megazordDeferred` is complete. - Q. Why did this occur now? - We are called `RustHttpConfig.setClient` on a background dispatcher that races with the work manager remote settings task. - Bug 2020606 removed eager initialization of WorkManager - this meant that we were getting a full `Application#onCreate` initialization happening first before the work manager task was scheduled. - I was here before: https://github.com/mozilla-mobile/focus-android/issues/5781
Bug 2033229 Comment 1 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
A few debugging notes I wrote for myself that I'll leave here to make future me less sad. - Q. Is the cause related to using `applicationScope`? - Bug [2003023](https://bugzilla.mozilla.org/show_bug.cgi?id=2003023) - Refactor manual CoroutineScope usage to lifecycle-aware scopes - No, because we've been setting the RustHttpConfig from an IO dispatcher since 2021 (see: [link](https://searchfox.org/firefox-main/rev/a7b3748dfc3d43ff7c8f32b8b6299fdb153e0c10/mobile/android/focus-android/app/src/main/java/org/mozilla/focus/FocusApplication.kt#160)) - Sentry has some more symbolicated crash stats, like [this one](https://mozilla.sentry.io/issues/6731080403/?project=6176960&query=is%3Aunresolved) that suggests it's a remote settings worker syncing. - On Jan 19th it seems like the events doubled since the previous day, but this is untrue - Sentry error reporting only goes back 90 days. - Goes back at least as far as 147. - Q. Why does this not occur on Fenix? - Fenix guards against this by blocking the `onCreate` from finishing until `megazordDeferred` is complete. - We should do similar work to Bug 2005839 for Focus as well. - Q. Why did this occur now? - We are calling `RustHttpConfig.setClient` on a background dispatcher that races with the work manager remote settings task. - Bug 2020606 removed eager initialization of WorkManager - this meant that we were getting a full `Application#onCreate` initialization happening first before the work manager task was scheduled. - I was here before: https://github.com/mozilla-mobile/focus-android/issues/5781
A few debugging notes I wrote for myself that I'll leave here to make future me less sad. - Q. Is the cause related to using `applicationScope`? - Bug 2003023 - Refactor manual CoroutineScope usage to lifecycle-aware scopes - No, because we've been setting the RustHttpConfig from an IO dispatcher since 2021 (see: [link](https://searchfox.org/firefox-main/rev/a7b3748dfc3d43ff7c8f32b8b6299fdb153e0c10/mobile/android/focus-android/app/src/main/java/org/mozilla/focus/FocusApplication.kt#160)) - Sentry has some more symbolicated crash stats, like [this one](https://mozilla.sentry.io/issues/6731080403/?project=6176960&query=is%3Aunresolved) that suggests it's a remote settings worker syncing. - On Jan 19th it seems like the events doubled since the previous day, but this is untrue - Sentry error reporting only goes back 90 days. - Goes back at least as far as 147. - Q. Why does this not occur on Fenix? - Fenix guards against this by blocking the `onCreate` from finishing until `megazordDeferred` is complete. - We should do similar work to bug 2005839 for Focus as well. - Q. Why did this occur now? - We are calling `RustHttpConfig.setClient` on a background dispatcher that races with the work manager remote settings task. - Bug 2020606 removed eager initialization of WorkManager - this meant that we were getting a full `Application#onCreate` initialization happening first before the work manager task was scheduled. - I was here before: https://github.com/mozilla-mobile/focus-android/issues/5781
A few debugging notes I wrote for myself that I'll leave here to make future me less sad. - Q. Is the cause related to using `applicationScope`? - Bug 2003023 - Refactor manual CoroutineScope usage to lifecycle-aware scopes - No, because we've been setting the RustHttpConfig from an IO dispatcher since 2021 (see: [link](https://searchfox.org/firefox-main/rev/a7b3748dfc3d43ff7c8f32b8b6299fdb153e0c10/mobile/android/focus-android/app/src/main/java/org/mozilla/focus/FocusApplication.kt#160)) - Sentry has some more symbolicated crash stats, like [this one](https://mozilla.sentry.io/issues/6731080403/?project=6176960&query=is%3Aunresolved) that suggests it's a remote settings worker syncing. - On Jan 19th it seems like the events doubled since the previous day, but this is untrue - Sentry error reporting only goes back 90 days. - Goes back at least as far as 147. - Q. Why does this not occur on Fenix? - Fenix guards against this by blocking the `onCreate` from finishing until [`megazordDeferred`](https://searchfox.org/firefox-main/rev/1ce5cda809d46072fad434e5d43d2e1ec48931f5/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt#350) is complete. - We should do similar work to bug 2005839 for Focus as well. - Q. Why did this occur now? - We are calling `RustHttpConfig.setClient` on a background dispatcher that races with the work manager remote settings task. - Bug 2020606 removed eager initialization of WorkManager - this meant that we were getting a full `Application#onCreate` initialization happening first before the work manager task was scheduled. - I was here before: https://github.com/mozilla-mobile/focus-android/issues/5781