Lusito / forget-me-not

Make the browser forget website data, except for the data you want to keep.
zlib License
226 stars 25 forks source link

downloads not cleared on browser start #82

Closed practik closed 5 years ago

practik commented 6 years ago

Steps to reproduce:

  1. In FMN Settings, under "Clean on browser start," check "Downloads."
  2. Download some files. Check browser history to see that the downloads are shown there.
  3. Close and restart browser.
  4. Check browser history again.

Expected behavior: The downloads from the previous session should be gone from browser history.

Actual behavior: The downloads from the previous session are still shown in history.

(FMN 1.0.2 on FF 61.0.2)

Lusito commented 6 years ago

Interesting.. I only checked the Download list that is shown when you click on the toolbar icon for downloads. This one gets cleared. However, I never checked the entry "Downloads" within the history window.

Since one list gets cleared and the other one stays, I'm assuming that this is a Firefox bug. I will investigate this and see if there are any bug reports on bugzilla.

Thanks for the report.

Lusito commented 6 years ago

See Bug 1380445

practik commented 6 years ago

Thanks for the quick response and Bugzilla research. However, I've been using Download Cleaner Lite for many months now, and it clears downloads from the history window 100% reliably, so it must be possible somehow … It would be nice if FMN could provide the same functionality.

Lusito commented 6 years ago

I will check if I can remove those downloads using the history API rather than the removeDownloads API until this bug is fixed. That's the only possible solution I can see at this moment.

Lusito commented 6 years ago

I've created a workaround for this issue. Will be in the next version.

practik commented 6 years ago

Sorry to report this, but I’ve just updated from 1.0.3 to 1.05, and download clearing is simply not working for me at all. In other words, the behavior is still the same as what I originally reported above.

Could you please reopen this issue and look into it? I'm happy to provide any more information that might be helpful, just let me know.

Lusito commented 6 years ago

I've just tried the following:

So I have no idea what might be the problem on your setup. If you do something differently, please specify. Otherwise, could you try with a clean profile and see if it still happens? Maybe there is some kind of interaction with firefox settings or other web-extensions.

practik commented 6 years ago

Thank you for responding so quickly!

Sorry, I should have been more clear than "simply not working for me at all." The kind of manual download cleaning you describe does work for me, I tested it just now. But I'm interested in having downloads cleared on browser start (as stated in the title of this issue). Is that also possible?

Lusito commented 6 years ago

ok, sorry about that.. I should have tested on browser start as well.

It seems like the downloads (the toolbar ones) are cleared by firefox itself on browser close), and as such I can't list them on startup in order to clear them from history.

I hate mozilla sometimes.. To clear the downloads on startup, I'll have to manually remember the download urls until the next startup. This is messed up. I will work on this at the weekend.

practik commented 5 years ago

Thanks for FMN 2.0.0! The new UI looks great.

I've just started doing a little testing, and unfortunately I have to report that this issue is still not resolved. Downloads are not cleared on browser start for me, and they're also not cleared on domain leave. In fact, they're also not cleared when I do a manual cleanup, which was working in FMN 1.0.5. The only kind of download cleaning that is working now is to block / instantly remove them.

Lusito commented 5 years ago

Will investigate tomorrow. Thanks for the report.

Lusito commented 5 years ago

I just tried the following:

  1. Run a manual cleanup with just one checkbox set: "Downloads" => download removed from both the dropdown and history window as expected.
  2. Check the apply rules checkbox => same result, except on sites that are protected by a rule.
  3. Check the protect open domains checkbox =>same result except on sites that are protected by a rule or are currently open in a tab.

So as far as I can see, the manual cleanup does its job correctly.

I have identified the issue that keeps the startup cleanup from working correctly. Maybe you can tell me how you tried the manual cleanup so I can try to reproduce the issue?

The download cleaner is the last cleaner missing automatic tests, which is why this bug slipped through. Sorry about that. I will add tests for the next version.

practik commented 5 years ago

Well, hmm, I can't reproduce the issue anymore either. I only tried your Step 1 when I tested before, and it didn't work for me then, but it's working now. I was testing immediately after updating FMN, so maybe I should have restarted Firefox first.

Anyway, I'm happy that there's no issue with manual cleanup and you found a fix for the startup cleanup!

practik commented 5 years ago

Can confirm that this is working with FMN 2.1.0. FYI, it still doesn't seem to be working on domain leave, but I wasn't personally interested in that feature, so I'm happy. Thank you, Lusito, for all your hard work!

Lusito commented 5 years ago

Cleaning downloads on leave will be fixed in the next version.