Closed Bug 1404631 Opened 7 years ago Closed 7 years ago

Firefox 56: "Unable to process the backup file" without any details on what's wrong

Categories

(Toolkit :: Places, defect, P1)

56 Branch
x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox57 --- wontfix
firefox58 --- fixed

People

(Reporter: konstantin, Assigned: mak)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [fxsearch])

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0 Build ID: 20170926190823 Steps to reproduce: Tried to load backup created by Firefox 55.* from built-in Bookmarks manager. Actual results: "Unable to process the backup file" displayed, nothing else happens. Expected results: Bookmark file should be normally imported. When I create backup from Firefox 56, it's imported without issues.
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Component: Untriaged → Places
Product: Firefox → Toolkit
Hi, would you allow me to have access to the broken backup for debugging purposes? A private mail to my bugzilla mail address would be fine.
Flags: needinfo?(konstantin)
you can also send it to my mozilla mail if you trust that more, mak AT mozilla.com
(In reply to Marco Bonardo [::mak] from comment #2) > you can also send it to my mozilla mail if you trust that more, mak AT > mozilla.com I have sent email with a sample bookmarks backup file attached.
Flags: needinfo?(konstantin)
Investigating.
Assignee: nobody → mak77
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P1
Whiteboard: [fxsearch]
Interesting, in the browser console I see this error: Error: Bookmarks.jsm: insertTree: Invalid value for property 'lastModified': 0 We should not be writing 0 here. It's possible there is a corruption in the database where either the lastModified or dateAdded field are zero or NULL, something that is unexpected.
(In reply to Marco Bonardo [::mak] from comment #5) > Interesting, in the browser console I see this error: Error: Bookmarks.jsm: > insertTree: Invalid value for property 'lastModified': 0 > > We should not be writing 0 here. It's possible there is a corruption in the > database where either the lastModified or dateAdded field are zero or NULL, > something that is unexpected. The original problem reported in this bug was happening on two separate Firefox installations (both working on Ubuntu, 14.04 and 16.04). If I understand correctly, even if database contained unexpected value, the result shouldn't be an exception, causing the process to abort.
Yes, we'll add a fixup procedure so that import/restore will try to do its best to insert "invalid" entries or skip that, so that most entries can still be added.
Blocks: 1095427
Blocks: 1373610
No longer blocks: 1095427
Blocks: 1392271
Comment on attachment 8922250 [details] Bug 1404631 - Bookmarks.insertTree should have an option to fixup input and skip broken entries. https://reviewboard.mozilla.org/r/193282/#review198724 Looking good. I found one small potential intermittent issue with the test, but I think that's probably an easy fix. ::: toolkit/components/places/tests/bookmarks/test_insertTree_fixupOrSkipInvalidEntries.js:12 (Diff revision 1) > + await Assert.throws(() => insertTree({guid, children: []}), > + /Should have a non-zero number of children to insert./); > + await Assert.throws(() => insertTree({guid: "invalid", children: [{}]}), > + /The parent guid is not valid/); > + > + let now = new Date(); I just tried this on my Mac and got: FAIL Found a valid dateAdded - false == true /Users/mark/dev/gecko/objdir-ff/_tests/xpcshell/toolkit/components/places/tests/bookmarks/test_insertTree_fixupOrSkipInvalidEntries.js:onItemAdded:25 resource://gre/modules/Bookmarks.jsm:notify:1206 resource://gre/modules/Bookmarks.jsm:insertTree/<:510 It looks like it takes a couple of seconds to run through, so `now` is 1509046068872000 but `dateAdded` recorded by the observer is 1509046068874000. I think you probably want to move `now` into the `onItemAdded` but also calculate it separately for the dates in the tree.
Attachment #8922250 - Flags: review?(standard8) → review+
(In reply to Mark Banner (:standard8) from comment #9) > I think you probably want to move `now` into the `onItemAdded` but also > calculate it separately for the dates in the tree. I'll just replace the is_time_ordered with a >=, because I can't predict the time used by Bookmarks.jsm to fixup. And experience teaches me it's better to not trust timestamps guessing in tests :)
Pushed by mak77@bonardo.net: https://hg.mozilla.org/integration/autoland/rev/f4e6ab850229 Bookmarks.insertTree should have an option to fixup input and skip broken entries. r=standard8
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Blocks: 1410877
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: