Closed Bug 472982 Opened 16 years ago Closed 16 years ago

Syncing fails: (NS_ERROR_FAILURE) [nsIJSON.decode]

Categories

(Cloud Services :: General, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bugzilla, Unassigned)

References

Details

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090109 Shiretoko/3.1b3pre Ubiquity/0.1.4 Build Identifier: 0.2.98 I try to sync, but I don't get new changes from the the other computer that synced earlier. See the attached log. Reproducible: Always Steps to Reproduce: 1. Upgraded client to 0.2.98 2. Upgraded weave account to 0.3 3. Sync Actual Results: Sync fails (see log) Expected Results: Sync works. 2009-01-10 14:56:56 Chrome.Window INFO User string: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090109 Shiretoko/3.1b3pre Ubiquity/0.1.4 2009-01-10 14:56:56 Chrome.Window INFO Weave version: 0.2.98 2009-01-10 14:56:56 Service.Util TRACE Setting 'Mozilla Services Password' password for user xxx 2009-01-10 14:56:57 Service.Util TRACE Setting 'Mozilla Services Encryption Passphrase' password for user xxx 2009-01-10 14:56:57 Service.Main DEBUG Logging in user xxx 2009-01-10 14:56:57 Service.Main DEBUG Event: weave:service:verify-login:start 2009-01-10 14:56:57 Service.Main DEBUG Verifying login for user xxx 2009-01-10 14:56:57 Net.Resource DEBUG GET request for https://services.mozilla.com/0.3/user/xxx 2009-01-10 14:56:57 Net.Resource DEBUG GET request successful (200) 2009-01-10 14:56:57 Service.Main DEBUG Event: weave:service:verify-login:success 2009-01-10 14:56:57 Service.Main DEBUG Event: weave:service:login:success 2009-01-10 14:56:57 Chrome.Window INFO Login successful 2009-01-10 14:56:59 Chrome.Login TRACE Sync login window closed 2009-01-10 14:57:17 Service.Main DEBUG Event: weave:service:sync:start 2009-01-10 14:57:17 PubKeyManager TRACE Importing key: https://services.mozilla.com/0.3/user/xxx/keys/pubkey 2009-01-10 14:57:17 Record.PubKey DEBUG GET request for https://services.mozilla.com/0.3/user/xxx/keys/pubkey 2009-01-10 14:57:17 Record.PubKey DEBUG GET request successful (200) 2009-01-10 14:57:17 PrivKeyManager TRACE Importing key: https://services.mozilla.com/0.3/user/xxx/keys/privkey 2009-01-10 14:57:18 Record.PrivKey DEBUG GET request for https://services.mozilla.com/0.3/user/xxx/keys/privkey 2009-01-10 14:57:18 Record.PrivKey DEBUG GET request successful (200) 2009-01-10 14:57:18 Service.Main DEBUG Refreshing client list 2009-01-10 14:57:18 Engine.Clients DEBUG Event: weave:clients:sync:start 2009-01-10 14:57:18 Engine.Clients DEBUG Ensuring server crypto records are there 2009-01-10 14:57:18 RecordMgr TRACE Importing record: https://services.mozilla.com/0.3/user/xxx/crypto/clients 2009-01-10 14:57:18 Record.CryptoMeta DEBUG GET request for https://services.mozilla.com/0.3/user/xxx/crypto/clients 2009-01-10 14:57:18 Record.CryptoMeta DEBUG GET request successful (200) 2009-01-10 14:57:18 Engine.Clients INFO First sync, uploading all items 2009-01-10 14:57:18 Engine.Clients INFO 1 outgoing items pre-reconciliation 2009-01-10 14:57:18 Engine.Clients DEBUG Downloading & applying server changes 2009-01-10 14:57:19 Collection DEBUG GET request for https://services.mozilla.com/0.3/user/xxx/clients/?full=1&sort=depthindex 2009-01-10 14:57:19 Collection DEBUG GET request successful (200) 2009-01-10 14:57:19 Store.Clients.Store DEBUG Saving client list to disk 2009-01-10 14:57:19 Engine.Clients DEBUG Preparing 1 outgoing records 2009-01-10 14:57:19 Engine.Clients DEBUG Uploading 1 records + 0 index/depth records) 2009-01-10 14:57:19 Collection DEBUG POST request for https://services.mozilla.com/0.3/user/xxx/clients/ 2009-01-10 14:57:19 Collection DEBUG POST request successful (200) 2009-01-10 14:57:19 Engine.Clients DEBUG Finishing up sync 2009-01-10 14:57:19 Engine.Clients DEBUG Event: weave:clients:sync:success 2009-01-10 14:57:19 Service.Main DEBUG Syncing engine bookmarks 2009-01-10 14:57:19 Service.Main DEBUG Event: weave:service:bookmarks-engine:sync:start 2009-01-10 14:57:19 Engine.Bookmarks DEBUG Event: weave:bookmarks:sync:start 2009-01-10 14:57:19 Engine.Bookmarks DEBUG Ensuring server crypto records are there 2009-01-10 14:57:19 RecordMgr TRACE Importing record: https://services.mozilla.com/0.3/user/xxx/crypto/bookmarks 2009-01-10 14:57:20 Record.CryptoMeta DEBUG GET request for https://services.mozilla.com/0.3/user/xxx/crypto/bookmarks 2009-01-10 14:57:20 Record.CryptoMeta DEBUG GET request successful (200) 2009-01-10 14:57:20 Engine.Bookmarks INFO 30760 outgoing items pre-reconciliation 2009-01-10 14:57:20 Engine.Bookmarks DEBUG Downloading & applying server changes 2009-01-10 14:57:22 Collection DEBUG GET request for https://services.mozilla.com/0.3/user/xxx/bookmarks/?modified=1230665570000&full=1&sort=depthindex 2009-01-10 14:57:22 Collection DEBUG GET request successful (502) 2009-01-10 14:57:22 Engine.Bookmarks WARN Sync failed 2009-01-10 14:57:22 Engine.Bookmarks DEBUG Event: weave:bookmarks:sync:error 2009-01-10 14:57:22 FaultTolerance DEBUG Original exception: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIJSON.decode] (JS frame :: file:///Users/xxx/Library/Application%20Support/Firefox/Profiles/hmunn5r9.default/extensions/%7B340c2bbc-ce74-4362-90b5-7c26312808ef%7D/modules/resource.js :: JsonFilter_afterGET :: line 348) Async stack trace: module:engines.js:153 :: Engine_sync module:service.js:678 :: WeaveSvc__syncEngine module:wrap.js:94 :: WeaveNotifyWrapper module:service.js:578 :: WeaveSvc__sync module:util.js:501 :: EL_notify Last callback created at module:wrap.js:93 :: WeaveNotifyWrapper 2009-01-10 14:57:22 Service.Main DEBUG Event: weave:service:bookmarks-engine:sync:success 2009-01-10 14:57:22 Service.Main WARN Some engines did not sync correctly 2009-01-10 14:57:22 Service.Main DEBUG Event: weave:service:sync:success
Henrik, it will help us if you give us your username so we can loon in the server logs. Toby, any ideas why he's getting a 502? And the client apparently thinks that's successful, heh.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: -- → 0.3
It's henrik.
I'm having the same issue. I haven't had any successful syncs in several versions now. My username is andender 2009-01-11 19:02:34 Service.Main DEBUG Event: weave:service:sync:start 2009-01-11 19:02:34 Service.Main DEBUG Refreshing client list 2009-01-11 19:02:34 Engine.Clients DEBUG Event: weave:clients:sync:start 2009-01-11 19:02:34 Engine.Clients DEBUG Ensuring server crypto records are there 2009-01-11 19:02:34 Engine.Clients INFO 1 outgoing items pre-reconciliation 2009-01-11 19:02:34 Engine.Clients DEBUG Downloading & applying server changes 2009-01-11 19:02:35 Collection DEBUG GET request for https://services.mozilla.com/0.3/user/andender/clients/?modified=1231718330000&full=1&sort=depthindex 2009-01-11 19:02:35 Collection DEBUG GET request successful (200) 2009-01-11 19:02:35 Store.Clients.Store DEBUG Saving client list to disk 2009-01-11 19:02:35 Engine.Clients DEBUG Preparing 1 outgoing records 2009-01-11 19:02:35 Engine.Clients DEBUG Uploading 1 records + 0 index/depth records) 2009-01-11 19:02:35 Collection DEBUG POST request for https://services.mozilla.com/0.3/user/andender/clients/ 2009-01-11 19:02:35 Collection DEBUG POST request successful (200) 2009-01-11 19:02:35 Engine.Clients DEBUG Finishing up sync 2009-01-11 19:02:35 Engine.Clients DEBUG Event: weave:clients:sync:success 2009-01-11 19:02:35 Service.Main DEBUG Syncing engine bookmarks 2009-01-11 19:02:35 Service.Main DEBUG Event: weave:service:bookmarks-engine:sync:start 2009-01-11 19:02:35 Engine.Bookmarks DEBUG Event: weave:bookmarks:sync:start 2009-01-11 19:02:35 Engine.Bookmarks DEBUG Ensuring server crypto records are there 2009-01-11 19:02:35 Engine.Bookmarks INFO First sync, uploading all items 2009-01-11 19:02:35 BmkTracker DEBUG Clearing changed ID list 2009-01-11 19:02:35 BmkTracker DEBUG Saving changed IDs to disk 2009-01-11 19:02:35 Engine.Bookmarks INFO 2852 outgoing items pre-reconciliation 2009-01-11 19:02:35 Engine.Bookmarks DEBUG Downloading & applying server changes 2009-01-11 19:02:36 Collection DEBUG GET request for https://services.mozilla.com/0.3/user/andender/bookmarks/?full=1&sort=depthindex 2009-01-11 19:02:40 Collection DEBUG GET request successful (200) 2009-01-11 19:02:40 Engine.Bookmarks WARN Sync failed 2009-01-11 19:02:40 Engine.Bookmarks DEBUG Event: weave:bookmarks:sync:error 2009-01-11 19:02:40 FaultTolerance DEBUG Original exception: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [IWeaveCrypto.unwrapSymmetricKey] (JS frame :: file:///C:/Documents%20and%20Settings/Michael/Application%20Data/Mozilla/Firefox/Profiles/cibu4h2b.default/extensions/%7B340c2bbc-ce74-4362-90b5-7c26312808ef%7D/modules/base_records/crypto.js :: CryptoMeta__getKey :: line 168) Async stack trace: module:engines.js:153 :: Engine_sync module:service.js:678 :: WeaveSvc__syncEngine module:wrap.js:94 :: WeaveNotifyWrapper module:service.js:578 :: WeaveSvc__sync module:util.js:501 :: EL_notify Last callback created at module:wrap.js:93 :: WeaveNotifyWrapper 2009-01-11 19:02:40 Service.Main DEBUG Event: weave:service:bookmarks-engine:sync:success 2009-01-11 19:02:40 Service.Main WARN Some engines did not sync correctly 2009-01-11 19:02:40 Service.Main DEBUG Event: weave:service:sync:success 2009-01-11 19:02:43 Service.Main INFO Running scheduled sync 2009-01-11 19:02:43 Service.Main DEBUG Event: weave:service:sync:start 2009-01-11 19:02:43 Service.Main DEBUG Refreshing client list 2009-01-11 19:02:43 Engine.Clients DEBUG Event: weave:clients:sync:start 2009-01-11 19:02:43 Engine.Clients DEBUG Ensuring server crypto records are there 2009-01-11 19:02:43 Engine.Clients INFO 1 outgoing items pre-reconciliation 2009-01-11 19:02:43 Engine.Clients DEBUG Downloading & applying server changes 2009-01-11 19:02:44 Collection DEBUG GET request for https://services.mozilla.com/0.3/user/andender/clients/?modified=1231718560000&full=1&sort=depthindex 2009-01-11 19:02:44 Collection DEBUG GET request successful (200) 2009-01-11 19:02:44 Engine.Clients DEBUG Preparing 1 outgoing records 2009-01-11 19:02:44 Engine.Clients DEBUG Uploading 1 records + 0 index/depth records)
(In reply to comment #3) > I'm having the same issue. I haven't had any successful syncs in several > versions now. My username is andender ... > (NS_ERROR_FAILURE) [IWeaveCrypto.unwrapSymmetricKey] (JS frame :: That is a different issue. Possibly bug 471960, but most likely an incorrect passphrase.
My passphrase is correct on my end.
I'm getting the same error (with nsIJSON.decode), but with a slightly different stack trace. I'm running the server prototype on my own server. I don't know how helpful this will be, but let me know if you need any more information - about either my computer or my server. 2009-01-12 19:54:02 Engine.Clients DEBUG Downloading & applying server changes 2009-01-12 19:54:02 Collection DEBUG GET request for http://my.own.server/weave/0.3/user/dave/clients/?modified=1231739195636.7&full=1&sort=depthindex 2009-01-12 19:54:02 Collection DEBUG GET request successful (200) 2009-01-12 19:54:02 Engine.Clients WARN Sync failed 2009-01-12 19:54:02 Engine.Clients DEBUG Event: weave:clients:sync:error 2009-01-12 19:54:02 FaultTolerance DEBUG Original exception: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIJSON.decode] (JS frame :: file:///Users/Dave/Library/Application%20Support/Firefox/Profiles/ciw8fqqk.default/extensions/%7B340c2bbc-ce74-4362-90b5-7c26312808ef%7D/modules/resource.js :: JsonFilter_afterGET :: line 348) Async stack trace: module:wrap.js:164 :: WeaveCatchAllWrapper module:wrap.js:94 :: WeaveNotifyWrapper module:service.js:603 :: WeaveSvc_sync module:service.js:313 :: WeaveSvc__onStartup module:util.js:501 :: EL_notify Last callback created at module:wrap.js:133 :: WeaveLocalLockWrapper 2009-01-12 19:54:02 Service.Main DEBUG Event: weave:service:sync:success
(In reply to comment #6) > I'm getting the same error (with nsIJSON.decode), but with a slightly different > stack trace. I'm running the server prototype on my own server. I don't know > how helpful this will be, but let me know if you need any more information - > about either my computer or my server. In your case, the server is returning 200, not 502. So Weave is presumably choking on the payload of some record. Could you set the pref 'extensions.weave.log.logger.network.resources' to 'Trace' and try again? I want to see the raw result of the network operation.
Sorry about this, but I just figured out the answer to my own problem, and it turns out it was my own fault. Put simply - my rewrite rules (I don't have access to Apache's conf) were losing some variables and confused the Server. I've rewritten a few things and things are working properly now. Thanks for the help, though!
Blocks: 470579
David, Could you possibly post your Rewrite rules? It would be nice to have a defined set of Rewrite rules known to work for those of us who are also stuck with just .htaccess It would also be nice if someone important could post them somewhere easily found (and not just in the comments of some related bug). A good place, imo, would be with the 0.3 server itself. I tried my best, and I can get one sync to work, but then all new syncs fail, so I'm guessing I might have a problem similar to David's. (Getting nsIJSON.decode problems in my log.)
Please fix/add to the 0.3 server setup page on the wiki instead of here: https://wiki.mozilla.org/Labs/Weave/0.3/Setup/Server
I believe all of the issues here have either been fixed, or are a result of misconfiguration. Please reopen if that is not the case.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
I was the original submitter, it seems like the comments has strayed far away from the original bug report. I am not using a local server, I am using weave central. The problems are still as described in the original report.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Oh. I was under the impression that we'd fixed the 502 problem. Toby, are you working on it still?
OS: Mac OS X → All
I to was using weave central. Deleting bookmarks, history, crypto and keys seems to have done the trick.
We fixed a 502 problem, but there are still enormous result sets coming back. Have one more thing to try. Ultimately, we may need to cap collection size.
same, with 200 2009-01-22 03:14:53 Service.Main DEBUG Event: weave:service:sync:start 2009-01-22 03:14:53 Service.Main DEBUG Refreshing client list 2009-01-22 03:14:53 Engine.Clients DEBUG Event: weave:clients:sync:start 2009-01-22 03:14:53 Engine.Clients DEBUG Ensuring server crypto records are there 2009-01-22 03:14:53 Engine.Clients INFO First sync, uploading all items 2009-01-22 03:14:53 Engine.Clients INFO 1 outgoing items pre-reconciliation 2009-01-22 03:14:53 Engine.Clients DEBUG Downloading & applying server changes 2009-01-22 03:14:53 Collection TRACE HTTP Header Content-type: text/plain 2009-01-22 03:14:53 Collection TRACE HTTP Header Authorization: ***** (suppressed) 2009-01-22 03:14:53 Collection DEBUG GET request for https://services.mozilla.com/0.3/user/bormotov/clients/?full=1&sort=depthindex 2009-01-22 03:14:53 Collection DEBUG GET request successful (200) 2009-01-22 03:14:53 Collection TRACE GET Body: [][] 2009-01-22 03:14:53 Engine.Clients WARN Sync failed 2009-01-22 03:14:53 Engine.Clients DEBUG Event: weave:clients:sync:error 2009-01-22 03:14:53 FaultTolerance DEBUG Original exception: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIJSON.decode] (JS frame :: file:///C:/Documents%20and%20Settings/bormotov/Application%20Data/Mozilla/Firefox/Profiles/7s8xifeu.default/extensions/%7B340c2bbc-ce74-4362-90b5-7c26312808ef%7D/modules/resource.js :: JsonFilter_afterGET :: line 348) Async stack trace: module:wrap.js:164 :: WeaveCatchAllWrapper module:wrap.js:94 :: WeaveNotifyWrapper module:service.js:603 :: WeaveSvc_sync chrome://weave/content/status.js:119 :: WeaveStatus_doSync chrome://weave/content/status.js:93 :: WeaveStatus_onLoad chrome://weave/content/status.xul:1 :: onload Last callback created at module:wrap.js:133 :: WeaveLocalLockWrapper 2009-01-22 03:14:53 Service.Main DEBUG Event: weave:service:sync:success
whoops. Needed to pull a little more code. Fixed. Also got rid of the rest of the 502s.
Status: REOPENED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
Component: Weave → General
Product: Mozilla Labs → Weave
QA Contact: weave → general
You need to log in before you can comment on or make changes to this bug.