JSON error when syncing

When i try to sync zotero, i get this error:

JSON Error: Syntax error, malformed JSON

error id: 1998691737

I didn't do anything special. It's the first time i have seen this error. What should i do?
  • If you can reproduce this, can you provide a Debug ID (different from a Report ID) for it?
  • Sure. The debug id is D679502008. Thanks.
  • This particular error shouldn't happen regardless, and we'll work on a fix, but did you by any chance drag images to any notes? It looks like it's trying to upload some large notes (but those might also be from, say, ZotFile ToC extraction).
  • No, i didn't.

    What should i do for now? Should i reinstall? Would that put the last added items at risk or something?

    Thanks for your work and quick reply.
  • Don't reinstall. (It doesn't affect your data, but it's almost never necessary, so it's generally not worth doing unless we recommend it here.)

    Could you go to Tools → Developer → Run JavaScript, paste in this code, press Run, and copy the output from the right-hand pane?

    var req = await Zotero.HTTP.request('GET', 'https://zotero-static.s3.amazonaws.com/wp.txt');var text = req.response;var r = (num, c=true) => { text = text.repeat(num);return Zotero.HTTP.request('POST', 'https://api.zotero.org/gztest', { body: text, compressBody: c }).then(req => req.response); };return Promise.all([r(1, false), r(1), r(2), r(3)]).then(responses => responses.join('\n'));
  • The output was this:
    "Error: HTTP POST https://api.zotero.org/gztest failed with status code undefined"
  • Does it work if you try again a few times?

    If not, can you provide a Debug ID for running that?

    Is this a work network? Are you connecting via a proxy server?
  • If you can't get it to go through, how about this one?

    var req = await Zotero.HTTP.request('GET', 'https://zotero-static.s3.amazonaws.com/wp.txt');var text = req.response;var r = (num, c=true) => { text = text.repeat(num);try { return Zotero.HTTP.request('POST', 'https://api.zotero.org/gztest', { body: text, compressBody: c }).then(req => req.response); } catch (e) { return "Fail " + num; } };return Promise.all([r(1, false), r(1), r(2), r(3)]).then(responses => responses.join('\n'));
  • As for the first javascript code, the corresponding debug code is: D602071520.

    The second javascript code produces this message: Error: HTTP POST https://api.zotero.org/gztest failed with status code undefined; and this debug code: D1666065682.

    I'm not behind a proxy, and i have disabled the firewall.
  • How about this?

    var req = await Zotero.HTTP.request('GET', 'https://zotero-static.s3.amazonaws.com/wp.txt');var text = req.response;var r = (n, c=true) => { let body = text.substr(0, n); try { return Zotero.HTTP.request('POST', 'https://api.zotero.org/gztest', { body, compressBody: c, logBodyLength: 50 }).then(req => req.response); } catch (e) { return "Fail " + num; } };let responses = []; for (let p of [[50000, false], [50000], [100000], [300000], [500000], [1000000], [2000000]]) { responses.push(await r.apply({}, p)); } return responses.join('\n');
  • It returns this message: Error: HTTP POST https://api.zotero.org/gztest failed with status code undefined; and this debug code: D1314719005
  • Sorry, another:

    var req = await Zotero.HTTP.request('GET', 'https://zotero-static.s3.amazonaws.com/wp.txt');var text = req.response;var r = async function (n, c=true) { let body = text.substr(0, n); try { return await Zotero.HTTP.request('POST', 'https://api.zotero.org/gztest', { body, compressBody: c, logBodyLength: 50 }).then(req => req.response); } catch (e) { return "Fail " + num; } };let responses = []; for (let p of [[50000, false], [50000], [100000], [300000], [500000], [1000000], [2000000]]) { responses.push(await r.apply({}, p)); } return responses.join('\n');

    No Debug ID needed for this one.

    Is this a very slow/unreliable internet connection, at least in terms of upload bandwidth? Your original report was for a fairly large upload, but from the above, a small 50 KB upload is taking 100 seconds before failing.

    Have you successfully synced before from this network? Is this a laptop? If so, have you tried from another network?
  • Thanks for your help. Something was odd with the upload speed, so i used another network. Then a message saying something like "a note is too large" appeared, and confirmed the problem was the gigantic table of content generated about a very big encyclopedia. After erasing that TOC, i could sync as usual.

    Thanks again for all your work and impressive quickness. Best regards.
Sign In or Register to comment.