1.8, 1.10 Testing: Red error in Firefox - UNIQUE contraint failed

Bug #1464299 reported by gravy45
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
BleachBit
Fix Released
Medium
Unassigned

Bug Description

Running Ubuntu MATE 15.10 64-bit. Bleachbit 1.7.7 beta, 1.8, 1.10.

Tried test #5 from this webpage:
http://bleachbit.sourceforge.net/news/bleachbit-177-beta

"Clean Firefox, and verify there are no red errors."

Received the following red error, which I believe started showing up in Bleachbit 1.6 or possibly one version prior, but not in versions earlier than that. Could be that Mozilla started putting unique constraints on tables where they didn't exist before.

UNIQUE constraint failed: moz_places.url: /home/um/.mozilla/firefox/gqrobdy0.default.places.sqlite

Andrew Ziem (ahziem1)
Changed in bleachbit:
milestone: none → 1.8
Revision history for this message
Andrew Ziem (ahziem1) wrote :

Which version of Firefox do you have?

Is "Overwrite files" enabled in the BleachBit preferences?

I do not see that error on Ubuntu 14.10 and Firefox 38.

Revision history for this message
gravy45 (gravy45) wrote :

It is Firefox 38.0, installed from the repository. I did and do have "Overwrite files to hide contents" checked.

I want to say that I saw that error with Ubuntu MATE 14.04 and bleachbit 1.6. I don't think I saw it with bleachbit 1.2. But I'm not 100% sure.

Revision history for this message
Andrew Ziem (ahziem1) wrote :

Just for troubleshooting: does the error go away if you disable "Overwrite files to hide contents"? This does affect the way sqlite files are cleaned.

Andrew Ziem (ahziem1)
Changed in bleachbit:
milestone: 1.8 → 1.10
Revision history for this message
gravy45 (gravy45) wrote :

I've been trying to duplicate the error but had to reinstall the desktop. Now testing again with 1.8 in a VM and 1.6 on the desktop haven't been able to get the error. If there is a problem in bleachbit, it will reappear. If you give me a week or two I'll have it figured out one way or another.

Revision history for this message
gravy45 (gravy45) wrote :

Yes, the error goes away if I disable "Overwrite files to hide contents".

Andrew Ziem (ahziem1)
Changed in bleachbit:
importance: Undecided → Medium
Revision history for this message
Andrew Ziem (ahziem1) wrote :

Are you still able to reproduce the error? If so, maybe you could privately email me a copy of your place.sqlite file? It seems specific to the file and the option "overwrite files"

Andrew Ziem (ahziem1)
Changed in bleachbit:
milestone: 1.10 → 1.12
Revision history for this message
gravy45 (gravy45) wrote :

PM sent. The issue seems to be with the URL field in moz_places, moz_favicons, and moz_hosts in place.sqlite. If the length of the URL in two or more rows is the same, then the call to overwrite with zeroes with zeroblob() fails due to a unique database constraint on the tables/URL field If I'm recalling the Python code correctly, this will prevent moz_places (and at least moz_hosts) from being cleaned out.

I just ran a test where all of my history was retained (even with overwrite option set in BB) in moz_places, moz_hosts, and to some extent in moz_favicons. Even when these constraint errors weren't occurring. I was assuming that the Firefox tables would be cleaned out. If that is the intent, I can open up another bug and probably come up with some quick test cases to prove the finding.

Workaround for me is to set Firefox to never remember history, and occasionally delete the entire profile (shred the folder in the trash with Bleachbit) and start over. But I'd prefer to not have to do that.

description: updated
summary: - 1.8 Testing: Red error in Firefox - UNIQUE contraint failed
+ 1.8, 1.10 Testing: Red error in Firefox - UNIQUE contraint failed
Revision history for this message
gravy45 (gravy45) wrote :

If I am right about the Firefox database retaining history entries in the tables even with Bleachbit, then I think this one should be marked as High priority and hopefully someone else confirms they can reproduce it. I do want to be proved wrong on this of course!

Revision history for this message
Andrew Ziem (ahziem1) wrote :

Fix committed in git commit c43077d for the next release. Thank you for reporting this bug.

Changed in bleachbit:
status: New → Fix Committed
Revision history for this message
Andrew Ziem (ahziem1) wrote :

To confirm the fix, please test the fix in BleachBit 1.11 beta
https://www.bleachbit.org/news/bleachbit-1110-beta

Andrew Ziem (ahziem1)
Changed in bleachbit:
status: Fix Committed → Fix Released
Revision history for this message
gravy45 (gravy45) wrote :

I tested BleachBit 1.11 beta (source code version) on Ubuntu 16.04 and am no longer seeing the Unique constraint/Red errors for Firefox. Great work. The history in places.sqlite is not being retained except in the table moz_places where last_visit_date is NULL. These rows are the one that populate immediately upon first opening of Firefox ( or after deleting ~/.mozilla/firefox/profile.default and ~/.mozilla/firefox/profiles.ini and reopening Firefox then pausing ). I don't think it matters.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.