Nextcloud version (eg, 18.0.2): 20.0.4
Operating system and version (eg, Ubuntu 20.04): CentOS 8 w/ Kernel 4.18
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4
PHP version (eg, 7.1): 7.4.14
Mail app version: 1.7.2
The issue:
I added a Gmail account to Nextcloud using an app password, which I subsequently changed. Rather than asking me to enter my new password, Nextcloud simply stopped showing the Gmail account in the Mail app. Thus, I can’t delete the account or change the password using the browser interface. However, I continue to get “Authentication failed” errors for the account in my nextcloud.log. I can also see the account in my oc_mail_accounts table in my nextcloud database.
-
It seems like an issue that my email accounts disappear from the browser interface when nextcloud is unable to connect to the IMAP server due to an authentication error. This prevents me from deleting the account or changing the password.
-
Is there a way to change the stored password in the DB, or to delete the email account from the DB? I’m concerned that deleting the line from the oc_mail_accounts will break things, since I assume the account is referenced in contacts, calendar, and other tables.
This is the first time I’ve seen this error.
Steps to replicate:
- Add Gmail IMAP account to NC Mail app using a Gmail generated app password for verification
- Delete the app password from Gmail
- Gmail account disappears from NC Mail web interface, but remains in the databases. At this step, the user should be prompted to enter a new password
Relevant log entries from nextcloud.log:
{"reqId":"YAW0U5GtnvIcp1mSMjUI-QAAAEg","level":3,"time":"2021-01-18T16:16:20+00:00","remoteAddr":"10.10.10.10","user":"user","app":"mail","method":"GET","url":"/index.php/apps/mail/","message": {"Exception":"OCA\\Mail\\Exception\\ServiceException","Message":"IMAP error: Authentication failed.","Code":102,"Trace":[{"file":"/var/www/nextcloud/apps/mail/lib/Service/MailManager.php","line": 127,"function":"sync","class":"OCA\\Mail\\IMAP\\MailboxSync","type":"->"},{"file":"/var/www/nextcloud/apps/mail/lib/Controller/PageController.php","line":119,"function":"getMailboxes","class": "OCA\\Mail\\Service\\MailManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"index","class": "OCA\\Mail\\Controller\\PageController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class": "OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type": "->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":308,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1008, "function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/ mail/lib/IMAP/MailboxSync.php","Line":106,"Previous":{"Exception":"Horde_Imap_Client_Exception","Message":"Authentication failed.","Code":102,"Trace":[{"file":"/var/www/nextcloud/apps/mail/vendor/ pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket.php","line":4566,"function":"_responseCode","class":"Horde_Imap_Client_Socket","type":"->"},{"file":"/var/www/nextcloud/apps/mail/ vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket.php","line":4314,"function":"_getLine","class":"Horde_Imap_Client_Socket","type":"->"},{"file":"/var/www/nextcloud/apps/mail/ vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket.php","line":4242,"function":"_sendCmdChunk","class":"Horde_Imap_Client_Socket","type":"->"},{"file":"/var/www/nextcloud/apps/ mail/vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket.php","line":849,"function":"_sendCmd","class":"Horde_Imap_Client_Socket","type":"->"},{"file":"/var/www/nextcloud/apps/ mail/vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket.php","line":512,"function":"_tryLogin","class":"Horde_Imap_Client_Socket","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base.php","line":838,"function":"_login","class":"Horde_Imap_Client_Socket", "type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base.php","line":1389,"function": "login","class":"Horde_Imap_Client_Base","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/mail/lib/IMAP/FolderMapper.php","line":60,"function": "listMailboxes","class":"Horde_Imap_Client_Base","type":"->"},{"file":"/var/www/nextcloud/apps/mail/lib/IMAP/MailboxSync.php","line":103,"function":"getFolders","class": "OCA\\Mail\\IMAP\\FolderMapper","type":"->"},{"file":"/var/www/nextcloud/apps/mail/lib/Service/MailManager.php","line":127,"function":"sync","class":"OCA\\Mail\\IMAP\\MailboxSync","type":"->"}, {"file":"/var/www/nextcloud/apps/mail/lib/Controller/PageController.php","line":119,"function":"getMailboxes","class":"OCA\\Mail\\Service\\MailManager","type":"->"},{"file":"/var/www/nextcloud/lib/ private/AppFramework/Http/Dispatcher.php","line":169,"function":"index","class":"OCA\\Mail\\Controller\\PageController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/ Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":152, "function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":308,"function":"main","class": "OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line": 37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket.php","Line":5030}, "CustomMessage":"Could not load account mailboxes: IMAP error: Authentication failed."},"userAgent": redacted 0"}
Thanks,
Scott