nextcloud / mail

💌 Mail app for Nextcloud
https://apps.nextcloud.com/apps/mail
GNU Affero General Public License v3.0
819 stars 255 forks source link

All mail disappeared from Mail app 3.2.0 "The object could not be deleted because it does not exist." #8537

Open vasyugan opened 1 year ago

vasyugan commented 1 year ago

Steps to reproduce

  1. Set up an imap account in Mail v 3.1.1
  2. Upgrade to Mail 3.2.0
  3. run occ mail:account:sync [ID]

Expected behavior

should sync mail

Actual behavior

Mail app is completely empty.

grafik

occ mail:account:sync -f 63

In MailboxSync.php line 120:

IMAP error synchronizing account 63: The object could not be deleted because it does not exist.

In Socket.php line 5130:

The object could not be deleted because it does not exist.

Mail app version

3.2.0

Mailserver or service

dovecot

Operating system

Ubuntu 22.04

PHP engine version

PHP 8.1

Web server

Nginx

Database

MySQL

Additional info

Downgrading to v 3.1.1 fixes it.

a similar report is here

Here is the full error message from the log:

[mail] Fehler: OCA\Mail\Exception\ServiceException: IMAP error synchronizing account 63: The object could not be deleted because it does not exist. at <>

  1. /var/www/**/htdocs/cloud.**/apps/mail/lib/BackgroundJob/SyncJob.php line 109 OCA\Mail\IMAP\MailboxSync->sync(" sensitive parameters replaced ")
  2. /var/www/**/htdocs/cloud.**/lib/public/BackgroundJob/Job.php line 78 OCA\Mail\BackgroundJob\SyncJob->run()
  3. /var/www/**/htdocs/cloud.**/lib/public/BackgroundJob/TimedJob.php line 103 OCP\BackgroundJob\Job->start()
  4. /var/www/**/htdocs/cloud.**/lib/public/BackgroundJob/TimedJob.php line 93 OCP\BackgroundJob\TimedJob->start()
  5. /var/www/**/htdocs/cloud.**/cron.php line 152 OCP\BackgroundJob\TimedJob->execute()

Caused by:

Horde_Imap_Client_Exception_ServerResponse: The object could not be deleted because it does not exist. at <>

  1. /var/www/**/htdocs/cloud.**/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php line 4566 Horde_Imap_Client_Socket->_responseCode()
  2. /var/www/**/htdocs/cloud.**/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php line 4314 Horde_Imap_Client_Socket->_getLine()
  3. /var/www/**/htdocs/cloud.**/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php line 4242 Horde_Imap_Client_Socket->_sendCmdChunk()
  4. /var/www/**/htdocs/cloud.**/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php line 3904 Horde_Imap_Client_Socket->_sendCmd()
  5. /var/www/**/htdocs/cloud.**/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php line 3330 Horde_Imap_Client_Socket->_getMyACLRights()
  6. /var/www/**/htdocs/cloud.**/apps/mail/lib/IMAP/FolderMapper.php line 122 Horde_Imap_Client_Base->getMyACLRights()
  7. /var/www/**/htdocs/cloud.**/apps/mail/lib/IMAP/MailboxSync.php line 118 OCA\Mail\IMAP\FolderMapper->fetchFolderAcls()
  8. /var/www/**/htdocs/cloud.**/apps/mail/lib/BackgroundJob/SyncJob.php line 109 OCA\Mail\IMAP\MailboxSync->sync(" sensitive parameters replaced ")
  9. /var/www/**/htdocs/cloud.**/lib/public/BackgroundJob/Job.php line 78 OCA\Mail\BackgroundJob\SyncJob->run()
  10. /var/www/**/htdocs/cloud.**/lib/public/BackgroundJob/TimedJob.php line 103 OCP\BackgroundJob\Job->start()
    1. /var/www/**/htdocs/cloud.**/lib/public/BackgroundJob/TimedJob.php line 93 OCP\BackgroundJob\TimedJob->start()
    2. /var/www/**/htdocs/cloud.**/cron.php line 152 OCP\BackgroundJob\TimedJob->execute()

at 2023-06-11T09:53:49+00:00

ChristophWurst commented 1 year ago

The object could not be deleted because it does not exist

could you post the raw json entry from nextcloud.log please?

vasyugan commented 1 year ago

The object could not be deleted because it does not exist

could you post the raw json entry from nextcloud.log please?

Here you go:

{"reqId":"NDwEJzXNFYI3AHgMYoz4","level":3,"time":"2023-06-10T22:13:45+00:00","remoteAddr":"","user":"--","app":"mail","method":"","url":"--","message":"Cron mail sync failed for account 58","userAgent":"--","version":"26.0.2.1","exception":{"Exception":"OCA\\Mail\\Exception\\ServiceException","Message":"IMAP error synchronizing account 58: The object could not be deleted because it does not exist.","Code":23,"Trace":[{"file":"/var/www/xxxxx/htdocs/cloud.xxxxxx/apps/mail/lib/BackgroundJob/SyncJob.php","line":109,"function":"sync","class":"OCA\\Mail\\IMAP\\MailboxSync","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/xxxxx/htdocs/cloud.xxxxxx/lib/public/BackgroundJob/Job.php","line":78,"function":"run","class":"OCA\\Mail\\BackgroundJob\\SyncJob","type":"->"},{"file":"/var/www/xxxxx/htdocs/cloud.xxxxxx/lib/public/BackgroundJob/TimedJob.php","line":103,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/xxxxx/htdocs/cloud.xxxxxx/lib/public/BackgroundJob/TimedJob.php","line":93,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/xxxxx/htdocs/cloud.xxxxxx/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/xxxxx/htdocs/cloud.xxxxxx/apps/mail/lib/IMAP/MailboxSync.php","Line":120,"Previous":{"Exception":"Horde_Imap_Client_Exception_ServerResponse","Message":"The object could not be deleted because it does not exist.","Code":23,"Trace":[{"file":"/var/www/xxxxx/htdocs/cloud.xxxxxx/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":4566,"function":"_responseCode","class":"Horde_Imap_Client_Socket","type":"->"},{"file":"/var/www/xxxxx/htdocs/cloud.xxxxxx/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":4314,"function":"_getLine","class":"Horde_Imap_Client_Socket","type":"->"},{"file":"/var/www/xxxxx/htdocs/cloud.xxxxxx/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":4242,"function":"_sendCmdChunk","class":"Horde_Imap_Client_Socket","type":"->"},{"file":"/var/www/xxxxx/htdocs/cloud.xxxxxx/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":3904,"function":"_sendCmd","class":"Horde_Imap_Client_Socket","type":"->"},{"file":"/var/www/xxxxx/htdocs/cloud.xxxxxx/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":3330,"function":"_getMyACLRights","class":"Horde_Imap_Client_Socket","type":"->"},{"file":"/var/www/xxxxx/htdocs/cloud.xxxxxx/apps/mail/lib/IMAP/FolderMapper.php","line":122,"function":"getMyACLRights","class":"Horde_Imap_Client_Base","type":"->"},{"file":"/var/www/xxxxx/htdocs/cloud.xxxxxx/apps/mail/lib/IMAP/MailboxSync.php","line":118,"function":"fetchFolderAcls","class":"OCA\\Mail\\IMAP\\FolderMapper","type":"->"},{"file":"/var/www/xxxxx/htdocs/cloud.xxxxxx/apps/mail/lib/BackgroundJob/SyncJob.php","line":109,"function":"sync","class":"OCA\\Mail\\IMAP\\MailboxSync","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/xxxxx/htdocs/cloud.xxxxxx/lib/public/BackgroundJob/Job.php","line":78,"function":"run","class":"OCA\\Mail\\BackgroundJob\\SyncJob","type":"->"},{"file":"/var/www/xxxxx/htdocs/cloud.xxxxxx/lib/public/BackgroundJob/TimedJob.php","line":103,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/xxxxx/htdocs/cloud.xxxxxx/lib/public/BackgroundJob/TimedJob.php","line":93,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/xxxxx/htdocs/cloud.xxxxxx/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/xxxxx/htdocs/cloud.xxxxxx/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","Line":5130},"message":"Cron mail sync failed for account {accountId}","exception":{},"CustomMessage":"Cron mail sync failed for account 58"}}

vasyugan commented 1 year ago

Version 3.2.1 fixes it for me.

vasyugan commented 1 year ago

Actually I have to correct myself: Upgrading to Nextcloud 27 fixed it. The bug is still present in Mail 3.2.1 on Nextcloud 26.x

tobox commented 1 year ago

For me, the problem also persists with Nextcloud 27 and Mail 3.2.1. {"reqId":"Ct6Gfz3FJBJbvMCYXZHW","level":3,"time":"2023-06-19T09:40:13+00:00","remoteAddr":"10.10.62.12","user":"therrmann","app":"mail","method":"GET","url":"/index.php/apps/mail/box/priority","message":"Could not load account mailboxes: IMAP error synchronizing account 24: The object could not be deleted because it does not exist.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0","version":"27.0.0.8","exception":{"Exception":"OCA\\Mail\\Exception\\ServiceException","Message":"IMAP error synchronizing account 24: The object could not be deleted because it does not exist.","Code":23,"Trace":[{"file":"/var/www/nextcloud/apps/mail/lib/Service/MailManager.php","line":142,"function":"sync","class":"OCA\\Mail\\IMAP\\MailboxSync","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/mail/lib/Controller/PageController.php","line":141,"function":"getMailboxes","class":"OCA\\Mail\\Service\\MailManager","type":"->"},{"file":"/var/www/nextcloud/apps/mail/lib/Controller/PageController.php","line":281,"function":"index","class":"OCA\\Mail\\Controller\\PageController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"mailbox","class":"OCA\\Mail\\Controller\\PageController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1064,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/mail/lib/IMAP/MailboxSync.php","Line":120,"Previous":{"Exception":"Horde_Imap_Client_Exception_ServerResponse","Message":"The object could not be deleted because it does not exist.","Code":23,"Trace":[{"file":"/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":4566,"function":"_responseCode","class":"Horde_Imap_Client_Socket","type":"->"},{"file":"/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":4314,"function":"_getLine","class":"Horde_Imap_Client_Socket","type":"->"},{"file":"/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":4242,"function":"_sendCmdChunk","class":"Horde_Imap_Client_Socket","type":"->"},{"file":"/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":3902,"function":"_sendCmd","class":"Horde_Imap_Client_Socket","type":"->"},{"file":"/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":3330,"function":"_getMyACLRights","class":"Horde_Imap_Client_Socket","type":"->"},{"file":"/var/www/nextcloud/apps/mail/lib/IMAP/FolderMapper.php","line":122,"function":"getMyACLRights","class":"Horde_Imap_Client_Base","type":"->"},{"file":"/var/www/nextcloud/apps/mail/lib/IMAP/MailboxSync.php","line":118,"function":"fetchFolderAcls","class":"OCA\\Mail\\IMAP\\FolderMapper","type":"->"},{"file":"/var/www/nextcloud/apps/mail/lib/Service/MailManager.php","line":142,"function":"sync","class":"OCA\\Mail\\IMAP\\MailboxSync","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/mail/lib/Controller/PageController.php","line":141,"function":"getMailboxes","class":"OCA\\Mail\\Service\\MailManager","type":"->"},{"file":"/var/www/nextcloud/apps/mail/lib/Controller/PageController.php","line":281,"function":"index","class":"OCA\\Mail\\Controller\\PageController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"mailbox","class":"OCA\\Mail\\Controller\\PageController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1064,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","Line":5130},"message":"Could not load account mailboxes: IMAP error synchronizing account 24: The object could not be deleted because it does not exist.","exception":{},"CustomMessage":"Could not load account mailboxes: IMAP error synchronizing account 24: The object could not be deleted because it does not exist."}}

Stimpy68 commented 1 year ago

@tobox Same here.

vasyugan commented 1 year ago

For me, the problem also persists with Nextcloud 27 and Mail 3.2.1.

Yeah, actually I checked again, and the bug is still there. I don't know if I confused nextcloud instances or if it somehow went away magically and came back. In any case, the issue persists in Mail 3.2.2