Open Bug 1754008 Opened 3 years ago Updated 3 years ago

"Blank page" on macOS when trying to open webpages saved as "Web Page, complete"

Categories

(Firefox :: Downloads Panel, defect, P3)

Desktop
All
defect

Tracking

()

Tracking Status
firefox-esr91 --- affected
firefox97 --- affected
firefox98 --- affected
firefox99 --- affected

People

(Reporter: sbadau, Unassigned)

References

()

Details

Affected versions

  • Nightly 98.0a1, Firefox 97 Beta, Firefox 96.0.3 and Firefox 91.5.1esr.

Affected platforms

  • macOS Big Sur 11.6

Steps to reproduce

  1. Launch Firefox and navigate to:
    https://www.bbc.com/news/entertainment-arts-59879079
  2. Right-click on the page and select "Save Page As..."
  3. In the Save As dialog for the Format select "Web Page, complete" and click the Save button
  4. From the downloads panel, open the saved webpage by dragging and dropping it onto the address bar

Expected result
The saved webpage should be properly opened.

Actual result
A blank page is opened - please see the screencast for more details.

Additional notes
Could not reproduce it on Windows 10 and Ubuntu 20.04.
Logged as per Comment 3 from Bug 1748670.

I can reproduce the bug, the page seems to be loading and then switches to full white.
The first thing I noticed is if I save the page, ignore the "download failed" message, but rather just open the html from the disk, everything works fine. If I retry the download instead, like shown in the screencast, then the page gets redownloaded and it breaks.
The problem seems to be related to retry doing a bare download, following a different code path than Save page as.
I wasn't able to identify the exact differences in the downloaded code yet.

(In reply to Marco Bonardo [:mak] from comment #1)

I can reproduce the bug, the page seems to be loading and then switches to full white.
The first thing I noticed is if I save the page, ignore the "download failed" message, but rather just open the html from the disk, everything works fine. If I retry the download instead, like shown in the screencast, then the page gets redownloaded and it breaks.
The problem seems to be related to retry doing a bare download, following a different code path than Save page as.
I wasn't able to identify the exact differences in the downloaded code yet.

This sounds a lot like bug 1744779, where we weren't able to use DownloadPaths.sanitize directly, but borrowed some of the checks it performs in the Screenshots code that creates the filename to download from the page title.

we should check this after Bug 1746052 implements a new unified sanitization path.

Depends on: 1746052
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.