[Bug Report] Handle HTTP reponse code 429 (Google Docs & Zotero)
Tested on Gentoo Linux, Zotero version 6 and 7 beta, with both stable and beta version of Zotero connector for Firefox
Debug ID: D624117995
In large documents, Zotero easily riches the Google Docs quota limitation. This is correctly reported from the Google side by http response code 429. And Google suggests how to handle this error here:
https://developers.google.com/drive/api/guides/handle-errors
https://developers.google.com/drive/api/guides/limits#exponential
Searching the forum, I see this as quite common error affecting a lot of users, but with easy fix. Zotero should simply retry the POST request to Google Docs after 1,2,3... + random milliseconds. Is there a chance to fix this upstream? I am willing to test it.
Debug ID: D624117995
In large documents, Zotero easily riches the Google Docs quota limitation. This is correctly reported from the Google side by http response code 429. And Google suggests how to handle this error here:
https://developers.google.com/drive/api/guides/handle-errors
https://developers.google.com/drive/api/guides/limits#exponential
Searching the forum, I see this as quite common error affecting a lot of users, but with easy fix. Zotero should simply retry the POST request to Google Docs after 1,2,3... + random milliseconds. Is there a chance to fix this upstream? I am willing to test it.
PS. I still get some errors, but at least it is working for the most parts:
(5)(+0000018): "{\"error\":\"Google Docs ScriptError\",\"message\":\"Exceeded maximum execution time\",\"stack\":\"Zotero.Messaging</this.init/Zotero[ns][meth]</</<@moz-extension://3cce25bb-c58d-44aa-9760-de2a8ee9a1db/messaging_inject.js:79:17\\n\"}"
(3)(+0000032): Error: HTTP Integration Error init@chrome://zotero/content/xpcom/connector/server_connectorIntegration.js:67:19 Zotero.Server.DataListener.prototype._processEndpoint<@chrome://zotero/content/xpcom/server.js:548:16 tryCatcher@resource://zotero/bluebird/util.js:16:23 module.exports/PromiseSpawn.prototype._promiseFulfilled@resource://zotero/bluebird/generators.js:97:49 module.exports/Promise.coroutine/<@resource://zotero/bluebird/generators.js:201:15 Zotero.Server.DataListener.prototype._bodyData@chrome://zotero/content/xpcom/server.js:338:10 Zotero.Server.DataListener.prototype._headerFinished@chrome://zotero/content/xpcom/server.js:313:10 Zotero.Server.DataListener.prototype.onDataAvailable@chrome://zotero/content/xpcom/server.js:207:12 From previous event: captureStackTrace@resource://zotero/bluebird/debuggability.js:915:23 CapturedTrace@resource://zotero/bluebird/debuggability.js:807:22 longStackTracesCaptureStackTrace@resource://zotero/bluebird/debuggability.js:482:19 module.exports/Promise.prototype._then@resource://zotero/bluebird/promise.js:261:17 module.exports/Promise.prototype.then@resource://zotero/bluebird/promise.js:154:17 sendCommand@chrome://zotero/content/xpcom/connector/httpIntegrationClient.js:48:55 Zotero.HTTPIntegrationClient.Document.prototype[method]@chrome://zotero/content/xpcom/connector/httpIntegrationClient.js:91:41 Zotero.Integration</this.execCommand@chrome://zotero/content/xpcom/integration.js:289:22
As for logging, if you go into Zotero Connector preferences -> Advanced and tick Enable Logging, the 429 responses will be logged. You should not keep that checkbox ticked for long though as it may cause instability in the extension and browser.
Thanks for the hint on debugging.
We've built a much faster version of Google Docs integration that might handle very large documents better, but we haven't been able to release it for a couple years due to a bug in Google Docs that Google hasn't fixed.
And thank you both for the help with Zotero, I managed to fix the document for now and the next time we should definitely split it by chapters.