Open Bug 1668530 Opened 4 years ago Updated 1 year ago

Page saving doesn't work properly due to mixed content blocking

Categories

(Firefox :: File Handling, defect, P3)

Desktop
Windows 10
defect

Tracking

()

Tracking Status
firefox83 --- affected

People

(Reporter: alice0775, Unassigned)

References

(Blocks 2 open bugs)

Details

(Keywords: nightly-community)

Attachments

(1 file)

Attached file about:support

+++ This bug was initially created as a clone of Bug #1668414 +++

Reproduce the issue on Nightly83.0a1 Windows10.
Chrome works without failure.

Steps to reproduce:

  1. Open https://developer.mypurecloud.com/forum/t/problem-with-the-transcription-of-an-interaction/8507
  2. Click Accept button if Cookie Consent dialog pops up.
  3. Save page as(Ctrl+S) > Web page complete > Save

Actual results:
Download failed.

Expected results:
Page is saved successfully.

Summary: Page saving doesn't work properly → Page saving doesn't work properly due to mixed content blocking
Severity: -- → S3
Priority: -- → P3
See Also: → 1445211
Assignee: nobody → b19208
Status: NEW → ASSIGNED

To get started with this, we will want to investigate what's causing the download to fail when the browser blocks mixed content. There are two places we can start debugging:

• When a browser download is stopped, we probably are signaling somewhere to end the download at: https://searchfox.org/mozilla-central/rev/1ed1bb14eed9b3f27a94513387608436ea74c247/dom/webbrowserpersist/nsWebBrowserPersist.cpp#892-894 . So it might be helpful to follow what happens when this is called.
• In addition, it would be useful to get a stack trace by setting a breakpoint in EndDownload (this will likely provide more useful results)

@mtigley and @Gijs, I am working hard on this bug by investigating the above file. Though I am kind-of getting some clues from some parts of the code, I am not sure what is to be done. I am also trying to link to other files and see if browser console helps. But, I don't know how to proceed.

I also went through the related bugs(https://bugzilla.mozilla.org/show_bug.cgi?id=1445211, https://bugzilla.mozilla.org/show_bug.cgi?id=1668414) and got some info from there. So, it would be helpful if you could give some more detailed instructions for this bug and/or stack tracing.

Thanks.

(In reply to Vaidehi from comment #2)

@mtigley and @Gijs, I am working hard on this bug by investigating the above file. Though I am kind-of getting some clues from some parts of the code, I am not sure what is to be done. I am also trying to link to other files and see if browser console helps. But, I don't know how to proceed.

I also went through the related bugs(https://bugzilla.mozilla.org/show_bug.cgi?id=1445211, https://bugzilla.mozilla.org/show_bug.cgi?id=1668414) and got some info from there. So, it would be helpful if you could give some more detailed instructions for this bug and/or stack tracing.

Thanks.

Apologies for the delay on this. So I did some investigating on this and it looks like we're receiving the notification for the download failure at: https://searchfox.org/mozilla-central/rev/aec7c53cdbbff65305d41c9d805a70efc0e902ed/toolkit/components/downloads/DownloadLegacy.jsm#175 .

If you set a breakpoint at https://searchfox.org/mozilla-central/rev/aec7c53cdbbff65305d41c9d805a70efc0e902ed/dom/webbrowserpersist/nsWebBrowserPersist.cpp#1256, and evaluate msgText.get() and aResult from your debugger, you'll also notice these same values are available from the DownloadLegacyTransfer.onStatusChange implementation.

The purpose of this bug is to make it so the downloads panel doesn't show a failing error when downloading mixed content that's been blocked. So I think we should try to re-use these values when determining whether or not blocked content is enough to render the entire page download as "failed".

Using the above STR link it looks like the status passed to OnStatusChange is NS_ERROR_UNKNOWN_HOST, which is assigned to the download at: https://searchfox.org/mozilla-central/rev/aec7c53cdbbff65305d41c9d805a70efc0e902ed/toolkit/components/downloads/DownloadCore.jsm#552.

We also throw the exception that skips over setting the this.succeeded flag to true here: https://searchfox.org/mozilla-central/rev/aec7c53cdbbff65305d41c9d805a70efc0e902ed/toolkit/components/downloads/DownloadCore.jsm#491

Blocks: 1726362

I assume Vaidehi isn't currently working on this.

Assignee: b19208 → nobody
Status: ASSIGNED → NEW
See Also: → 1820083
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: