Closed Bug 2062950 Opened 3 months ago Closed 3 months ago

The set to default prompt is not shown by default when the onboarding set to default card is displayed

Categories

(Firefox for Android :: Onboarding, defect, P1)

All
Android
defect

Tracking

()

VERIFIED FIXED
156 Branch
Tracking Status
firefox155 --- verified
firefox156 --- verified

People

(Reporter: towhite, Assigned: towhite)

References

(Blocks 1 open bug)

Details

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

Attachments

(2 external files)

The set to default system prompt should be shown during onboarding when:

  • the device is capable
  • the onboarding card is the set to default card
  • Firefox (current build) is not already default browser
  • the set to default prompt is enabled
  • the prompt has not already been shown during onboarding

The previous 'fix' for this did not correctly fix this.

  • Folded the Nimbus enabled check into canShowPrompt() alongside the existing device-capable, not-already-default, and not-yet-shown checks, instead of gating on it separately in OnboardingFragment.
  • Add tests covering the enabled-flag case and the maybePromptToSetAsDefaultBrowser integration path.
Duplicate of this bug: 2060827
Pushed by icedicedcoffee@proton.me: https://github.com/mozilla-firefox/firefox/commit/c087e7d78e5d https://hg.mozilla.org/integration/autoland/rev/245e52a3a4d5 Move default browser prompt gating into DefaultBrowserPromptManager. r=android-reviewers,alastun

The severity field for this bug is set to S4. However, the following bug duplicate has higher severity:

:towhite, could you consider increasing the severity of this bug to S3?

For more information, please visit BugBot documentation.

Flags: needinfo?(towhite)
Pushed by abutkovits@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/e7558542c85c https://hg.mozilla.org/integration/autoland/rev/afec2ca7f1ae Revert "Bug 2062950 - Move default browser prompt gating into DefaultBrowserPromptManager. r=android-reviewers,alastun" for causing fenix.ui.efficiency.test failures. IGNORE BAD COMMIT MESSAGES

Backed out for causing fenix.ui.efficiency.test failures.

Backout link: https://hg.mozilla.org/integration/autoland/rev/afec2ca7f1ae

Push with failures: https://treeherder.mozilla.org/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception%2Cretry%2Cusercancel&revision=245e52a3a4d50ec1f42c3a7c20d532d7696aa2eb&selectedTaskRun=ZdXQ29ICT1Gi5EHOUG64Rw.0

Failure log: [task 2026-08-13T14:44:41.149+00:00] Shard 19: Expected: 0s, Actual: 74s, Diff: 74s
[task 2026-08-13T14:44:41.149+00:00]
[task 2026-08-13T14:44:41.149+00:00]
[task 2026-08-13T14:44:41.149+00:00] Command /usr/bin/java -jar /builds/worker/test-tools/flank.jar android run --config /builds/worker/checkouts/gecko/taskcluster/scripts/tests/../../../mobile/android/test_infra/flank-configs/fenix/arm-tae-tests.yml --app /builds/worker/fetches/target.arm64-v8a.apk --local-result-dir /builds/worker/artifacts/results --project moz-fenix --client-details matrixLabel=autoland,geckoRev=245e52a3a4d50ec1f42c3a7c20d532d7696aa2eb --test /builds/worker/fetches/target.noarch.apk failed with exit code 10
[task 2026-08-13T14:44:41.235+00:00] TEST-UNEXPECTED-FAIL | org.mozilla.fenix.ui.efficiency.tests.OnboardingTest#verifyTheSetAsDefaultBrowserOnboardingCardTest | java.lang.AssertionError: Failed to navigate to OnboardingPage
[task 2026-08-13T14:44:41.235+00:00] at org.mozilla.fenix.ui.efficiency.helpers.BasePage.navigateToPage(BasePage.kt:183)
[task 2026-08-13T14:44:41.235+00:00] at org.mozilla.fenix.ui.efficiency.helpers.BasePage.navigateToPage$default(BasePage.kt:136)
[task 2026-08-13T14:44:41.235+00:00] at org.mozilla.fenix.ui.efficiency.tests.OnboardingTest.verifyTheSetAsDefaultBrowserOnboardingCardTest(OnboardingTest.kt:38)
[task 2026-08-13T14:44:41.235+00:00]
[task 2026-08-13T14:44:41.236+00:00]
[task 2026-08-13T14:44:41.236+00:00] ╔═════════════════════════════════════════════════════════════════════════════════════════════════════╤═════════╤═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
[task 2026-08-13T14:44:41.236+00:00] ║ UI Test │ Outcome │ Details ║
[task 2026-08-13T14:44:41.236+00:00] ╟─────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
[task 2026-08-13T14:44:41.236+00:00] ║ org.mozilla.fenix.ui.efficiency.tests.OnboardingTest#verifyTheSetAsDefaultBrowserOnboardingCardTest │ Failure │ java.lang.AssertionError: Failed to navigate to OnboardingPage ║
[task 2026-08-13T14:44:41.236+00:00] ║ │ │ at org.mozilla.fenix.ui.efficiency.helpers.BasePage.navigateToPage(BasePage.kt:183) ║
[task 2026-08-13T14:44:41.236+00:00] ║ │ │ at org.mozilla.fenix.ui.efficiency.helpers.BasePage.navigateToPage$default(BasePage.kt:136) ║
[task 2026-08-13T14:44:41.236+00:00] ║ │ │ at org.mozilla.fenix.ui.efficiency.tests.OnboardingTest.verifyTheSetAsDefaultBrowserOnboardingCardTest(OnboardingTest.kt:38) ║
[task 2026-08-13T14:44:41.236+00:00] ║ │ │ ║
[task 2026-08-13T14:44:41.236+00:00] ║ │ │ ║
[task 2026-08-13T14:44:41.236+00:00] ╟─────────────────────────────────────────────────────────────────────────────────────────────────────┼─────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
[task 2026-08-13T14:44:41.236+00:00] ║ org.mozilla.fenix.ui.efficiency.tests.SettingsAddonsTest#noCrashWithAddonInstalledTest │ Flaky │ java.lang.AssertionError: Element 'Install add-on 'uBlock Origin' button' not found after 10 swipe(s) ║
[task 2026-08-13T14:44:41.236+00:00] ║ │ │ at org.mozilla.fenix.ui.efficiency.helpers.BasePage.mozSwipeTo(BasePage.kt:844) ║
[task 2026-08-13T14:44:41.236+00:00] ║ │ │ at org.mozilla.fenix.ui.efficiency.helpers.BasePage.ensureReachable(BasePage.kt:1771) ║
[task 2026-08-13T14:44:41.236+00:00] ║ │ │ at org.mozilla.fenix.ui.efficiency.helpers.BasePage.resolve(BasePage.kt:497) ║
[task 2026-08-13T14:44:41.236+00:00] ║ │ │ at org.mozilla.fenix.ui.efficiency.helpers.BasePage.resolve$default(BasePage.kt:494) ║
[task 2026-08-13T14:44:41.236+00:00] ║ │ │ at org.mozilla.fenix.ui.efficiency.helpers.BasePage.mozClick(BasePage.kt:461) ║
[task 2026-08-13T14:44:41.236+00:00] ║ │ │ at org.mozilla.fenix.ui.efficiency.pageObjects.SettingsAddonsManagerPage.installAddon(SettingsAddonsManagerPage.kt:68) ║
[task 2026-08-13T14:44:41.236+00:00] ║ │ │ at org.mozilla.fenix.ui.efficiency.pageObjects.SettingsAddonsManagerPage.installAddon$default(SettingsAddonsManagerPage.kt:66) ║
[task 2026-08-13T14:44:41.236+00:00] ║ │ │ at org.mozilla.fenix.ui.efficiency.tests.SettingsAddonsTest.noCrashWithAddonInstalledTest(SettingsAddonsTest.kt:52) ║
[task 2026-08-13T14:44:41.236+00:00] ║ │ │ ║
[task 2026-08-13T14:44:41.236+00:00] ║ │ │ ║
[task 2026-08-13T14:44:41.236+00:00] ╚═════════════════════════════════════════════════════════════════════════════════════════════════════╧═════════╧═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
[task 2026-08-13T14:44:41.236+00:00] Command /builds/worker/checkouts/gecko/taskcluster/scripts/tests/parse-junit-results.py --results /builds/worker/artifacts/results failed with exit code 1
[task 2026-08-13T14:44:41.303+00:00] INFO: Found FullJUnitReport.xml in /builds/worker/artifacts/results
[task 2026-08-13T14:44:41.303+00:00] INFO: Found flaky test: org.mozilla.fenix.ui.efficiency.tests.SettingsAddonsTest.noCrashWithAddonInstalledTest
[task 2026-08-13T14:44:41.303+00:00] INFO: HTML flaky report written to /builds/worker/artifacts/HtmlFlakyReport.html
[task 2026-08-13T14:44:41.303+00:00] INFO: Flaky test report generation complete: 1 flaky tests found
[taskcluster 2026-08-13T14:44:41.442Z] Exit Code: 10
[taskcluster 2026-08-13T14:44:41.442Z] User Time: 39.835ms
[taskcluster 2026-08-13T14:44:41.442Z] Kernel Time: 28.77ms
[taskcluster 2026-08-13T14:44:41.442Z] Wall Time: 19m14.11014433s
[taskcluster 2026-08-13T14:44:41.442Z] Average Available System Memory: 29.39 GiB
[taskcluster 2026-08-13T14:44:41.442Z] Average System Memory Used: 1.95 GiB
[taskcluster 2026-08-13T14:44:41.442Z] Peak System Memory Used: 4.49 GiB
[taskcluster 2026-08-13T14:44:41.442Z] Total System Memory: 31.34 GiB
[taskcluster 2026-08-13T14:44:41.442Z] Result: FAILED
[taskcluster 2026-08-13T14:44:41.442Z] === Task Finished ===
[taskcluster 2026-08-13T14:44:41.442Z] Task Duration: 19m14.110363819s
[taskcluster 2026-08-13T14:44:42.829Z] [mounts] Preserving cache: Moving "/home/task_178663108162123/cache0" to "/home/generic-worker/caches/N7yjH3Q8RUiIREa8Kv_Axg"
[taskcluster:error] exit status 10

Severity: S4 → S3
Flags: needinfo?(towhite)

Hey Tom.

For verifyTheSetAsDefaultBrowserOnboardingCardTest under the efficiency (newer framework) package the unexpected modal on the card is the issue.

We have a new OverlayRegistry + dismissKnownOverlaysIfPresent() mechanism designed for exactly this — a blocking system/OEM popup in a separate window.

/ui/efficiency/helpers/OverlayRegistry.kt

Suffice to simply add:

 val SET_DEFAULT_BROWSER_SYSTEM_DIALOG = BlockingOverlay(
        name = "Set default browser system dialog",
        presence = Selector(
            strategy = SelectorStrategy.UIAUTOMATOR_WITH_TEXT_CONTAINS,
            value = "as your default browser app?",
            description = "Set default browser system dialog title",
        ),
        dismiss = listOf(
            Selector(
                strategy = SelectorStrategy.UIAUTOMATOR_WITH_TEXT,
                value = "Cancel",
                description = "Set default browser system dialog Cancel button",
            ),
        ),
    )

and then add it to the list at the bottom

./mach try fuzzy --full -q "'fenix-tae-arm-debug" (we'll be adding the new framework and suite to presets shortly)

Thanks Aaron, that's really helpful! Updated

Pushed by icedicedcoffee@proton.me: https://github.com/mozilla-firefox/firefox/commit/266b2dc3530a https://hg.mozilla.org/integration/autoland/rev/18e8ecfa857f Move default browser prompt gating into DefaultBrowserPromptManager. r=android-reviewers,alastun,aaronmt
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 156 Branch

Verified as fixed on the latest Firefox for Android nightly 156.0a1 from 8/17, using a Pixel 6 (Android 17), and a Samsung Galaxy Tab S9 Ultra (Android 16).

The patch landed in nightly and beta is affected.
:towhite, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(towhite)

FWIW, I'm extremely confused how bug 2060827 is marked as a duplicate of this bug even though it already had a patch that landed during a previous cycle. In general, follow-up bugs aren't duplicates of their predecessors...

Flags: in-testsuite+
No longer duplicate of this bug: 2060827

Fix

  • Folded the Nimbus enabled check into canShowPrompt() alongside the existing device-capable, not-already-default, and not-yet-shown checks, instead of gating on it separately in OnboardingFragment.
  • Add tests covering the enabled-flag case and the maybePromptToSetAsDefaultBrowser integration path.

Expected behaviour
The set to default system prompt should be shown during onboarding when:

  • the device is capable
  • the onboarding card is the set to default card
  • Firefox (current build) is not already default browser
  • the set to default prompt is enabled
  • the prompt has not already been shown during onboarding

{F77595754}

Original Revision: https://phabricator.services.mozilla.com/D318095

Attachment #9630013 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: The 'set to default' system prompt is not shown on immediately when showing the 'set to default' onboarding card.
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: See bug description
  • Risk associated with taking this patch: low
  • Explanation of risk level: Verified in Nightly.
  • String changes made/needed?: None
  • Is Android affected?: yes
Flags: qe-verify+

Apologies for the confusion, Ryan. In that case, this shouldn’t have been marked as a duplicate. I thought it might be confusing to land a follow-up patch under the same bug ID after the original patch had already merged. As discussed, I’ve removed the 'duplicate' status and submitted the Beta uplift request. Thanks for the guidance.

Flags: needinfo?(towhite)
Attachment #9630013 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Verified as fixed on the Firefox for Android Beta 155.0b5 using a Pixel 6 (Android 17), a Samsung Galaxy S24 (Android 16), and a Huawei Pura 70 (Android 12).

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: