Closed Bug 2003403 Opened 1 year ago Closed 4 months ago

Homepage-as-newtab breaks custom tabs

Categories

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

All
Android
defect

Tracking

()

VERIFIED FIXED
154 Branch
Tracking Status
firefox154 --- fixed
firefox155 --- verified

People

(Reporter: tcampbell, Assigned: gl)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxdroid] [group5])

Attachments

(1 file, 1 external file)

Steps to reproduce

  1. Enable homepage-as-newtab (or get enrolled in currently nimbus experiment)
  2. Click a web link in 3rd party app (like Slack) to trigger custom tab

Expected behavior

  • page loads in custom tab mode

Actual behavior

  • fenix app opens to homepage without desired page
  • hitting back button returns to a custom tab where we expected to be in first place

Additionally, the browser that does start is in some broken state where clicking the mask icon to toggle privatebrowsing does creates private browsing tabs in the normal tab tray. If I manually use the tab tray to switch, I get a broken homepage with a mix of private and normal UI.

I hit this as well, but I think there's one thing missing from the STR: you need to have a new tab open as the last tab in the tab tray (in Nightly, open in the background).

If you close that new tab (or navigate it to some website), then the issue goes away and subsequently-opened custom tabs behave as expected. (That's how this behaves for me at least.)

Whiteboard: [fxdroid] [group5]
Duplicate of this bug: 2003744

The severity field is not set for this bug.
:gl, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(gl)
Severity: -- → S1
Flags: needinfo?(gl)
Priority: -- → P1

The tracking requests were added since this was triaged as S1
I'm not sure is S1 is correct, but :gl please request tracking with a reason if needed
https://firefox-source-docs.mozilla.org/bug-mgmt/guides/severity.html

Assignee: nobody → gl
Status: NEW → ASSIGNED

The cause is AboutHomeBinding (bug 1928585) was registered unconditionally in HomeActivity.onCreate. ExternalAppBrowserActivity which is responsible for custom tabs extends HomeActivity, and inherits this registration. The AboutHomeBinding observes the BrowserStore and will navigate to the homepage when the selected tab is "about:home", which aligns with dholbert's STR that we must have a new tab opened.

Solution

AboutHomeBinding should only run in the main HomeActivity and not be registered in ExternalAppBrowserActivity. This type of guard against ExternalAppBrowserActivity is already fairly common in HomeActivity.

Flags: qe-verify+

The cause is AboutHomeBinding (bug 1928585) was registered unconditionally in HomeActivity.onCreate. ExternalAppBrowserActivity which is responsible for custom tabs extends HomeActivity, and inherits this registration. The AboutHomeBinding observes the BrowserStore and will navigate to the homepage when the selected tab is "about:home".
Solution

AboutHomeBinding should only run in the main HomeActivity and not be registered in ExternalAppBrowserActivity.

STR:

  1. Enable Homepage as a New Tab (Secret Settings)
  2. Open a new tab so an about:home tab is the last/selected tab in the tabs tray.
  3. From a 3rd-party app (Slack/Gmail), tap a web link to trigger a custom tab.

(In reply to Gabriel Luong [:gl] (ΦωΦ) from comment #9)

STR:

  1. Enable Homepage as a New Tab (Secret Settings)
  2. Open a new tab so an about:home tab is the last/selected tab in the tabs tray.
  3. From a 3rd-party app (Slack/Gmail), tap a web link to trigger a custom tab.

This issue is still reproducible on the latest NIghtly 154.0a1 from 14.07.2026 with Google Pixel 10 (Android 16).

Flags: qe-verify+

(In reply to Adina Petridean QA [:apetridean] from comment #10)

(In reply to Gabriel Luong [:gl] (ΦωΦ) from comment #9)

STR:

  1. Enable Homepage as a New Tab (Secret Settings)
  2. Open a new tab so an about:home tab is the last/selected tab in the tabs tray.
  3. From a 3rd-party app (Slack/Gmail), tap a web link to trigger a custom tab.

This issue is still reproducible on the latest NIghtly 154.0a1 from 14.07.2026 with Google Pixel 10 (Android 16).

Patch hasn't landed yet so we should only test this after the bug is closed.

Flags: qe-verify+
Pushed by gluong@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/17af05ecdb13 https://hg.mozilla.org/integration/autoland/rev/1b9b9ab074e3 Do not observe AboutHomeBinding in the ExternalAppBrowserActivity r=android-reviewers,skhan
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
Duplicate of this bug: 2003569

Verified as fixed on the latest Firefox for Android Nightly 155.0a1 from 7/21 using a Samsung Galaxy Z Fold 4 (Android 16), and a Xiaomi Poco X7 Pro (Android 16).

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

Attachment

General

Created:
Updated:
Size: