Closed Bug 1650609 Opened 4 years ago Closed 4 years ago

Save/Download stopped working in Offline Mode (with privacy.partition.network_state enabled)

Categories

(Firefox :: File Handling, defect, P3)

defect

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox-esr78 --- disabled
firefox78 --- disabled
firefox79 --- disabled
firefox80 --- disabled
firefox81 --- disabled
firefox82 --- disabled
firefox83 --- disabled
firefox84 --- fixed
firefox85 --- fixed

People

(Reporter: janakaud+mozilla, Assigned: timhuang)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Firefox

Steps to reproduce:

Case 1: Save -> "Web Page, HTML only" not working

  1. Open any page (e.g. https://www.mozilla.org/en-US/firefox/79.0a1/whatsnew/all/?oldversion=77.0a1)
  2. File -> Work Offline
  3. File -> Save Page As
  4. Select "Web Page, HTML only" on "Save as type"
  5. Click Save

Case 2: Save not working for single files (possibly related to above)

  1. Open an image (e.g. https://www.slappforge.com/docs/sigma/gitbook/gitbook-plugin-advanced-emoji/emojis/x.png)
  2. File -> Work Offline
  3. File -> Save Page As
  4. Click Save

Actual results:

Download fails.

  • Nothing gets saved to disk
  • A "Failed" entry (with HTML title / image filename) gets added to the Downloads list.

Expected results:

Download should succeed.

  • A file should get saved to disk (Case 1: the HTML file, Case 2: the PNG image)
  • Consequently, Downloads list should contain a "<filesize> - <domain> - <saved time>" (successful) entry.

Offline mode should not result in a failure, as the content is already downloaded and available in the cache.

Save was working fine in offline mode, until I upgraded to 79.0a1 recently - issue persists through 80.0a1 (2020-07-02). (79.0a1 upgrade was a jump from 77.0a1, so issue might have originated in 78.0a1 or even earlier.)

(Have further details, will add in comments)

Case 1: Works if I select "Web page, complete" during save.

Case 2: Works for some images (e.g. https://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/Python_logo_and_wordmark.svg/1280px-Python_logo_and_wordmark.svg.png)

Headers for above (success) image:

HTTP/2 200 OK
date: Wed, 24 Jun 2020 09:53:58 GMT
content-type: image/png
content-length: 45656
x-object-meta-sha1base36: 8v4yqditwvx8r7jxyqfv0lh9p73zhfm
last-modified: Sat, 05 Mar 2016 12:21:28 GMT
x-timestamp: 1457180487.64550
etag: 3d758579b42e6d0b0109a08882a56c37
server: ATS/8.0.8
age: 893
x-cache: cp5006 hit, cp5004 hit/1
x-cache-status: hit-front
server-timing: cache;desc="hit-front"
strict-transport-security: max-age=106384710; includeSubDomains; preload
x-client-ip: 124.43.67.27
access-control-allow-origin: *
access-control-expose-headers: Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache
timing-allow-origin: *
accept-ranges: bytes
X-Firefox-Spdy: h2

Headers for previous (failed) image, https://www.slappforge.com/docs/sigma/gitbook/gitbook-plugin-advanced-emoji/emojis/x.png:

HTTP/2 200 OK
content-type: image/png
content-length: 2044
date: Sun, 05 Jul 2020 05:31:39 GMT
server: Apache
x-frame-options: SAMEORIGIN
last-modified: Sat, 18 Apr 2020 10:58:33 GMT
etag: "7fc-5a38e8c039ccb"
accept-ranges: bytes
x-cache: Miss from cloudfront
via: 1.1 73f76518a6ae9632d6f17d669d4e8f13.cloudfront.net (CloudFront)
x-amz-cf-pop: SIN5-C1
x-amz-cf-id: Lv6qWgE81evX_ryKvJfBgqTq-JBKVwJ7KNtBMB7FCxN6n5jIKQMblg==
X-Firefox-Spdy: h2

Manage to reproduce the issue only on Firefox Nightly 80.0a1 (2020-07-10).

Status: UNCONFIRMED → NEW
Component: Untriaged → File Handling
Ever confirmed: true
OS: Unspecified → All
Hardware: Unspecified → All

This has been regressed by bug 1639154

Flipping the pref privacy.partition.network_state in about:config looks like it fixes this. Only Nightly is affected because this pref is only toggled on nightly right now. The image case looks like it's similar to bug 1641270.

Severity: -- → S2
Has Regression Range: --- → yes
Has STR: --- → yes
Keywords: regression
Priority: -- → P3
Regressed by: 1639154
See Also: → 1641270

@Gijs thanks! I can confirm that setting privacy.partition.network_state=false fixes it (also fixes the broken 'View Source' functionality under offline mode) - although it seems to 'mask' all the existing cache entries (after flipping the pref I can no longer view any of the previously cached/visited pages in offline mode).

And yes, the image saving issue seems to be unrelated - and kinda hazy; both images I mentioned above, are now working (getting saved) in offline mode but there are others that still fail. Will keep digging and update here if I find a pattern.

Summary: Save/Download stopped working in Offline Mode → Save/Download stopped working in Offline Mode (with privacy.partition.network_state enabled)

According to my test, This issue has been fixed by Bug 1641270. I will write a test case for this.

Assignee: nobody → tihuang
Status: NEW → ASSIGNED
Pushed by tihuang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/505df7b646b6 Add a testcase to ensure 'Save Page As' is working in OfflineMode. r=dimi
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: