To: Thunderbird Development & Support Team Subject: Gmail Account Wizard incorrectly configures SMTP, causing OAuth2 window completion failure
Dear Thunderbird Team,
… (ler mais)
To: Thunderbird Development & Support Team Subject: Gmail Account Wizard incorrectly configures SMTP, causing OAuth2 window completion failure
Dear Thunderbird Team,
I am writing to politely report a critical bug we recently identified during the automated account creation process for a Google Mail (Gmail) account. The bug prevents the Google OAuth2 authentication window from closing and ultimately halts the account setup process.
Environment Context
Account Type: IMAP/SMTP (Gmail)
Authentification: OAuth2
Description of the Issue
When using the Thunderbird Account Setup Wizard to connect a new @gmail.com email address, the wizard automatically pulls configuration data for Google services. However, the configuration pulled for the outgoing server (SMTP) is consistently corrupted.
Specifically, the following variables are written to the prefs.js file:
IMAP Configuration: Generates correctly as imap.gmail.com with authMethod: 10 (OAuth2).
SMTP Configuration: Incorrectly generates the hostname as literally ".gmail.com" (missing the "smtp" prefix) and assigns authMethod: 0 (None) instead of 10 (OAuth2). (e.g., user_pref("mail.smtpserver.smtpX.hostname", ".gmail.com");)
Symptoms and Behavior
OAuth2 Window Hang: Because the SMTP server address is malformed (.gmail.com) and cannot be resolved, when the user successfully authenticates in the Google OAuth2 pop-up and grants all permissions, Thunderbird attempts to finalize the setup against the non-existent SMTP gateway. This silent background failure results in the OAuth2 pop-up window spinning/hanging indefinitely with the message "Waiting for authorization". It never closes.
UI Blank Dropdown Bug: If the user forces the wizard closed and attempts to view the new IMAP profile in Account Settings -> Server Settings, the "Authentication Method" dropdown is entirely blank (no text, no selectable options). This occurs because the crashing wizard also fails to inject user_pref("mail.server.serverX.is_gmail", true); into prefs.js. Without the is_gmail flag, the legacy UI is unable to map the internal authMethod: 10 integer to the "OAuth2" string in the dropdown menu.
Working Solution / Workaround Used
The issue is definitively tied to the automated wizard's database fetch/parsing mechanism. We were able to completely bypass this bug by closing Thunderbird and manually injecting the pristine configuration directly into the core prefs.js file:
Fixing the SMTP hostname to smtp.gmail.com.
Setting mail.smtpserver.smtpX.authMethod to 10.
Supplying user_pref("mail.server.serverX.is_gmail", true); to fix the UI rendering.
Defining proper directory and directory-rel paths for the storeContractID.
Upon restarting Thunderbird with the manual internal configuration applied, the OAuth2 pop-up window appeared on the first sync, processed the Google token instantly, and closed successfully without any hangs.
Conclusion
Please investigate the ISP auto-configuration database logic that is currently generating .gmail.com as the SMTP hostname. This flaw breaks the entire OAuth2 token routing mechanism and creates a highly confusing infinite loop for everyday users trying to add their Google accounts.
Thank you for your hard work and for keeping Thunderbird an incredible email client!
Best regards.