Closed Bug 1428519 Opened 2 years ago Closed 2 years ago

places.sqlite lost reference to bookmarks toolbar folder - unable to sync/export/import

Categories

(Toolkit :: Places, defect, P3)

57 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla61

People

(Reporter: cwalk, Assigned: standard8)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxsearch][fixed by bug 478035])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20180103231032

Steps to reproduce:

1. Tried exporting bookmarks to HTML - no file gets generated. 
2. Tried exporting to JSON file, file is generated but cannot be imported on another computer.
3. Tried syncing bookmarks using the built in Sync tool - no sync ever gets completed from the desktop computer.


Actual results:

1. Tried exporting bookmarks to HTML - no file gets generated. 
2. Tried exporting to JSON file, file is generated but cannot be imported on another computer.
3. Tried syncing bookmarks using the built in Sync tool - no sync ever gets completed from the desktop computer.


Expected results:

1. I expected an HTML file to be generated during the export
2. I expected the resulting JSON file to be imported on Firefox on a different computer
3. I expected sync to work - it does on the laptop, but not on the desktop.
Component: Untriaged → Bookmarks & History
This seems like the critical part from the log:

514350271656	Sync.ErrorHandler	DEBUG	bookmarks failed: Error: Duplicate entry for toolbar in changeset (resource://gre/modules/PlacesSyncUtils.jsm:1970:11) JS Stack trace: addRowToChangeRecords@PlacesSyncUtils.jsm:1970:11 < pullSyncChanges@PlacesSyncUtils.jsm:2022:5

https://dxr.mozilla.org/mozilla-release/rev/4d3497f26bc179ce5632719a808e32335e8cec4d/toolkit/components/places/PlacesSyncUtils.jsm#1968

It looks like the database is corrupt in some manner - as there's more than one entry for the toolbar.
@cwalk, is this a database that you would be willing to share with us so that we could do further diagnostics? It only contains information for bookmarks and history.

We're not quite sure how this would be corrupt in the way the error message is suggesting, so being able to examine the database might help.

You could email it direct to myself, and I would only share it with one other colleague who works with my on the bookmarks & history.

In the meantime, if you could also retry the export, but with opening Tools -> Web Developer -> Browser Console first, and then trying the export. Hopefully an error will appear which may also help our understanding.
Flags: needinfo?(cwalk)
See Also: → 1423418
@Mark Banner, the toolbar contents appear to repeat countless times. Choosing the SHOW ALL BOOKMARKS command opens an empty window with no ability to delete the duplicate folders. Any hope for rescuing the bookmarks?

Yes, I would be happy to share the database. Can you tell me how to send it?

cwalk (In reply to Mark Banner (:standard8) from comment #2)
Flags: needinfo?(cwalk) → needinfo?(standard8)
(In reply to cwalk from comment #3)
> Yes, I would be happy to share the database. Can you tell me how to send it?

Go to Help -> Troubleshooting information, in the "Application Basics", it should show the profile folder. Click the button to open it in Finder, then shut down Firefox.

Once Firefox has been shut down, look for places.sqlite, take a copy of the file and email it to me (use my bugzilla address, don't post it to bugzilla itself).

> @Mark Banner, the toolbar contents appear to repeat countless times.
> Choosing the SHOW ALL BOOKMARKS command opens an empty window with no
> ability to delete the duplicate folders. Any hope for rescuing the bookmarks?

After taking a copy of places.sqlite (and sending it to me!), try going to Help -> Troubleshooting information. Somewhere down the page you'll find a section titled "Places Database". From there, select Verify Integrity.

That may or may not help. If it doesn't let us know and having looked at the database, we might be able to do something more.
Flags: needinfo?(standard8)
@cwalk: I'm sorry for the slow response.

Just looking at the database, it appears there is no Toolbar folder within the actual database, this is one of the core folders that we expect to be present and is created when the database is first created.

Somehow this has been deleted. However, the good news is that I can get the database working again - I've got a change that I've done manually, and I'll send it to you in a few minutes.

We'll work out if there's anything we can do or try automatically.

In the meantime, a couple of questions:

- Do you know when this started happening? Was it just before filing the bug report?
- Do you have any add-ons that might have affected this?
- Was there anything else changed in the setup recently do you know? (e.g. more synced devices, other upgrades etc).
Blocks: 1410877
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(cwalk)
Summary: Unable to export bookmarks or get bookmarks to sync → places.sqlite lost reference to bookmarks toolbar folder - unable to sync/export/import
Whiteboard: [fxsearch]
Also, have you ever manually run SQL queries against places.sqlite?
Component: Bookmarks & History → Places
Priority: -- → P3
Product: Firefox → Toolkit
Depends on: 478035
Received the answers to comment 5 via direct email:

- Do you know when this started happening? Was it just before filing the bug report?

> I first noticed the problem three months ago on November 1, 2017.

- Do you have any add-ons that might have affected this?

> I have used Xmarks for years to sync my bookmarks between Chrome, Safari and Firefox until I started to get sync errors last fall.

- Was there anything else changed in the setup recently do you know? (e.g. more synced devices, other upgrades etc).

> The upgrade to Firefox 56 coincided with the problem and possibly caused it.
Flags: needinfo?(cwalk)
Now that bug 478035 has landed in our nightly builds, I've just reverified this with the latest nightly and the database correctly gets fixed.

Hence marking as fixed.

Thank you to cwalk for providing the information for us to be able to fix this.
Assignee: nobody → standard8
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Whiteboard: [fxsearch] → [fxsearch][fixed by bug 478035]
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.