Closed Bug 1364685 Opened 7 years ago Closed 7 years ago

History and cookies are radomly deleted

Categories

(Toolkit :: Places, defect)

53 Branch
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: Intenditore, Unassigned)

Details

(Keywords: dataloss)

User Agent: Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0
Build ID: 20170504105526

Steps to reproduce:

Usual usage


Actual results:

I use FF as usual. Now, since I updated to Firefox 53 I constantly get my history wiped out completely. I siply start FF once again and see no previous pages I visited, no familiar pages on new tab. There's no any special actions could lead to that issue, nothing unusual. It has no particular logic behind, some time I start and close it many times with no problems, some time I get this wierd hateful issue. The bookmarks remain
There's also the places.sqlite.corrupt file, last modification date (for now) is a weak away. I try to replace newly created file with this one, FF refuses and starts it all over again. the .corrupt file is ok and may be opened with sqlite editor
I had the same wierd issue with cookies. Once updating to FF 53 I lost all my cookies. They were wiped out completely, only cookies.sqlite.bak remained. I also tried to recover from it - no luck, firefox rejected them. I tried everything I could. The only solution I have found is Firefox 44. It got my cookies backup working, so I exported them via an addon and then imported into FF 53. Before I tried rolling back to 52, 51, but it didn't work 
All that happens (issues with history) on new clean profile with cookies.sqlite and places.sqlite manually moved into it from old one
WTF is that? 
Sorry, but I simply HATE, HATE firefox now! I'm so ierfull I want to throw it in a trash can! So much time spent to recover so important info. Awful!
Component: Untriaged → Startup and Profile System
Keywords: dataloss
Product: Firefox → Toolkit
Component: Startup and Profile System → Places
(In reply to Intenditore from comment #0)
> I use FF as usual. Now, since I updated to Firefox 53 I constantly get my
> history wiped out completely. I siply start FF once again and see no
> previous pages I visited, no familiar pages on new tab. There's no any
> special actions could lead to that issue, nothing unusual. It has no
> particular logic behind, some time I start and close it many times with no
> problems, some time I get this wierd hateful issue. The bookmarks remain
> There's also the places.sqlite.corrupt file, last modification date (for
> now) is a weak away. I try to replace newly created file with this one, FF
> refuses and starts it all over again. the .corrupt file is ok and may be
> opened with sqlite editor

I'm sorry about your problem.
The fact Sqlite opens the file doesn't mean its contents are sane, nor coherent. it just means the database headers are there.
You can try to cleanup places.sqlite with my add-on https://addons.mozilla.org/en-US/firefox/addon/places-maintenance/ but note that it's not normal if your places.sqlite keeps corrupting and that may indicate issues at a memory or disk level in your system.

If Places Maintenance cannot fix your database, your best option would be to throw it away and let Firefox generate a new one (it will do on the next startup). You'll lose history, but not bookmarks.

If, after replacing the database with a new one, a corruption should happen soon again, I'd strongly suggest having your system verified by a technician, since losing history is not critical, but you likely have more important data on your system that you don't want to lose.

Note, if you are wishing to share your corrupt database with me for analysis (and tentative recovery), you can reach me by private mail.
Hi!
Thanks for answer. I do appreciate my history, so to wipe it out is not a good solution for me (it's easier to move to Opera if so as it transfers all my data to it's profile flowlessly). I tried your addon, it says the db is corrupted and asks to create new one
I opened it in SQLiteStudio and did a PRAGMA integrity_check, so some results I got are:

"*** in database main ***
On tree page 19 cell 3: Child page depth differs
On tree page 19 cell 2: Child page depth differs
On tree page 13 cell 0: 2nd reference to page 2090
On tree page 13 cell 8: 2nd reference to page 2089
On tree page 13 cell 7: 2nd reference to page 2088
On tree page 13 cell 6: 2nd reference to page 2087
On tree page 13 cell 5: 2nd reference to page 2086
On tree page 13 cell 4: 2nd reference to page 2085
On tree page 13 cell 3: 2nd reference to page 2084
On tree page 13 cell 2: 2nd reference to page 2083
On tree page 13 cell 1: 2nd reference to page 2082"
row 90 missing from index moz_places_faviconindex

and a buch of this such lines

row 240 missing from index moz_places_faviconindex

Seems nothing fatal? Can I fix it?
(In reply to Intenditore from comment #3)
> Hi!
> Thanks for answer. I do appreciate my history, so to wipe it out is not a
> good solution for me (it's easier to move to Opera if so as it transfers all
> my data to it's profile flowlessly).

It's unlikely to transfer all of your data, probably it could transfer some partial data.

> I tried your addon, it says the db is
> corrupted and asks to create new one

Did it create a new one? The add-on does its best to try to rebuild the data in a new db, if it fails there's nothing much more that can be done without spending large amount of time to pick the data one by one.

> I opened it in SQLiteStudio and did a PRAGMA integrity_check, so some
> results I got are:
> 
> "*** in database main ***
> On tree page 19 cell 3: Child page depth differs
> On tree page 19 cell 2: Child page depth differs
> On tree page 13 cell 0: 2nd reference to page 2090
> On tree page 13 cell 8: 2nd reference to
> ...
> Seems nothing fatal? Can I fix it?

It seems really fatal, pages are the main unit used by sqlite to store data, if references to pages are broken, the whole data may potentially be broken. This doesn't happen usually, unless the filesystem is broken (that as I said previously may be caused by a problem with memory or disks).

You can try the manual steps I outlined in comment 2, but no promises.
Seems I simply didn't get it right how it supposed to work :)
Tried creating new datebase - man, it worked FINE! Only some favicons are lost (not an issue at all)
Many many thanks for such a wounderful resque tool, it's awesome! You saved me from a lot of headache, thank you very much! :)
I'm glad that helped, unfortunately we can't do much against corruption, we have a bug on file to create an history backup already. Please check your system for eventual hardware or OS issues.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.