From 76c0c9d0ce1ec2348b4b6bbebbe094b6f973fc20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Tue, 5 Aug 2025 09:55:09 +0300 Subject: [PATCH] Fix Google Docs integration breaking when cancelling edit bibliograpy I've run into this randomly. It only occurs if the first operation on a Google Doc since Zotero restart is the edit bibliography dialog which you cancel. Due to how the HTTP integration client is implemented, the missing await causes it to try to send another response to the Connector (which is no longer waiting on the /response endpoint), failing and causing a forever pending promise, which makes subsequent attempts to interact with the Google Docs plugin no-op. We get occassional reports from users about Google Docs getting stuck that is fixed by Zotero restart, so hopefully this will reduce those. --- chrome/content/zotero/xpcom/integration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index 4e6930883a..763f19f6a7 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -304,7 +304,7 @@ Zotero.Integration = new function() { await document.setDocumentData(session.data.serialize()); // And any citations marked for processing (like retraction warning ignore flag changes) if (Object.keys(session.processIndices).length) { - session.updateDocument(FORCE_CITATIONS_FALSE, false, false); + await session.updateDocument(FORCE_CITATIONS_FALSE, false, false); } // Since user cancelled we can ignore if processor fails here. } catch(e) {}