gildas-lormeau / SingleFile

Web Extension for saving a faithful copy of a complete web page in a single HTML file
GNU Affero General Public License v3.0
14.29k stars 943 forks source link

Add support for `HTTPS-Only Mode` in Firefox #1469

Closed StoopidoMan closed 4 days ago

StoopidoMan commented 3 weeks ago

Describe the bug when I save http://dewbell.biz/en/products/water-pipe-love it does save the text, but not the images or any media on the webpage

To Reproduce 1- Save this webpage. I assume the issue is because it is http not https!? maybe!

Screenshots: this is the website image

this is how it is saved image

Environment

gildas-lormeau commented 3 weeks ago

The page is a bit slow to load and save (it takes approximately 1 min to process the page on my machine). However I cannot reproduce the issue with the default settings. FYI, I attached the saved page in the zip file.

Make sure that the option Network > set maximum download time is disabled or that the value Network > maximum download time (s) is large enough.

Dewbell (6_10_2024 3_42_44 PM).html.zip

StoopidoMan commented 2 weeks ago

@gildas-lormeau

Make sure that the option Network > set maximum download time is disabled or that the value Network > maximum download time (s) is large enough.

It is unchecked (disabled) and it is set to 60

And the file you shared Dewbell (6_10_2024 3_42_44 PM).html.zip is about 9MB while the .html I downloaded using both SingleFile is under 100KB!?

Edit:

  1. I reset SingeFile (reset all options) and saved the page and I got 13kb html file!?
  2. Tried on a different Firefox profile and it saved the page successfully.
  3. I didn't reinstall SingleFile just in case if you want to understand what is causing this issue
gildas-lormeau commented 2 weeks ago

Did you change any settings in about:config?

StoopidoMan commented 2 weeks ago

@gildas-lormeau Yes, I did change many settings in About:Config

Edit: Which setting(s) should I disable and then test?

gildas-lormeau commented 2 weeks ago

@StoopidoMan probably one of these values network*timeout

StoopidoMan commented 2 weeks ago

@gildas-lormeau I searched for network*timeout in About:Config page and no settings was modified.

gildas-lormeau commented 2 weeks ago

Then, I cannot really tell you which setting could be the cause of the issue unfortunately.

gildas-lormeau commented 1 week ago

I'm closing the issue because it's not a bug in SingleFile. Feel free to comment though if needed.

StoopidoMan commented 1 week ago

I FOUND THE CAUSE!! Please read

@gildas-lormeau

to reproduce: on a new Firefox profile, in Firefox settings about:preferences, Check Enable HTTPS-Only Mode in all windows

I tested it several times. Each time when Enable HTTPS-Only Mode in all windows is checked it saves a file under 100 KB, but when Don't enable HTTPS-Only Mode is checked then it save the page properly at around 9-11 MB (not sure why it is not always the same size)

@gildas-lormeau if possible to solve or you plan to solve this in future updates then let us know here, please. I like the HTTPS-Only mode, it makes @StoopidoMan feel safe.

PS: I didn't live up to my name today! And that made me happy.

gildas-lormeau commented 5 days ago

Thank you @StoopidoMan for the detailed info. I think this could be a useful option. I reopened the issue.

StoopidoMan commented 5 days ago

Thank you @StoopidoMan for the detailed info. I think this could be a useful option. I reopened the issue.

@gildas-lormeau I can't imagine how this works, but I assume that SingleFile when Enable HTTPS-Only Mode in all windows is checked it download/save only the HTTPS content of the webpage?

I believe software should just work out of box, so I don't agree that this should be an option in SingleFile settings.

So if firefox allow addons to detect HTTPS-ONLY mode then SingleFile should change the option automatically that would be a better User Experience, it would just work! OR it would warn the user that an option in SingleFile settings must be turned on.

sorry if I misunderstood you,, and wasted your time with this comment. I am stoopid.

I do not envy you, right now, you have a hard job <3 You are a HERO! And I am Stoopid!

gildas-lormeau commented 4 days ago

It looks like I recently unintentionally fixed the issue without knowing it. I cannot reproduce the bug anymore with the current code of SingleFile. The fix will be available in the next version which should published soon.

Thank you for the kind words :)