Open Bug 1944579 Opened 10 days ago Updated 1 day ago

[SHIP] A misleading "Go back" button is displayed after refreshing warning pages, although there are no other tabs to return to

Categories

(GeckoView :: General, defect)

Firefox 136
All
Android
defect

Tracking

(firefox134 disabled, firefox135 disabled, firefox136 affected)

Tracking Status
firefox134 --- disabled
firefox135 --- disabled
firefox136 --- affected

People

(Reporter: dpop, Assigned: olivia)

References

(Blocks 1 open bug)

Details

(Whiteboard: [group1][fxdroid])

Attachments

(3 files)

Attached video Fission-ON.mp4

Preconditions

  1. Make sure you are enrolled in the https://experimenter.services.mozilla.com/nimbus/android-fissionship-nightly-experiment-for-qa/summary experiment, in the # fission-on branch.
  2. Go to about:config and make sure the following prefs are set accordingly: fission.autostart=true and fission.disableSessionHistoryInParent=false

Steps to reproduce

  1. Open https://expired.badssl.com/ in a new tab.
  2. Tap on the "Advanced..." button.
  3. Refresh the page or tap on the "Try again" button.
  4. Tap on the "Advanced..." button again.
  5. Observe the options available.

Expected behavior

If the https://expired.badssl.com/ URL is not accessed from an existing opened tab in Step 1, only the "Accept the Risk and Continue" option should be available.

Actual behavior

Two button options:

  • Go Back (Recommended) - the button has no functionality
  • Accept the Risk and Continue;

Device information

  • Firefox version: Nightly 136.0a1 from 01/29
  • Android device model/Android OS version: Google Pixel 8 Pro (Android 14) and any device

Additional information

The issue is reproducible with other error pages as well: http://itisatrap.org/firefox/unwanted.html, http://testsafebrowsing.appspot.com/s/unwanted.html, https://www.itisatrap.org/firefox/its-a-trap.html .
Not reproducible with Fission off.

Attached video Fission-OFF.mp4
Whiteboard: [group1][fxdroid]
Assignee: nobody → ohall

Fission or SHIP (more likely) appears to have caused a change in window.history.length implementation here. Button is badCertGoBack for more references. I'll write a GeckoView test to fully demonstrate the bug and then I'll start unwinding the implementation.

Was able to confirm SHIP causes the regression.

This seems specific to Fenix: window.history.length = 1 with SHIP disabled and window.history.length = 2 with SHIP enabled. It appears SHIP enabled starts out with 2 initially.

On GV, visiting the same page: window.history.length = 1 on both cases. Can't truly reproduce on GV because a custom error page is involved, but it is suspicious that the initial counts on Fenix aren't as expected.

Summary: [Fission] A misleading "Go back" button is displayed after refreshing warning pages, although there are no other tabs to return to → [SHIP] A misleading "Go back" button is displayed after refreshing warning pages, although there are no other tabs to return to

Adding some more information from the investigation:

Both SHIP / non-Ship content process has this error:

Content-Security-Policy: The page’s settings blocked an inline script (script-src-elem) from being executed because it violates the following directive: “default-src resource:” resource://android/assets/low_and_medium_risk_error_pages.html?&title=Secure+Connection+Failed&butto:79:34

The page loaded is low_and_medium_risk_error_pages.html, I think this script is being blocked is what it is possibly referring to. This was added for https://github.com/mozilla-mobile/fenix/issues/14552, which is also related to being able to go back when there is no history to go back to. So, a possible lead there as well.

edit: SHIP had switched back off during a code reload and this didn't solve the issue. Fixing the CSP appears to fix the issue - I'll take it this route since the issue couldn't be simply reproduced in GVE. I'm not entirely sure why it created a second history entry when SHIP was enabled. From debugging, the best I could tell was it happened after initial onload.

See Also: → 1658276
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: