Google Documents/Chrome Zotero Crash

edited October 16, 2023
I am working in a Google Document with Zotero, so far without problems. Suddenly when adding a citation or updating the bibliography, I get a simple update error (no reference to a specific item, just a link to trouble shooting). An {Updating} token remains. The next time I try it, I get a message that another user is accessing it. When I unblock it, Chrome can't sync the document for quite a while. After 10 minutes it works again, but then the errors persist.

The document is very important and sensitive, so don't want to share it here. I have split my long document in shorter fractions and then the processor succeeds but I have not been able to identify one or many faulty items/citations.


It's super time critical unfortunately, I would really appreciate help @dstillman @adamsmith @adomasven

This is my Debug ID: D966142259, including:

(3)(+0000001): GDocs: Updating doc. Batch 32, numItems: 95

(3)(+0000002): HTTP POST https://script.googleapis.com/v1/scripts/AKfycbzsRgL-HtcYSNr8gyl_ZqwspwtPa1-45mXXkWntWzTwJ14nxrtN0K1KmaTDzhzxpdsUKg:run

(3)(+0008730): Connector_Browser: onActivated for https://docs.google.com/document/d/[...]/edit

(3)(+0001175): Connector_Browser: onActivated for chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/preferences/preferences.html#advanced

(3)(+0000000): HTTP POST http://127.0.0.1:23119/connector/ping

(3)(+0000008): Connector: Method ping succeeded

(3)(+0036452): Exception in Document.setDocumentData

(1)(+0000001): {
"name": "Error"
}

and:

(3)(+0005045): Exception in Document.getDocumentData

(1)(+0000001): {
"name": "Error"
"type": "Google Docs ScriptError"
}




Z client err log shows (e.g.):
[JavaScript Warning: "unreachable code after return statement" {file: "resource://zotero/loader.jsm -> resource://zotero/bluebird/util.js" line: 205 column: 4 source: " eval(obj);
"}]
[JavaScript Error: "Style with ID http://www. already loaded from chicago-manual-of-style-16th-edition-note+year-punkt.csl" {file: "chrome://zotero/content/xpcom/style.js" line: 182}]
Zotero.Styles</_readStylesFromDirectory<@chrome://zotero/content/xpcom/style.js:182:15
tryCatcher@resource://zotero/loader.jsm -> resource://zotero/bluebird/util.js:16:16
module.exports/PromiseSpawn.prototype._promiseFulfilled@resource://zotero/loader.jsm -> resource://zotero/bluebird/generators.js:97:18
module.exports/Promise.prototype._settlePromise@resource://zotero/loader.jsm -> resource://zotero/bluebird/promise.js:609:17
module.exports/Promise.prototype._settlePromise0@resource://zotero/loader.jsm -> resource://zotero/bluebird/promise.js:649:5
module.exports/Promise.prototype._settlePromises@resource://zotero/loader.jsm -> resource://zotero/bluebird/promise.js:729:13
_drainQueueStep@resource://zotero/loader.jsm -> resource://zotero/bluebird/async.js:93:9
_drainQueue@resource://zotero/loader.jsm -> resource://zotero/bluebird/async.js:86:9
Async.prototype._drainQueues@resource://zotero/loader.jsm -> resource://zotero/bluebird/async.js:102:5
Async/this.drainQueues@resource://zotero/loader.jsm -> resource://zotero/bluebird/async.js:15:9

[JavaScript Error: "HTTP Integration Error" {file: "chrome://zotero/content/xpcom/connector/server_connectorIntegration.js" line: 67}]
  • Report ID: 1675583232
  • I have also restored older versions from within Google Docs -- no success, update error remains (which might point to a non-internal issue)
  • and, no one else is editing the document. The error(s) remain when the document is cloned (and hence as different permissions and another ID)
  • also, OS reboot did not do the trick
  • also, revoking access/edit permissions for Zotero in Google Account didn't helpt
  • Are you able to change the citation style in the document preferences? That looks like custom style, possible with a messed up ID
  • edited October 17, 2023
    @c-sander We've had a few reports of this over a short period of time, so I would not rule out an issue on Google's end at this point since we have not changed anything major in the Google Docs integration in quite a while. It's possible it will resolve itself, but we might be able to find the culprit debugging with other users too. Changing the style as adamsmith suggests above may help too.

    EDIT: I have checked our logs and indeed it seems like Google servers are experiencing an increased rate of what seems to be generic issues where their script runner (responsible for updating the docs for Zotero) is unable to access/load documents.
  • @adomasven : plausible! I mostly get sync errors from within Google Docs with the faulty document (and its clones) but not with other documents

    @adamsmith: changing style prompts the same "multiple users" warning and then fails again. Btw, I thought I was using the regular CMOS17 (author-date).

    If I copy and paste the document content to a new document (instead of cloning), I first run into a sync error Google-sided and then, after a while, refresh won't work as all citations are unlinked.
  • edited October 17, 2023
    My guess (but I'm not someone to tell) is that the Zotero Access token or uauth is not handled correctly from within GoogleDocs. GDoc thinks there is someone else doing work in the document, maybe the Z integration is seen as a user.

    Against this hypothesis is that revoking Zotero permissions on top Google level is not helping. Reinstalling the Chrome Z Connector did not help either
  • The "document locking" thing is not a Google Docs feature, but a Zotero one. At the start of a Zotero command we set a flag that the document is being worked on, and then unset after the command is finished. The idea is that if another user tries to modify the doc at the same time, they should not do it unless they are sure nobody else is actually working on the doc.

    Zotero calls the Google Docs script a few times for a single command and what seems to happen is that one of those fails randomly, making the document "locked", since the lock flag is never unset. I imagine Google routes those requests via different servers every time and some of them are having issues.
  • (In case there's not much you can do at this time, I will have to unlink all citations manually and restore and refine the bibliography from an older PDF export)...Is there a script to unlink if the built-in Zotero function isn't working neither. I can manually click and unlink, but this is burdensome.
  • "At the start of a Zotero command we set a flag that the document is being worked on, and then unset after the command is finished."

    Is there any manual way to tweak with this? In MS Word I know where these flags are nested but no clue for GDocs
  • (In case there's not much you can do at this time, I will have to unlink all citations manually and restore and refine the bibliography from an older PDF export)...Is there a script to unlink if the built-in Zotero function isn't working neither. I can manually click and unlink, but this is burdensome.
    You can copy download the document as-is and open it with Word or LibreOffice, which will make the citations automatically unlinked (although they will appear as text with a link to zotero.org, so you will have to remove those).
    Is there any manual way to tweak with this? In MS Word I know where these flags are nested but no clue for GDocs
    There isn't, but it wouldn't help you because this isn't what's causing the issue. The issue is that Zotero fails to update the document due to a Google Docs server error.

    Technically you could try switching to the Google Docs integration V2 in Zotero Connector -> Advanced -> Config Editor by enabling the integration.googleDocs.useGoogleDocsAPI flag, but it might not work either. We've developed this as a massive improvement to the Google Docs plugin performance nearly 2 years ago, but due to a bug that Google is refusing to address it doesn't work in many documents.
  • `useGoogleDocsAPI` flag is running in the same error (no unlock needed, however) but then miracolously resolves by generating the bibliography. I start wondering if the error message is just a timeout server issue and then the server continues to complete the task...

    It's a pity to so much rely on other products, but there's no way out.

    II will continue to deal with this later tonight. I will keep you posted about any breakthrough but will not log every step here to not waste (too much of) your time.
  • I start wondering if the error message is just a timeout server issue and then the server continues to complete the task...
    No, the error we are seeing in the Google's error reporting interface is related to the script runner being unable to load the document it needs to update, so it couldn't run in the background. The V2 integration version may have its own separate issues or bugs that we have not troubleshooted much since we were not able to push it out to our users.
  • I see!

    And, yes, V2, e.g., does not correctly adjust citation fields to the font style and size of the paragraph it is embedded in (though it seems to work fine in tables in this respect). This did not occur with V1.
  • Good news, it seems it's working again, regardless of useGoogleDocsAPI true or false!
    A Google problem after all! Thanks for the support!
Sign In or Register to comment.