Open Bug 1270948 Opened 9 years ago Updated 11 months ago

JSON files saves by Sync occasionally has garbage in it, causing failure to load it as JSON.

Categories

(Firefox :: Sync, defect, P4)

defect

Tracking

()

People

(Reporter: ckarlof, Unassigned)

Details

(Keywords: testcase-wanted)

Attachments

(1 file)

Attached file Sync error log
It looks like this user is experiencing errors in reading his or her changed ID files. This was copied from https://bugzilla.mozilla.org/show_bug.cgi?id=1234350#c12.
Flags: firefox-backlog+
That's very strange - the failure to load the JSON isn't causing failures - it will cause Sync to not sync everything it should, but isn't actually causing the login failure. The relevant parts are: > 1462193070878 Sync.Service INFO Logging in the user. > 1462193070879 Sync.BrowserIDManager INFO initializeWithCurrentIdentity has no user logged in > 1462193070879 Sync.BrowserIDManager INFO Username changed. Removing stored credentials. > 1462193070879 browserwindow.syncui DEBUG _loginFailed has sync state=success.login > 1462193070880 Sync.BrowserIDManager ERROR Could not authenticate: no user is logged in So somehow we've lost the information about the logged in user - which is also stored in a JSON file in the profile directory. Moltres Rider, what addons do you have installed?
Flags: needinfo?(moltres.facesits.justin.coolidge)
Keywords: testcase-wanted
Could you please provide us with more information about your environment (OS, Firefox version, build id) and the steps to reproduce this bug? Also can you please retest this using the latest Firefox release and the latest Nightly build (https://nightly.mozilla.org/) and report back the results? When doing this, please use a new clean Firefox profile, maybe even safe mode, to eliminate custom settings as a possible cause (https://goo.gl/PNe90E).
Flags: needinfo?(ckarlof)
Emil, this was spun from another bug. This reporter is currently NI'ed on this bug.
Flags: needinfo?(ckarlof)
Triage: P2
Priority: -- → P2
In the profile where I saw this error, Sync ended up fixing it itself next time it wrote to that file, which was fairly soon after the error was reported (ie, the next time anything changed locally - in this example, the next time a bookmark was changed) In my case, this file was 2 bytes long, both bytes \0. I'd love to know how we ended up with that file in that state but can't see how it was directly related to Sync, especially given this log seems to show signedInUser.json has the same problem - maybe OS.File? Cosmic rays? Either way, I'm not sure we should bother having Sync guard against this - it just creates some WARN level log noise and auto recovers.
Flags: needinfo?(moltres.facesits.justin.coolidge)
Priority: P2 → P4
Summary: Errors in changed ID file causes Sync to fail → JSON files saves by Sync occasionally has garbage in it, causing failure to load it as JSON.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: