HistoryCleaner icon indicating copy to clipboard operation
HistoryCleaner copied to clipboard

Add-on doesn't delete history

Open nadesco opened this issue 6 years ago • 23 comments

Hi, I installed History Cleaner a day ago but it doesn't work. My sidebar shows History going back to "Older than 6 months" so I set "Number of days to keep history" to 90 days in Preferences, but the folders and files for history older than this are still there. I've left Firefox idle for well over the 1 minute mark a number of times and also restarted my browser/machine. I might've missed something although the only thing I see in Prefs is a box to increase/decrease the number of days -- Thanks

OS X 10.14.6 Mojave Firefox 70.0b7 Addon ver. 1.2.3

nadesco avatar Sep 20 '19 06:09 nadesco

Hello, I'm not sure why it's not working for you. Could you open the browser console (Hamburger menu > Web Developer > Browser Console) and see if it logs any errors when it should be deleting history.

Rayquaza01 avatar Sep 26 '19 13:09 Rayquaza01

Not really sure what to look for but I checked the browser console and a search didn't bring up anything related to history. Although that might be because I created a new places.sqlite file earlier today and so all history was deleted (along with older error messages?). I decided to clean it up because it occurred to me that the previous file (about 32MB) was possibly corrupted. Anyway, I've now set HC preferences to 1 day so will see how it goes.

nadesco avatar Sep 26 '19 14:09 nadesco

I am having the same issue with this addon. I am running Firefox Nightly and changed the setting for History Cleaner to just keep 60 days of history yet even after idling for a minute, my full history remains and I have items from way more than 60 days ago.

anonymous-user avatar Oct 13 '19 00:10 anonymous-user

@anonymous-user I tested it with Nightly and I still wasn't able to reproduce the issue. If you haven't checked the logs, could you? They are in a different place on Nightly. Go to about:debugging#/runtime/this-firefox and find History Cleaner on the list. Select Inspect and go to the Console tab in the new tab that opens.

If you don't see anything odd, could you try running these commands in the console just to see if they're working? The first one will log a message to the console when the browser idles, and the second one should delete everything up to the last 60 days.

browser.idle.onStateChanged.addListener(console.log);

browser.history.deleteRange({ startTime: 0, endTime: Date.now() - (60 * 86400000)});

Rayquaza01 avatar Oct 14 '19 22:10 Rayquaza01

Here is the output of the console:

  • Content Security Policy: Couldn’t parse invalid host 'wasm-eval'
  • The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. background.html
  • Unknown localization message weh_prefs_label_downloadcompletedelay main.js:1
  • Unknown localization message weh_prefs_description_downloadcompletedelay main.js:1
  • Unknown localization message weh_prefs_label_tbvwsgrabdelay main.js:1
  • Unknown localization message weh_prefs_description_tbvwsgrabdelay main.js:1
  • Unknown localization message weh_prefs_label_forcedcoappversion main.js:1
  • Unknown localization message weh_prefs_description_forcedcoappversion main.js:1
  • The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. bg.html
  • Loading failed for the
  • Loading failed for the
  • Loading failed for the
  • Content Security Policy: The page’s settings blocked the loading of a resource at http://www.googleadservices.com/pagead/conversion_async.js (“script-src”). 2 analytics-core.js:16704:37
  • Content Security Policy: The page’s settings blocked the loading of a resource at http://connect.facebook.net/en_US/fbevents.js (“script-src”). 2 analytics-core.js:16704:37
  • Content Security Policy: The page’s settings blocked the loading of a resource at http://www.google-analytics.com/analytics.js (“script-src”). 2 analytics-core.js:16704:37
  • uncaught exception: 2
  • Attempt to postMessage on disconnected port app.js:1612

So I ran the first command it returned "undefined". I ran the second item and I got:

18:45:47.411 Promise { "pending" } ​ : "pending" ​ : PromiseProto { … }

and

18:45:47.658 Error: An unexpected error occurred undefined

anonymous-user avatar Oct 15 '19 01:10 anonymous-user

I'm having a similar problem. Can the problem be caused by syncing with other devices, like my smart phones, where I keep history for a longer period of time?

streetwolf avatar Oct 16 '19 13:10 streetwolf

@anonymous-user Those messages in the console are likely from other extensions and webpages you have open. The first command returning undefined is good, but they second one threw an error? I assume that it didn't actually delete the history after running it?

Rayquaza01 avatar Oct 16 '19 17:10 Rayquaza01

@streetwolf Syncing should not affect it. This extension doesn't sync the setting between devices. But if you sync history between devices, then deleting history on one device should delete it on the others.

Rayquaza01 avatar Oct 16 '19 17:10 Rayquaza01

This morning when I used another program to look at my Mozilla history file it had entries from Oct. 11 until today. I have the number of days in HC set to 1 which leaves about 2 days worth of history. HC did this one time before which I thought was a syncing problem so I turned off syncing. I then started getting 2 days worth until today.

I believe the older history is coming back from somewhere. Furthermore when I got into Firefox and sat idle for a few minutes the older entries were not deleted. Perhaps there is something else going on. I am on Nightly so maybe Mozilla made some changes to the History mechanism.


Gary Shapiro


From: Joe Jarvis [email protected] Sent: Wednesday, October 16, 2019 1:19:10 PM To: Rayquaza01/HistoryCleaner [email protected] Cc: Gary [email protected]; Mention [email protected] Subject: Re: [Rayquaza01/HistoryCleaner] Add-on doesn't delete history (#5)

@streetwolfhttps://github.com/streetwolf Syncing should not affect it. This extension doesn't sync the setting between devices. But if you sync history between devices, then deleting history on one device should delete it on the others.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Rayquaza01/HistoryCleaner/issues/5?email_source=notifications&email_token=AADEJL7OG7NWH3FBT5TN7ADQO5EI5A5CNFSM4IYTLCUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBNIRXY#issuecomment-542804191, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AADEJL3SFITHZ7APPDHHU6LQO5EI5ANCNFSM4IYTLCUA.

streetwolf avatar Oct 16 '19 17:10 streetwolf

@Rayquaza01 correct. My history remains unchanged and I still have the old entries.

anonymous-user avatar Oct 17 '19 01:10 anonymous-user

It now works for me, at least for short term deletions. The solution was to trash my places.sqlite file and start afresh. I did this 20 days ago (see post above) and set history to 90 days. I decided to test it again and changed it to 15 days. After the minute wait all the entries for Sept had disappeared. My guess is that you either have a corrupted places.sqlite file or, for some reason, the add-on doesn’t work properly with larger files containing entries over many months.

On Oct 17, 2019, at 10:13, anonymous-user [email protected] wrote:

@Rayquaza01 correct. My history remains unchanged and I still have the old entries.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

nadesco avatar Oct 17 '19 02:10 nadesco

I got the same problem on FF 70.0.1 (release, no kind of syncing) Ubuntu 18.04.3 with addon version 1.2.3.

The Eventlistener shows it ran but the deleteRange command you provided in https://github.com/Rayquaza01/HistoryCleaner/issues/5#issuecomment-541961271 prints or sometimes only Promise { <state>: "pending" } and in both cases the history doesn't change.

Tibladar avatar Dec 06 '19 16:12 Tibladar

I'm having the same issue. Firefox 70.0.1 64-bit on openSUSE Tumbleweed Linux.

I followed the instructions and went to the Debugging page and opened the add-on console. I entered the commands, and got the same result as Tibladar. An unexpected error occurred when it tried to delete my history.

When I entered the command with a number of days larger than what my current history contains, it throws no errors, but when I put in a number less than my total history, where it actually has to delete some entries, it throws the error.

I had been using a different add-on to keep pruning my history, but that started failing a month or two ago. So it doesn't seem to be an issue exclusive to this add-on.

DarthBrandon avatar Dec 09 '19 23:12 DarthBrandon

I no longer have this issue using Fx Nightly under Windows 10. The 'problem' might have been the fact that it takes about a minute of idle time in order for the deletes to occur. Perhaps I was not allowing enough idle time. This being said I would like to see an option to delete history when Fx starts up.

streetwolf avatar Dec 27 '19 00:12 streetwolf

I don't think the issue is idle time, at least not on my end. I can leave Firefox open for hours at a time while I'm AFK, and the add-on still won't delete any history. Though, I guess it would depend on if other add-ons can affect the idle status. That doesn't explain why I get error messages when trying to force the add-on to run, however.

DarthBrandon avatar Dec 27 '19 02:12 DarthBrandon

Ah, never mind my last comment, I guess. openSUSE Tumbleweed put Firefox 71 on their repos, and this issue seems to be fixed. Still may not have been idle time, but it seems like it might have been a Firefox bug that got fixed rather than a bug with the add-on. Here's hoping it stays fixed.

DarthBrandon avatar Jan 01 '20 07:01 DarthBrandon

I'm still having this issue but it is intermittent. I have the number of history days to keep set to 1. It doesn't make a difference what number I choose but 1 makes it easy to see if things aren't working right. Up until around 1/29/2020 it was working fine. Now I have history from 1/29 to 1/31. History from this point on won't be deleted. I had to clear my history to get things working again. I'll try to keep an eye on things and make a note if anything unusual happens in Firefox that might be causing this. Perhaps it's a crash or maybe even setting a preference. I like to try out prefs that aren't enabled by default. Some I imagine aren't even stable yet. I'll report back if I can pin point something for you.

streetwolf avatar Jan 31 '20 22:01 streetwolf

Again it happened. My history is not being deleted. I am what one might call a PC enthusiast, that is I like to tinker with both hardware and especially settings in my BIOS. One strange consequence of fiddling with my BIOS settings is that every once in a while after a reboot to Windows with some new BIOS setting Firefox starts up automatically. As I was not even in Firefox when I shutdown to make BIOS changes I have no idea why it starts up. It is always any empty tab. It has nothing to do with session restore as I don't have that enabled and as I said I was not in Firefox at all. I'm thinking this behavior might be the cause of my history problem. Just a guess at this point but it's plausible. History never gets deleted after it stops working unless I clear out the history file manually.

streetwolf avatar Feb 03 '20 19:02 streetwolf

As a test I disabled HC and installed the similar add-on History AutoDelete. Things were going smoothly until I had an issue with Fx starting up in a somewhat dubious state. None of my add-ons appeared to be working and no add-on icons. Also there were problems getting to sites. I got around all that and then discovered that my old history entries were not being deleted similar to HC. It must be when Fx gets into some 'funky' situation that both add-ons do not delete history. So if misery loves company here you have it :-(

streetwolf avatar Feb 08 '20 14:02 streetwolf

Guys, I'm having the same issue. I'm using Linux and latest version of addon. I have settings to keep 170 days of the history, but still see items older than 6 month in the my history.

webcaptcha avatar Feb 21 '20 08:02 webcaptcha

Does not work for me too.

After installing the extension, setting "Numbers of days to keep history" to 1 day and restart the browser I still see all browser history here:

image

Firefox version: 80.0 (64-bit). Logs:

22:35:08.817 Content Security Policy: The page’s settings blocked the loading of a resource at eval (“script-src”). background.js:3759:15
22:36:51.548 Uncaught (in promise) Error: Type error for parameter details (Error processing tabId: Integer -1 is too small (must be at least 0)) for browserAction.setIcon.
    setTabIconActive moz-extension://1fb92702-9302-4cd6-aebc-d3dd383a8c69/js/utils.js:51
utils.js:51:12
22:36:51.548 Uncaught (in promise) Error: Type error for parameter details (Error processing tabId: Integer -1 is too small (must be at least 0)) for browserAction.setBadgeText.
    safeSetBadgeText moz-extension://1fb92702-9302-4cd6-aebc-d3dd383a8c69/js/utils.js:57
utils.js:57:17
22:39:36.349
Unchecked lastError value: Error: Missing host permission for the tab background.js:2
22:39:36.357
Unchecked lastError value: Error: Missing host permission for the tab background.js:2
22:40:28.583
Error: Can't find profile directory. 2 XULStore.jsm:66:15

sergeyklay avatar Sep 01 '20 19:09 sergeyklay

Looks like extension is working, but for unknown reasons it delete entries not immediately.

webcaptcha avatar Sep 03 '20 11:09 webcaptcha

Hello, I made a new pre-release version https://github.com/Rayquaza01/HistoryCleaner/releases/tag/v1.2.4rc1.

It adds an option to show a notification when history is deleted, as well as a button to delete history from the options page, which will hopefully help with debugging this issue.

If you want to try the pre-release, install the file from the link above using about:debugging. Then: Open Hamburger Menu > Web Developer > Browser Console. Press the trash can icon at the top left of the window to clear the logs. Then, let your browser idle for 60 seconds (or the user set idle length) or press the Manual Delete button. If anything new gets added to the console after history should have been deleted, post it here.

Rayquaza01 avatar Nov 25 '20 14:11 Rayquaza01

Since there have been no new additions to this issue since I added notifications in 2020, I'm going to assume that whatever was causing this is now fixed.

If anyone is still having this problem, you may still comment here or open a new issue.

Rayquaza01 avatar Jun 21 '24 00:06 Rayquaza01