From c19177a469e6ff59c415d5e91641cecc88834b45 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 29 Aug 2026 12:09:15 -0400 Subject: [PATCH] Reset the account pane if the login session can't be stored MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If storing the API key failed, the pane kept showing the spinner and "Waiting for login…" until the user clicked Cancel, even though the login attempt was already over. https://forums.zotero.org/discussion/133418/ --- .../content/zotero/preferences/preferences_account.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/preferences/preferences_account.jsx b/chrome/content/zotero/preferences/preferences_account.jsx index a8fc92c768..f945c4121b 100644 --- a/chrome/content/zotero/preferences/preferences_account.jsx +++ b/chrome/content/zotero/preferences/preferences_account.jsx @@ -233,7 +233,14 @@ Zotero_Preferences.Sync = { } // Validate and store the API key - await Zotero.Sync.Runner.checkLoginSession(sessionToken, result); + try { + await Zotero.Sync.Runner.checkLoginSession(sessionToken, result); + } + catch (e) { + this._pendingSessionToken = null; + this._showLoginDefault(); + throw e; + } // Handle secmod.db issue when storing the API key // This can happen when people have a very old profile directory (e.g., from 2013)