Closed Bug 638003 Opened 13 years ago Closed 12 years ago

Firefox Sync failing to sync with JSON.parse error

Categories

(Firefox :: Sync, defect)

x86_64
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: blair.mitchelmore, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b13pre) Gecko/20110228 Firefox/4.0b13pre
Build Identifier: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b13pre) Gecko/20110228 Firefox/4.0b13pre

Firefox Sync has been failing on my nightly builds for a couple weeks or so. It could be a momentary bug, but I tend to think it's happening because of the data in my bookmarks and history.

Two errors as reported in my Error Console:
Error: [Exception... "NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource://services-sync/resource.js :: Channel_onStopRequest :: line 509"  data: no]
Source File: resource://services-sync/resource.js
Line: 509

Error: JSON.parse
Source File: resource://services-sync/record.js
Line: 94

Reproducible: Always

Steps to Reproduce:
1. Wait for Sync to attempt a sync.
Actual Results:  
Sync fails.

Expected Results:  
Sync syncs.

I also receive this warning in the Error Console:
1299037715776	Collection	WARN	Got exception calling onProgress handler during fetch of https://phx-sync068.services.mozilla.com/1.0/[sync user name]/storage/history?full=1&ids=[massively long list of ids]
Component: General → Firefox Sync: Backend
Product: Firefox → Mozilla Services
QA Contact: general → sync-backend
Could you please open a Terminal and run:

  wget --user <your username> <the URL you mentioned>

enter your Sync password, and attach the file here?
I received a 414 Request-URI Too Large error. It's a really big list of ids. Maybe it should be using POST?
Could you please post the URI?
I'm adding an example failing url as an attachment because it's too big to be listed in a comment.
OK, we think we know what might have happened here. If *every record* that Sync tried to fetch failed, we would collect them all to fetch again later... and we don't batch those, so you get a 25,000-character URL. Bad. This handler wasn't designed to handle this kind of high-volume failure.

We're interested in how that failure occurred!

There's a straightforward way to unbreak this, which might also allow us to see the root cause. Please do the following:

    Go to about:config
    Set services.sync.log.appender.debugLog.enabled to true
    Set services.sync.log.appender.debugLog.rotate to false
    Restart Firefox
    Open Preferences; go to Sync
    Choose "Reset Sync" from the "Manage Account" dropdown
    Opt to merge data.


If you get an error on your next sync, please attach the contents of about:sync-log to this bug.

Thanks!
Status: UNCONFIRMED → NEW
Ever confirmed: true
I did as instructed, and I have a heck of a error log for you. Unfortunately, it's too big to attach here, so I'll link you to an online copy I've published instead. <http://dl.dropbox.com/u/61248/sync-log.txt> 

It seems like the decryption is failing pretty consistently, which leads to the situation you described. I sync across numerous machines — an iMac, a Macbook Pro, a standard PC running Windows 7, an iPhone, and an iPad — and I recently added the iMac to my repertoire so is it possible my key phrase was corrupted or changed somewhere along the way?
Thanks for the log.

It seems unlikely that this machine has successfully synced in a while.

You have multiple machines using this account, with two different keys for storage. Most likely you upgraded one machine in early December, another machine in late December, and things got screwed.

We used to quietly muffle the HMAC errors that are filling your logs, but they're now reported as errors, and are causing retries.

The best remedy is for you to choose "Deactivate this device" in prefs on the failing machine, and then re-add it to the sync mix as if it were new. If that fixes things, great; if not, let us know.
The error recovery bug is Bug 638301.
I couldn't find a machine that used my 'correct' key so I had to disconnect them all and reset my sync key. All seems well now. Thanks for the help.
Pretty sure we fixed every issue mentioned in this bug report.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: