搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

Gmail and oAuth2

  • 14 个回答
  • 1 人有此问题
  • 64 次查看
  • 最后回复者为 Toad-Hall

more options

I'm a long time user of Linux Mint. Now on 20.3 and Cinnamon desktop. Also a long time user of Thunderbird. Now in version 91.8.1 Always used the "allow insecure apps" in my gmail account settings and used normal password stored in Thunderbird. Google urges to change the authentication method to oAuth2. Tried everything to no avail. Always "authentication fails when connecting to imap.gmail.com" Cleared all cookies, allowed them, deleted all saved passwords, followed all published advise I could find, and nothing. Then I made a brand new profile pointing to an empty dir and entered my gmail address and checked everything. Same result. In despair I installed Evolution and all run fine at the first try. Should I really give up on Thunderbird? Thanks in advance for any help!

I'm a long time user of Linux Mint. Now on 20.3 and Cinnamon desktop. Also a long time user of Thunderbird. Now in version 91.8.1 Always used the "allow insecure apps" in my gmail account settings and used normal password stored in Thunderbird. Google urges to change the authentication method to oAuth2. Tried everything to no avail. Always "authentication fails when connecting to imap.gmail.com" Cleared all cookies, allowed them, deleted all saved passwords, followed all published advise I could find, and nothing. Then I made a brand new profile pointing to an empty dir and entered my gmail address and checked everything. Same result. In despair I installed Evolution and all run fine at the first try. Should I really give up on Thunderbird? Thanks in advance for any help!

被采纳的解决方案

Thank you so much!

sudo /opt/lampp/lampp stop Stopping XAMPP for Linux 8.0.12-0... XAMPP: Stopping Apache...ok. XAMPP: Stopping MySQL...ok. XAMPP: Stopping ProFTPD...ok.

This solved all problems! I can never thank you enough!

在上下文中阅读这个答案 👍 0

所有回复 (14)

more options
Always "authentication fails when connecting to imap.gmail.com"

Did you create an app password for Thunderbird? With OAuth2 authentication you'll have to use your main Google account account password.

Please post your Troubleshooting Information. At the top right of the Thunderbird window, click the menu button , then select Help > Troubleshooting Information. Press the "Copy text to clipboard button" and paste the information into your reply.

有帮助吗?

more options

This is what error console says during (failed) autehntication in Thunderbird. Don't have a clue of what all this means and don't know if it helps...

NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] OAuth2.jsm:171 onStateChange resource:///modules/OAuth2.jsm:171 NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] OAuth2.jsm:171 onStateChange resource:///modules/OAuth2.jsm:171 Empty string passed to getElementById(). browser-custom-element.js:391:22 TypeError: PopupNotifications is undefined LoginManagerPrompter.jsm:776:24 _showLoginCaptureDoorhanger resource://gre/modules/LoginManagerPrompter.jsm:776 promptToSavePassword resource://gre/modules/LoginManagerPrompter.jsm:141 onFormSubmit resource://gre/modules/LoginManagerParent.jsm:1018 AsyncFunctionNext self-hosted:692 NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] OAuth2.jsm:171 onStateChange resource:///modules/OAuth2.jsm:171 Empty string passed to getElementById(). browser-custom-element.js:391:22 NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "PopupNotifications is undefined" {file: "resource://gre/modules/LoginManagerPrompter.jsm" line: 776}]'[JavaScript Error: "PopupNotifications is undefined" {file: "resource://gre/modules/LoginManagerPrompter.jsm" line: 776}]' when calling method: [nsILoginManagerPrompter::promptToSavePassword] LoginManagerParent.jsm:1018 NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] OAuth2.jsm:171 onStateChange resource:///modules/OAuth2.jsm:171 Some cookies are misusing the recommended “SameSite“ attribute 14 Cookie “SIDCC” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/ ... e/SameSite approval Cookie “SIDCC” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/ ... e/SameSite approval Cookie “SIDCC” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/ ... e/SameSite 2 log NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] OAuth2.jsm:171 onStateChange resource:///modules/OAuth2.jsm:171 NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] 2 OAuth2.jsm:171 onStateChange resource:///modules/OAuth2.jsm:171 NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] OAuth2.jsm:171 onStateChange resource:///modules/OAuth2.jsm:171 NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] OAuth2.jsm:171 onStateChange resource:///modules/OAuth2.jsm:171 Content Security Policy: Ignoring “'unsafe-inline'” within script-src or style-src: nonce-source or hash-source specified 2 Content Security Policy: Ignoring “'unsafe-inline'” within script-src or style-src: nonce-source or hash-source specified Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content. dashboard Loading failed for the <script> with source “http://localhost/dashboard/javascripts/modernizr.js”. dashboard:19:1

有帮助吗?

more options

With this I get only an expty file with 0kb. Meanwhile in the linux console (while Thunderbird is running) I get:

paulo@Mint203:~$ set MOZ_LOG_MODULES=IMAP:5 paulo@Mint203:~$ export MOZ_LOG_MODULES=IMAP:5 paulo@Mint203:~$ export MOZ_LOG_FILE=~/tbird.log.txt paulo@Mint203:~$ thunderbird JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. console.warn: services.settings: Failed to load last_modified.json: TypeError: NetworkError when attempting to fetch resource. [calBackendLoader] Using Thunderbird's libical backend [LDAPModuleLoader] Using LDAPDirectory.jsm [MsgSendModuleLoader] Using MessageSend.jsm [SmtpModuleLoader] Using SmtpService.jsm console.debug: "Trying to load /usr/lib/thunderbird/libotr.so" console.debug: "Trying to load libotr.so from system's standard library locations" console.debug: "Trying to load libotr.so.5 from system's standard library locations" console.debug: "Trying to load libotr.so from system's standard library locations" console.log: (new Error("Cannot load required OTR library", "resource:///modules/OTRLib.jsm", 109)) console.debug: "Successfully loaded OpenPGP library librnp.so version 0.16+git20220124.f06439f7.MZLA from /usr/lib/thunderbird/librnp.so" console.debug: "Found 0 public keys and 0 secret keys (0 protected, 0 unprotected)" console.debug: "Successfully loaded optional OpenPGP library libgpgme.so.11 from system's standard library locations" console.debug: "gpgme version: 1.13.1-unknown" console.warn: services.settings: thunderbird/hijack-blocklists has signature disabled JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource://gre/modules/LoginManagerPrompter.jsm, line 776: TypeError: PopupNotifications is undefined JavaScript error: resource://gre/modules/LoginManagerParent.jsm, line 1018: NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "PopupNotifications is undefined" {file: "resource://gre/modules/LoginManagerPrompter.jsm" line: 776}]'[JavaScript Error: "PopupNotifications is undefined" {file: "resource://gre/modules/LoginManagerPrompter.jsm" line: 776}]' when calling method: [nsILoginManagerPrompter::promptToSavePassword] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name]

      1. !!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost

由pftavares于修改

有帮助吗?

more options

Meanwhile in the linux console (while Thunderbird is running) I get:

paulo@Mint203:~$ set MOZ_LOG=IMAP:5 paulo@Mint203:~$ export MOZ_LOG=IMAP:5,timestamp paulo@Mint203:~$ export MOZ_LOG_FILE=~/tbird.log.txt paulo@Mint203:~$ thunderbird JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. [calBackendLoader] Using Thunderbird's libical backend [LDAPModuleLoader] Using LDAPDirectory.jsm [MsgSendModuleLoader] Using MessageSend.jsm [SmtpModuleLoader] Using SmtpService.jsm console.debug: "Trying to load /usr/lib/thunderbird/libotr.so" console.debug: "Trying to load libotr.so from system's standard library locations" console.debug: "Trying to load libotr.so.5 from system's standard library locations" console.debug: "Trying to load libotr.so from system's standard library locations" console.log: (new Error("Cannot load required OTR library", "resource:///modules/OTRLib.jsm", 109)) console.debug: "Successfully loaded OpenPGP library librnp.so version 0.16+git20220124.f06439f7.MZLA from /usr/lib/thunderbird/librnp.so" console.debug: "Found 0 public keys and 0 secret keys (0 protected, 0 unprotected)" console.debug: "Successfully loaded optional OpenPGP library libgpgme.so.11 from system's standard library locations" console.debug: "gpgme version: 1.13.1-unknown" console.warn: services.settings: thunderbird/hijack-blocklists has signature disabled JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource://gre/modules/LoginManagerPrompter.jsm, line 776: TypeError: PopupNotifications is undefined JavaScript error: resource://gre/modules/LoginManagerParent.jsm, line 1018: NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "PopupNotifications is undefined" {file: "resource://gre/modules/LoginManagerPrompter.jsm" line: 776}]'[JavaScript Error: "PopupNotifications is undefined" {file: "resource://gre/modules/LoginManagerPrompter.jsm" line: 776}]' when calling method: [nsILoginManagerPrompter::promptToSavePassword] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name] JavaScript error: resource:///modules/OAuth2.jsm, line 171: NS_ERROR_NOT_IMPLEMENTED: Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIRequest.name]

      1. !!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost

paulo@Mint203:~$

有帮助吗?

more options

I'm presuming you are using Authentication Method: Oauth2

Run through the following:

  • Menu app icon > Preferences > Privacy & Security

Under 'Web Content'

  • Select 'Accept cookies from sites'
  • Click on 'Show cookies' button

Do you see any mention of google ? eg: consent.google.com , google.co.uk , google.com

If nothing - and you have cookies enabled then something is deleting your cookies For 'Web Content'


Then check the following:

  • Menu app icon > Help > More Troubleshooting Information
  • Under 'Application Basics' - Profile Folder - click on 'Open Directory'

This opens a new window showing the contents of your current in use profile name folder.

  • Exit Thunderbird now - this is important.

Look for the following files and delete them.

  • cert8.db - obselete file
  • key3.db - obselete file
  • pkcs11.txt
  • secmod.db - obselete file
  • session.json
  • xulstore.json

NOTE: Do NOT delete these on this occasion

  • key4.db
  • cert9.db
  • logins.json

Start Thunderbird

At prompt by Google enter email address and the normal password. It should create Oauth token. Please report on results.

有帮助吗?

more options

Thanks! Did all that. Didn't have the obsolete files and the rest I deleted. The problem remains equal...

有帮助吗?

more options

Please confirm:

  • you have now set up all the gmail accounts to use Authentication Method: OAuth2 for incoming and outgoing smtp
  • the google cookies are being saved.
  • you have not switched on 2 step verification

Are you running a VPN ? If yes, test - switch it off and then retry accessing gmail.

Are you running eg: Apache the localhost server or similar ? If yes, please switch it off and then retry accessing gmail.

Firewall - Thunderbird must be in the list as an allowed program. If not in list then add it. If already in list as allowed, see if Firewall is confused as it might think the updated Thunderbird is different from the allowed Thunderbird or maybe there is more than one - this may also cause issue.

Exit Thunderbird Access Firewall - block Thunderbird and ok it. If duplicates then remove duplicates.

Access Firewall set to allow and ok it. Start Thunderbird.

由Toad-Hall于修改

有帮助吗?

more options

Confirm all that! Meanwhile I installed a virtual machine with the same operating system and Thunderbird version and inside the virtual machine everything went well at first try. I copied the folder from the virtual machine to the main system. Now I have one profile folder in my main system that works. It didn't even asked for the password! Logged in immediately! But it hasn't my Filters... Probably deleted by accident an important file... Can you please tell me where are / should filters get stored? I have a copy of the old non-authenticating profile! Now I want to apply this same method to other profiles I have, but I'm still very ignorant.. What are the main file(s) to a successful login? Perhaps copying only those would have saved my Filters... Thanks!

有帮助吗?

more options

Your using Linux.... there is a love of installing web servers on Linux bu default. If you have any web server software running disable it. Most commonly it is Apache being reported. Any web server should cause issues as it consumes web content posted to localhost. So Authentication fails.

After you authenticate you can have a web server again if you really want one running

有帮助吗?

more options

If you created 'Message Filters' then these files exist within the mail account folders. The files are called 'msgFilterRules.dat'

~/.thunderbird/profile name/ImapMail/imap mail account/msgFilterRules.dat

This means you can copy the 'msgFilterRules.dat' from the copy of the old non-authenticating profile and paste the copied file into the imap mail account folder. Thunderbird must not be running whilst you do this.

由Toad-Hall于修改

有帮助吗?

more options

选择的解决方案

Thank you so much!

sudo /opt/lampp/lampp stop Stopping XAMPP for Linux 8.0.12-0... XAMPP: Stopping Apache...ok. XAMPP: Stopping MySQL...ok. XAMPP: Stopping ProFTPD...ok.

This solved all problems! I can never thank you enough!

有帮助吗?

more options

pftavares said

Thank you so much! sudo /opt/lampp/lampp stop Stopping XAMPP for Linux 8.0.12-0... XAMPP: Stopping Apache...ok. XAMPP: Stopping MySQL...ok. XAMPP: Stopping ProFTPD...ok. This solved all problems! I can never thank you enough!

Is that in response to me advising you on 24th May: Are you running eg: Apache the localhost server or similar ? If yes, please switch it off and then retry accessing gmail.

OR Matt further advising the same today: If you have any web server software running disable it. Most commonly it is Apache being reported.

Just wondering whether you switched off Apache etc several days ago and are only just posting the feedback because you said "Confirm all that!" as response to my comment.

由Toad-Hall于修改

有帮助吗?

more options

I tried service status for Apache and it said it didn't exist. sudo service apache2 status Unit apache2.service could not be found.

The same for httpd. sudo service httpd status Unit httpd.service could not be found.

I never installed Apache, but it seems that a Genealogy program installed some variation of it. Then after a new failed login it appeared in the little Google window where I was trying to authorize TB to access my account, the homepage of XAMPP (that I didn't even knew it existed) I googled and found the command to stop it. Entered it in the console without much faith. I was expecting it said service not existed. Then I got that surprising output of Apache(!) stopping. Remembering your advice to stop servers I tried again with Thunderbird and all went fine!

有帮助吗?

more options

Thanks for info - good feedback.

有帮助吗?

我要提问

你必须登录到你的账号才能回复。如果你还没账号,请提出一个新问题