Closed Bug 1742344 Opened 2 years ago Closed 5 months ago

Content does not load at imgur.com with "Private browsing" mode enabled

Categories

(Core :: Privacy: Anti-Tracking, defect, P3)

Firefox 96
Other
Android
defect

Tracking

()

VERIFIED FIXED
121 Branch
Tracking Status
firefox96 --- wontfix
firefox114 --- wontfix
firefox115 --- wontfix
firefox116 --- wontfix
firefox119 --- wontfix
firefox120 --- verified
firefox121 --- verified

People

(Reporter: rbucata, Assigned: robwu)

References

(Blocks 1 open bug, )

Details

Attachments

(5 files)

Attached image Screenshot_7.png

Environment:
Operating system: Android 11
Firefox version: Firefox Nightly 96.0a1 (2015847147 -🦎96.0a1-20211120090421🦎)

Preconditions:
"Private browsing" mode enabled
Clean profile

Steps to reproduce:

  1. Navigate to :https://m.imgur.com/gallery/RVQBQPa
  2. Observe the result.

Expected Behavior:
The content loads.

Actual Behavior:
The content does not load.

Notes:

  • Works as expected in Normal browsing mode.
  • Works as expected using Chrome.
  • Screenshot attached.
  • Reproducible using Firefox Focus.
Severity: -- → S3

In the responsive design mode, I'm seeing DOMException: The operation is insecure and it appears to be a check for service workers. So this is likely just bug 1320796. I'll check ASAP if it's easy to add a shim here, so we can at least un-break the page in strict mode.

It also happens in normal mode on desktop with mobile UA and "Delete cookies and site data when Firefox is closed" enabled (ETP disabled).

Depends on: 1320796
No longer blocks: tp-breakage

Ah, actually their code does properly check for the existence of service workers, the problem is that they assume that if window.caches is defined, calling window.caches.keys() will not fail. But in private browsing mode it throws a SecurityError (presumably until bug 1714354 is fixed).

A simple webcompat intervention can fix this for now (at least I tested for https://imgur.io/gallery/*):

try {
  window.caches.keys(); // fails in private browsing mode with a SecurityError, see bug 1714354
} catch (_) {
  Object.defineProperty(window.wrappedJSObject, "caches", {
    value: undefined,
  });
}
Depends on: 1714354
No longer depends on: 1320796
Depends on: 1774269

I can confirm that patch https://phabricator.services.mozilla.com/D150034 has fix this in the latest nightly.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED

I can confirm this, the page content loads now.
https://prnt.sc/s8hWL9ymQeQZ

Tested with:
Browser / Version: Firefox Nightly 105.0a1 (🦎 105.0a1-20220816095503)
Operating System: Google Pixel 5 (Android 12) - 1080 x 2340 pixels, 19.5:9 ratio (~432 ppi density), Samsung Galaxy S8 (Android 9) - 1440 x 2960 pixels, 18.5:9 ratio (~570 ppi density)

Status: RESOLVED → VERIFIED
Attached image image.png

The issue seems to reproduce once again.

Tested on:
Operating system: OnePlus 6 A6000 (Android 11)
Browser/Version: Firefox Nightly 116.0a1-20230621161008 / Firefox Release 114.0.2-20230619081400

Status: VERIFIED → REOPENED
Resolution: FIXED → ---

Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.

Tom, could you please take another look to see why it broke again? Thanks!

Flags: needinfo?(twisniewski)

The intervention for youtube navigation has also stopped working (Bug 1803976).

In private browsing mode, caches.keys() rejects. imgur.io does not
expect that. As a work-around, window.caches can be deleted. This shim
is already defined in the source, but did not work because the URL
pattern changed.

An example of a current URL is https://imgur.io/js/vendor.1ae05f3622fe27342a53.js

This patch fixes up the URL.

The problem only occurs on imgur.io, not imgur.com. A visit on either
domain may result in a redirect to the other domain depending on whether
the user agent is mobile.

Test case:

  1. Visit about:config and set general.useragent.override to
    Mozilla/5.0 (Android 14.0; Mobile; rv:120.0) Gecko/120.0 Firefox/120.0
  2. Open a private browsing window and visit imgur.io

Before this patch, imgur was broken.
With this patch, imgur works again.

Besides fixing the imgur issue, this also removes the indexedDB hider,
because indexedDB has been supported in private browsing mode since
Firefox 115, by https://bugzilla.mozilla.org/show_bug.cgi?id=1831058

Assignee: nobody → rob

I've submitted a patch which I have verified locally.

This issue is especially noticeable on Firefox Focus (which defaults to pbm) and private browsing in any other Firefox for Android browser. Would be nice if the patch gets uplifted to other channels.

This does not affect desktop, because imgur on desktop appears to be using different code.

Flags: needinfo?(twisniewski)
Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/211dc86c8f53
Unbreak imgur.io on Android in PBM r=webcompat-reviewers,twisniewski
Status: REOPENED → RESOLVED
Closed: 2 years ago5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch

ksenia: I want to uplift the patch to releases_v120 branch (currently beta), with the goal of making it a part of Firefox Focus and Firefox next week (when 120 becomes release). Tom said that you can backport this to release branches on Android. Could you help out?

The issue is mainly relevant on the mobile version of the imgur website, so it's not strictly necessary to uplift to desktop 120. But it doesn't hurt either, especially for consistency.

Comment on attachment 9363335 [details] [review]
[mozilla-mobile/firefox-android] Bug 1742344 - Unbreak imgur.io on Android in PBM (backport #4460) (#4461)

Beta/Release Uplift Approval Request

  • User impact if declined: imgur.io won't load in Firefox Focus and private browsing mode in Firefox on Android
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): changes limited to a single domain
  • String changes made/needed:
  • Is Android affected?: Yes
Attachment #9363335 - Flags: approval-mozilla-release?
Comment on attachment 9363335 [details] [review]
[mozilla-mobile/firefox-android] Bug 1742344 - Unbreak imgur.io on Android in PBM (backport #4460) (#4461)

Approved for Mobile 120.0rc1
Attachment #9363335 - Flags: approval-mozilla-release? → approval-mozilla-release+

Managed to reproduce the issue on an earlier RC build (116.3.0) with a Xiaomi Mi11 Lite (Android 11).

Verified as fixed on the latest RC 120.0 with the following devices:

  • Xiaomi Mi11 Lite (Android 11);
  • Samsung Galaxy S23 Ultra (Android 13).

The page loads as expected.

Managed to reproduce on Focus RC 119.1.1 with both devices.

Verified as fixed on the latest Focus RC 120.0 using the same devices.

Also Verified as fixed on the latest Nightly 121.0a1 (2023-11-14) with the same devices.

Marking the ticket as verified for 120 and 121.

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

Attachment

General

Creator:
Created:
Updated:
Size: