From 2c7475a5e65a467243bb6ee3be8e629eb187368a 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 1c65b00b57..dc77214422 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -298,7 +298,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) {}