Closed Bug 1836022 Opened 2 years ago Closed 2 years ago

Protection Panel (Lock icon in the taskbar) crashes Fenix on any IP address with Cookie Banner Reduction enabled

Categories

(Firefox for Android :: Privacy, defect)

All
Android
defect

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox115 --- wontfix
firefox116 --- verified

People

(Reporter: denschub, Unassigned)

References

Details

Attachments

(2 files)

Steps to reproduce

  1. Ensure Cookie Banner Reduction is enabled
  2. Open https://1.1.1.1 (or any IP that serves HTTP, for that matter)
  3. Click the lock icon in the address bar

Expected behavior

Panel shows up

Actual behavior

The entire browser crashes.

Any additional information?

The crash is

java.lang.Exception: Unexpected error: [Exception... "Component returned failure code: 0x804b0051 (NS_ERROR_HOST_IS_IP_ADDRESS) [nsICookieBannerService.getDomainPref]" nsresult: "0x804b0051 (NS_ERROR_HOST_IS_IP_ADDRESS)" location: "JS frame :: resource://gre/modules/GeckoViewStorageController.sys.mjs :: onEvent :: line 263" data: no]

So that is this call to Services.cookieBanners.getDomainPref, which does not appreciate getting an IP instead of a domain.

On Desktop, the call is wrapped in a try/catch, with a comment that explains that this is precisely to handle IP addresses.

Severity: -- → S3
Severity: S3 → --
Severity: -- → S2

Authored by https://github.com/jackyzy823
https://github.com/mozilla-mobile/firefox-android/commit/d7cd6cf9582e2e464d95c60614757f2f05b244b4
[main] Bug 1836022 - catch NS_ERROR_HOST_IS_IP_ADDRESS when querying cookie banners exception

Status: NEW → RESOLVED
Closed: 2 years ago
Flags: qe-verify+
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch

Verified as fixed on the latest Nightly 116.0a1 build from 08.06.2023.
The described issue is no longer reproducible on the latest Nightly.
Devices used to verify:
Motorola Moto G9 plus (Android 11)
Samsung GalaxyZ Fold 4 (Android 13)

No need to uplift to 115.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: