Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add-on doesn't delete history #5

Closed
nadesco opened this issue Sep 20, 2019 · 24 comments
Closed

Add-on doesn't delete history #5

nadesco opened this issue Sep 20, 2019 · 24 comments

Comments

@nadesco
Copy link

nadesco commented Sep 20, 2019

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

@Rayquaza01
Copy link
Owner

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.

@nadesco
Copy link
Author

nadesco commented Sep 26, 2019

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.

@anonymous-user
Copy link

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.

@Rayquaza01
Copy link
Owner

@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)});

@anonymous-user
Copy link

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 <script> with source “http://www.googleadservices.com/pagead/conversion_async.js”. bg.html:1:1
  • Loading failed for the <script> with source “http://connect.facebook.net/en_US/fbevents.js”. bg.html:1:1
  • Loading failed for the <script> with source “http://www.google-analytics.com/analytics.js”. bg.html:1:1
  • 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

@streetwolf
Copy link

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?

@Rayquaza01
Copy link
Owner

@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
Copy link
Owner

@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.

@streetwolf
Copy link

streetwolf commented Oct 16, 2019 via email

@anonymous-user
Copy link

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

@nadesco
Copy link
Author

nadesco commented Oct 17, 2019 via email

@Tibladar
Copy link

Tibladar commented Dec 6, 2019

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 #5 (comment) prints

or sometimes only
Promise { <state>: "pending" }
and in both cases the history doesn't change.

@DarthBrandon
Copy link

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.

@streetwolf
Copy link

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.

@DarthBrandon
Copy link

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
Copy link

DarthBrandon commented Jan 1, 2020

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.

@streetwolf
Copy link

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
Copy link

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
Copy link

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 :-(

@webcaptcha
Copy link

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.

@sergeyklay
Copy link

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

@webcaptcha
Copy link

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

@Rayquaza01
Copy link
Owner

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants