MozillaZine

Bookmarks gone, reset to default, after upgrade to 2.48b

User Help for Seamonkey and Mozilla Suite
barbaz
 
Posts: 1525
Joined: October 1st, 2014, 3:25 pm

Post Posted December 1st, 2016, 11:06 am

I'm looking to upgrade my SeaMonkey to 2.48, so went to test it out in a disposable VM as usual. And found my bookmarks completely removed and reset to default? :?

Some poking around with SQLite Manager shows they are still listed in moz_places table in places.sqlite - it's the moz_bookmarks table got reset to default.

Oddly, keyword entry still works. Not only that, when the keyword is typed in full, the site for the keyword is offered in the dropdown that comes up, along with its favicon. That's despite having history already cleared and not visiting the site since.

Is this a known bug? How to prevent my bookmarks being half-eaten?

Ignore the UA string you see below, I'm not posting from 2.48. Go by this one instead -
Code: Select all
Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20161201 SeaMonkey/2.48b
*Always* check the changelogs BEFORE updating that important software!

barbaz
 
Posts: 1525
Joined: October 1st, 2014, 3:25 pm

Post Posted December 1st, 2016, 12:05 pm

Re-copying places.sqlite seems to have restored my bookmarks, so this is no longer a show-stopper. But the questions still remain.

Why did my bookmarks go away in the first place? And can anything be done to prevent it happening at all?
*Always* check the changelogs BEFORE updating that important software!

therube

User avatar
 
Posts: 16898
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted December 1st, 2016, 6:49 pm

Is it repeatable?

Maybe something in there that it barfs on?


> Re-copying places.sqlite seems to have restored my bookmarks

Wonder if it were the re-copying or maybe it actually wrote (successfully) & restored (automatically) from a bookmarks*.json backup?
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

barbaz
 
Posts: 1525
Joined: October 1st, 2014, 3:25 pm

Post Posted December 1st, 2016, 7:34 pm

therube wrote:Is it repeatable?

Yep, for me anyway. Every time I copy my entire profile (from the 2.46pre I'm posting from now) and run 2.48 on it, same result.

If I then let it mess up places.sqlite, and re-copy just my places.sqlite again, it seems to be OK.

And yes, I am completely quitting SeaMonkey before manually doing anything with any profile. :)

therube wrote:Maybe something in there that it barfs on?

How to find out?

therube wrote:Wonder if it were the re-copying or maybe it actually wrote (successfully) & restored (automatically) from a bookmarks*.json backup?

Actually I don't have any .json bookmark backups. That is, my bookmarkbackups folder is totally empty. Not really surprising though, since I run 2.46pre in a sandbox that gets dumped on quit.
*Always* check the changelogs BEFORE updating that important software!

therube

User avatar
 
Posts: 16898
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted December 1st, 2016, 9:27 pm

> I don't have any .json bookmark backups

But is one (a valid one) written during the first run of 2.48 (& even though places.sqlite itself at that point is bad)?

It so, your exit, copy, restart, could be reading from that .json, restoring that data into places.sqlite rather then what you thought was (now) opening correctly your (again) copied in places.sqlite?

(And of course I'm just surmising all this.)

Suppose you could compare CRC of old places.sqlite against your copied-again copy on the first restart?

Or compare an exported .json (& or html) from 2.46 vs what you get with 2.48?
(Or exported from sqlite / SQLite Manager.)
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

barbaz
 
Posts: 1525
Joined: October 1st, 2014, 3:25 pm

Post Posted December 2nd, 2016, 7:24 am

therube wrote:> I don't have any .json bookmark backups

But is one (a valid one) written during the first run of 2.48 (& even though places.sqlite itself at that point is bad)?

Yes, a bookmark backup is created, but it's written in .jsonlz4 format and I don't seem to be able to decompress it. So not sure what's in it.

therube wrote:It so, your exit, copy, restart, could be reading from that .json, restoring that data into places.sqlite rather then what you thought was (now) opening correctly your (again) copied in places.sqlite?

(And of course I'm just surmising all this.)

I would think I could check that by adding a bookmark backup manually, but the manual backup only offers .json option. How to manually create a .jsonlz4 bookmark backup?

therube wrote:Suppose you could compare CRC of old places.sqlite against your copied-again copy on the first restart?

The hashes do not match.
*Always* check the changelogs BEFORE updating that important software!

Buzzrr

User avatar
 
Posts: 163
Joined: January 24th, 2004, 3:34 pm

Post Posted December 2nd, 2016, 1:20 pm

Yeah I too lost all of mine! After going to version 2.47 I think. History was also wiped out!

Looking through the profile folder I noticed this file:
Code: Select all
places.sqlite.corrupt


Okay so I got my bookmarks back (if I work long enough on this I will have solved this myself!)

bookmarks - manage bookmarks - tools - restore :)

Now to get back my history! [-o<

continued in thread.

therube

User avatar
 
Posts: 16898
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted December 3rd, 2016, 8:36 am

> .jsonlz4

Is an lz4 compressed .json file.
And in Mozilla's infinite wisdom, they (once again) handle things in a "not quite standard" way (even if what they are doing isn't technically incorrect), such that something like: lz.exe -d bookmarks.jsonlz wont' work.

I think someone did come up with a stand-alone decompressor, or you could always do it from within SeaMonkey itself.
On import, html/json, one method wipes out existing, one appends, & I don't recall which does which, but if json does the wipe out, then if you import a .jsonlz4, then manually export it, it will export uncompressed, so .json & you should be done.
If its the other way around, then you want to be sure you start with an "empty" places.sqlite, such that when you import, all that ends up in places.sqlite (& is subsequently exported to .json) are only the bookmarks from that .jsonlz4 file itself.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

therube

User avatar
 
Posts: 16898
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted December 3rd, 2016, 8:38 am

> The hashes do not match.

Might also try a (sqlite) .dump of the data for each & compare that.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

barbaz
 
Posts: 1525
Joined: October 1st, 2014, 3:25 pm

Post Posted December 3rd, 2016, 9:17 am

I went to check but there is no bookmark backup created this time. Well, it did make one while I'm typing this, but it took a while and happened well after places.sqlite went bad.

The size is about the same as the other .jsonlz4 (around 2.6K). I have truckloads of bookmarks, so it seems the other one was the default bookmarks.

However - manually making a .json backup, then simply placing it in the bookmarkbackups folder... and I do not lose my bookmarks! Good news, or..? Not sure what to make of that. :?

therube wrote:> The hashes do not match.

Might also try a (sqlite) .dump of the data for each & compare that.

I don't know this SQL stuff well at all. How to do this in SQLite Manager?
*Always* check the changelogs BEFORE updating that important software!

therube

User avatar
 
Posts: 16898
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted December 4th, 2016, 10:28 am

(I don't know the GUI.)

Code: Select all
$ sqlite3   places.sqlite

sqlite>  .output  dumy.out
sqlite>  .dump
sqlite>  .exit

$
$ ls
dumy.out

$


https://sqlite.org/

And with that, maybe a straight compare will work (well enough), or maybe you'll want to truncate some of the "gibberish" [noise] from the records (like the "dates"), so send it to sed or do it with Vim or similar.

Likewise, might split things out separately; moz_bookmarks, moz_favicons, moz_annos... might make compares easier.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

barbaz
 
Posts: 1525
Joined: October 1st, 2014, 3:25 pm

Post Posted December 4th, 2016, 11:45 am

"Good" places.sqlite dump is ~850 KB.
"Bad" places.sqlite dump is 18.8 KB.

Most of the diff looks like just my bookmarks being deleted. But not quite all of it.

The different code tags mean it's from different sections of the diff output.
Code: Select all
< CREATE TABLE moz_places (   id INTEGER PRIMARY KEY, url LONGVARCHAR, title LONGVARCHAR, rev_host LONGVARCHAR, visit_count INTEGER DEFAULT 0, hidden INTEGER DEFAULT 0 NOT NULL, typed INTEGER DEFAULT 0 NOT NULL, favicon_id INTEGER, frecency INTEGER DEFAULT -1 NOT NULL, last_visit_date INTEGER , guid TEXT, foreign_count INTEGER DEFAULT 0 NOT NULL);

> CREATE TABLE moz_places (   id INTEGER PRIMARY KEY, url LONGVARCHAR, title LONGVARCHAR, rev_host LONGVARCHAR, visit_count INTEGER DEFAULT 0, hidden INTEGER DEFAULT 0 NOT NULL, typed INTEGER DEFAULT 0 NOT NULL, favicon_id INTEGER, frecency INTEGER DEFAULT -1 NOT NULL, last_visit_date INTEGER , guid TEXT, foreign_count INTEGER DEFAULT 0 NOT NULL, url_hash INTEGER DEFAULT 0 NOT NULL);


Code: Select all
< CREATE UNIQUE INDEX moz_places_url_uniqueindex ON moz_places (url);


Code: Select all
> CREATE INDEX moz_places_url_hashindex ON moz_places (url_hash);
*Always* check the changelogs BEFORE updating that important software!

Return to SeaMonkey Support


Who is online

Users browsing this forum: No registered users and 6 guests