`browser.translations.automaticallyPopup` should not have a default in GeckoView `GeckoRuntimeSettings`
Categories
(Firefox for Android :: Translations, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox126 | --- | verified |
People
(Reporter: olivia, Assigned: olivia)
References
Details
(Whiteboard: [fxdroid][foundation])
Attachments
(1 file, 1 obsolete file)
When testing in Fenix, closing the app clears browser.translations.automaticallyPopup back to the default. browser.translations.automaticallyPopup should not have a preferred setting in GeckoRuntimeSettings.
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
|
||
GeckoView should not have a default for browser.translations.automaticallyPopup.
Comment 3•2 years ago
|
||
Backed out for causing geckoview failures on TranslationsTest
- backout: https://hg.mozilla.org/integration/autoland/rev/30261764366883e80ae7fe429d64f1e1fb216e4e
- push: https://treeherder.mozilla.org/jobs?repo=autoland&selectedTaskRun=YIGObaPvTOekFqZm20T79g.0&revision=6901b5e67c872113bcd4bea21e390f1465eed2da
- failure log: https://treeherder.mozilla.org/logviewer?job_id=450320830&repo=autoland&lineNumber=19876
[task 2024-03-11T14:51:25.409Z] 14:51:25 INFO - 03-11 14:51:24.800 D/GeckoViewConsole( 3449): onEvent GeckoView:WebExtension:PortMessageFromApp {"message":{"id":"81a166d8-8994-4da7-bb97-12a9bd584109","args":{"oldPrefs":{"browser.translations.automaticallyPopup":true,"intl.accept_languages":"en-GB,en-US","browser.translations.geckoview.enableAllTestMocks":false,"browser.translations.enable":true,"browser.translations.simulateUnsupportedEngine":false},"newPrefs":{"browser.translations.automaticallyPopup":false,"browser.translations.geckoview.enableAllTestMocks":false}},"type":"SetPrefs"}}
[task 2024-03-11T14:51:25.409Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): Error
[task 2024-03-11T14:51:25.409Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference
[task 2024-03-11T14:51:25.410Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at org.mozilla.geckoview.GeckoRuntimeSettings.getTranslationsOfferPopup(GeckoRuntimeSettings.java:1465)
[task 2024-03-11T14:51:25.410Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at org.mozilla.geckoview.test.TranslationsTest.testOfferPopup(TranslationsTest.kt:465)
[task 2024-03-11T14:51:25.410Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at java.lang.reflect.Method.invoke(Native Method)
[task 2024-03-11T14:51:25.410Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
[task 2024-03-11T14:51:25.410Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
[task 2024-03-11T14:51:25.410Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
[task 2024-03-11T14:51:25.410Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
[task 2024-03-11T14:51:25.410Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at androidx.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80)
[task 2024-03-11T14:51:25.410Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at androidx.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61)
[task 2024-03-11T14:51:25.411Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at org.junit.rules.Verifier$1.evaluate(Verifier.java:35)
[task 2024-03-11T14:51:25.411Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at org.mozilla.geckoview.test.rule.GeckoSessionTestRule$2.lambda$evaluate$0(GeckoSessionTestRule.java:1510)
[task 2024-03-11T14:51:25.411Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at org.mozilla.geckoview.test.rule.GeckoSessionTestRule$2.$r8$lambda$eGWMAiU-In-hdc_ISYHPMUhHPKA(GeckoSessionTestRule.java)
[task 2024-03-11T14:51:25.411Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at org.mozilla.geckoview.test.rule.GeckoSessionTestRule$2$$ExternalSyntheticLambda1.run(D8$$SyntheticClass)
[task 2024-03-11T14:51:25.411Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
[task 2024-03-11T14:51:25.411Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
[task 2024-03-11T14:51:25.411Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at android.app.Instrumentation$SyncRunnable.run(Instrumentation.java:1950)
[task 2024-03-11T14:51:25.411Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at android.os.Handler.handleCallback(Handler.java:751)
[task 2024-03-11T14:51:25.411Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at android.os.Handler.dispatchMessage(Handler.java:95)
[task 2024-03-11T14:51:25.412Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at android.os.Looper.loop(Looper.java:154)
[task 2024-03-11T14:51:25.412Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at android.app.ActivityThread.main(ActivityThread.java:6077)
[task 2024-03-11T14:51:25.412Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at java.lang.reflect.Method.invoke(Native Method)
[task 2024-03-11T14:51:25.412Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
[task 2024-03-11T14:51:25.412Z] 14:51:25 INFO - 03-11 14:51:24.809 E/GeckoSessionTestRule( 3449): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
[task 2024-03-11T14:51:25.412Z] 14:51:25 INFO - 03-11 14:51:24.810 D/GeckoViewConsole( 3449): onEvent GeckoView:WebExtension:PortMessageFromApp {"message":{"id":"4adcfc11-0ea8-40ec-a344-399c83442ee6","args":{"oldPrefs":{"browser.translations.automaticallyPopup":true,"intl.accept_languages":"en-GB,en-US","browser.translations.geckoview.enableAllTestMocks":false,"browser.translations.enable":true,"browser.translations.simulateUnsupportedEngine":false}},"type":"RestorePrefs"}}
[task 2024-03-11T14:51:25.412Z] 14:51:25 INFO - 03-11 14:51:24.830 D/GeckoViewContent( 3449): handleEvent: DOMWindowClose
[task 2024-03-11T14:51:25.412Z] 14:51:25 INFO - 03-11 14:51:24.832 D/GeckoViewConsole( 3449): onEvent GeckoView:WebExtension:List null
[task 2024-03-11T14:51:25.412Z] 14:51:25 INFO - 03-11 14:51:24.835 I/Gecko ( 3449): nsWindow[0x7e838d75ad00]::Show 0
[task 2024-03-11T14:51:25.413Z] 14:51:25 INFO - 03-11 14:51:24.835 E/GeckoSessionTestRule( 3449): test_end c5ee677f-bc83-49bd-9e28-2d35f3d0f059 testOfferPopup(org.mozilla.geckoview.test.TranslationsTest)
[task 2024-03-11T14:51:25.413Z] 14:51:25 WARNING - TEST-UNEXPECTED-FAIL | org.mozilla.geckoview.test.TranslationsTest#testOfferPopup | java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference
[task 2024-03-11T14:51:25.413Z] 14:51:25 INFO - TEST-INFO took 819ms
| Assignee | ||
Comment 4•2 years ago
|
||
I'm investigating something, this may be a bigger issue than I originally thought! I'll re-land or revise, probably in 126. Thanks, and appologies for not catching the failure before landing!
Comment 5•2 years ago
|
||
There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:olivia, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 6•2 years ago
|
||
Updated to "Plan Changes"! This issue appears deeper than it originally looked.
Updated•2 years ago
|
| Assignee | ||
Comment 7•2 years ago
|
||
This patch fixes an issue where the Gecko pref browser.translations.automaticallyPopup
was not persisting in Android. The issue was it was being overwritten back to the
default of true. This patch stores the persistence in the Fenix layer and
ensures the right value is kept after user interaction.
| Assignee | ||
Comment 9•2 years ago
|
||
Please check that when setting "offer to translate" that the value remains the same as the selected option after a hard close and reopening of the app.
(In the original bug, it was always reverting back to "on" or "true" during a hard close and reopening.)
Comment 10•2 years ago
|
||
| bugherder | ||
Comment 11•2 years ago
•
|
||
Verified as fixed on the latest Fenix Nightly 126.0a1 build from 4/4 with the following devices: Xiaomi Mi8 Lite (Android 10), Google Pixel 6 (Android 14), and Realme C35 (Android 12).
When disabling the "Always offer to translate" toggle (set to OFF), the value remains the same as the selected option after a hard close and reopening of the app.
Description
•