[Juris-M] "error updating your document. cannot generate JSON"

Upon upgrading to Juris-M from MLZ, this is the error that I ran into in Word. (Plugin 3.1.20)

"Zotero experienced an error updating your document. Cannot generate JSON from changed item."

What gives?
  • From the underlying code, this looks likely to be transient. The error may clear after restarting Firefox.

    To pin down the underlying error, I've put up a beta version here:

    https://github.com/Juris-M/zotero/releases/tag/v4.0.27.1m33beta

    The beta should include a note of the changed-fields records in the error message, which will help to pin down the source of the bug.
  • It says: {"len"{},"primaryData":false,"itemData":{"1261":true,"22":true},"itemDataAlt":false,"creators":false,"altCreators":false,"deleted":false,"note":false,"source":false,"attachmentData":false}


    Does this make sense?
  • edited July 7, 2015
    That's the Jurisdiction field, and the Extra field. That does suggest a possible cause. Do you have items with the hack-syntax form "{:jurisdiction: us}" (say) in the Extra field?

    What are the conditions under which the error is triggered:

    * Does it trigger on any document?
    * If on a specific document, does it trigger on refresh, or when inserting a reference?
  • No, I don't see any hack-syntax items.

    It appears that it triggers on this specific manuscript that I'm working on. I haven't tried other documents, but a brand-new document doesn't trigger the error.

    On this specific document, it triggers both on refresh and when inserting a reference.
  • I've found one clear bug in the MLZ integration code. I'll fix that and put up a fresh beta, and we'll see how far that brings us. More very soon.
  • The "beta3" XPI here clears the bug that I identified.

    https://github.com/Juris-M/zotero/releases/tag/v4.0.27.1m33beta

    I don't think this will clear the failure that you are seeing, but give it a try. If your error triggers again, beta3 will include the key of the item. If you pop the key string into the search box, it should open the item that caused the failure, so we can get a handle on the cause.
  • Yes, beta3 still triggers the error, now with the key as you said.

    What do I do with the key? I put the key in the search box in Juris-M, but nothing comes up. (The key is TZ23K3TC.)

    BTW, I already know which item that caused failure, because the error triggers when I try to insert a new reference, if that's what you're looking for.
  • In faculty meeting now. Should have time to look further this evening (in 4-5 hours' time).
  • I've reproduced the error.

    It is triggered when records with MLZ-encoded data are synced down to an official Zotero client, and then added to a document (using official Zotero for Firefox or Standalone). When the document is later opened with MLZ (or Juris-M), the client attempts to decode the record contained in the document, and it throws this error.

    I'll need to investigate a little further. I have a late-night online meeting coming up in the next few minutes, but I'll try to get this sorted out in the next few hours.
  • Try with beta4:

    https://github.com/Juris-M/zotero/releases/tag/v4.0.27.1m33beta

    If this fixes the error you have been getting, I'll make it a final release.

    Thanks for your patience over this.
  • Yes, it worked! Thanks!!
  • I am running into the same (or a similar) error.

    Just tried to work on a document I hadn't worked on for some months. When I try to update the document, Juris-M only shows

    "Cannot generate JSON from changed item: {"key":"TEWH5N2Q","changed":{},"primaryData":false,"itemData":false,"itemDataAlt":false,"creators":false,"altCreators":{"0":{"en":true}},"deleted":false,"note":false,"source":false,"attachmentData":false}".

    Updating the same document in Zotero Standalone works fine. I am using Juris-M 4.0.27.5m33 in Firefox.
  • @bluunksaesn: Try reinstalling the Firefox plugin from https://juris-m.github.io (optionally also installing the "Juris-M Client" for the standalone version).

    (The Juris-M plugins are not updating automatically at the moment, hence the need to update manually. Auto updates will return soon I hope, when I find time to work on it.)
  • I just updated it to the newest version, didn't know that automatic updates had stopped working. I also installed the Linux version of the Juris-M standalone.
    I still get the same error message, both with the plugin and the standalone.
  • That's not good. I'll take a look soon and see if I can reproduce the error.
  • I've been having that same error, using Juris-M (4.0.28.7m46) plugin in Firefox (43.0.4; overrode the signing issue because I was having trouble with the Chrome extension) and Microsoft Word for Mac (15.17.1). It seemed to start when I started using track changes, as I was required to do so to show revisions to a professor, but has continued even after I turned off track changes. Restarting Word does fix it, but as noted above, that's not a great solution.

    However, what I wanted to post was that, for both inserting and editing citations, just trying multiple times works! The error pops up on the first one or two tries, and then it doesn't and the citation has been fixed - or occasionally, the error will pop up but the citation will be fixed anyway. Very mysterious, and I know, it seems absurd that any computer problem could be solved by just trying multiple times, but it's working for me. Also inconvenient, but at least workable for now as a quick fix.
  • edited January 29, 2016
    @fbennett
    I just tried again to add a cititation, it still throws the same error message (now with a different key, I assume the last time I tried to cite a different argument). Following amlai's advice, I tried several times, the fifth time it finally worked. However, I had the same problem again when I tried to insert the next citation, so that's not really an option.
    After the error message, Libreoffice always jumped back to a particular paragraph in the document, which contains several long citations (for multiple sources).

    Before trying, I had manually installed the newest Juris-M version.

    Would it help if I delete this paragraph and cite all sources again? Would only try if this has at least a chance of success :)

    The error message:

    Cannot generate JSON from changed item: {"key":"RZFQ43C9","changed":{},"primaryData":false,"itemData":false,"itemDataAlt":false,"creators":false,"altCreators":{"0":{"en":true},"1":{"en":true},"2":{"en":true}},"deleted":false,"note":false,"source":false,"attachmentData":false

    I feel that I am always only coming back to the Forum when something does not work. So on a more positive note, thank you for all the work you've put into Juris-M so far, it is very useful to me!
  • It's sticking on a creator variant (all of the fields in the JSON key should be empty). I'll try to reproduce the fault this weekend. If I don't have any luck, I may come back with a fresh version that produces a little more debugging information.
  • @bluunksaesn: I haven't reproduced the failure, but I did find a couple of bugs in the code for creators that may have triggered the error you are seeing. It would affect embedded items with creator variants, where the item is deleted from the database, and the citation is rendered using data extracted from the document.

    I only tested with a single creator, but your error relates to an item with three creators, and (although I didn't test for it) that may be relevant in this case.

    I've made up a release (v4.0.28.7m52) and had it signed. Give it a try - if the error persists, we can dig a bit deeper.
  • I tried it with the new version, but the same error is still triggered.
    Also, and I forgot to mention that before, before the error message I get the dialog that one of my references has been changed manually, asking if I want to keep the changes. Not sure if the two are related, but as I cannot successfully refresh the document I can not get rid of the first one either.
  • Still working on it. I'll be tied down with administrative work today, but a quick question: if you pop the key reported in the error (RZFQ43C9) into the Juris-M search field, does it show an item? If so, it may help if you can export that item as CSL JSON, paste it to https://gist.github.com, save it there, and post the URL back here.

    Also, if you copy-paste the bad paragraph into a fresh document, does it still throw the error there?
  • edited February 1, 2016
    Also, which selection do you make when the changed-item dialog pops up?

    (For the moment, though, I think we can assume that the changed-item dialog and the refresh error are unrelated. I have another idea to try out for reproducing the problem here. To test, I'll need to sync my account, and it's currently occupied with a large library download. Committee meetings coming up, more news in a few hours.)
  • edited June 23, 2016
    [update] seems to be functional now that I've changed to a new Word doc.


    I am also getting that error every time I make a citation in Word. The second try it works, however. I am wondering about the Word plugin. Does it need to be cleared somehow or is it working from as soon as Juris-M is installed in FF over Zotero?

    Zotero experienced an error updating your document.

    Cannot generate JSON from changed item: {"key":"P8BXWQ4J","changed":{},"primaryData":false,"itemData":{"1261":true},"itemDataAlt":false,"creators":false,"altCreators":false,"deleted":false,"note":false,"source":false,"attachmentData":false}
  • Initial things to check:

    * Be sure you have the latest version of Juris-M installed, from https://juris-m.github.io (JM Standalone or Juris-M for Firefox).

    * If you are running JM Standalone alongside Firefox, be sure that (a) any official Zotero is disabled in Firefox, and (b) any Z/JM Word Integration plugin in Firefox is disabled.

    Information on the item:

    In Juris-M, set the quick search box (in the toolbar) to "All Fields & Tags," and paste the key ("P8BXWQ4J") into the box. That should pull up the item that is causing the error.

    (1) If you can tell me what the item type of the item is, that will be helpful.

    (2) If you can take a screenshot of the item data, post it to an image service like https://imgur.com, and post the URL back to this thread, that will be even more helpful.

    (If you save aside a copy of the bad document, it will be useful as a worked example of the error.)
  • Thank you for your very prompt reply.

    I have found that it is functional now that I am on a different Word doc. If the error returns I will post.
Sign In or Register to comment.