Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error deleting messages from Gmail accounts #10279

Open
cwerstuik opened this issue Oct 21, 2024 · 0 comments
Open

Error deleting messages from Gmail accounts #10279

cwerstuik opened this issue Oct 21, 2024 · 0 comments

Comments

@cwerstuik
Copy link

Steps to reproduce

  1. Go to mail app
  2. Delete thread or message from a Gmail account

Expected behavior

When I delete an email from my Gmail Inbox, the message is moved to the Trash folder and disappears from Inbox

Actual behavior

Message disappears for a second, then reappears with the error, Could not delete message

Eventually the message does disappear forever, but the time varies (maybe based on whenever a background sync is done?)

The message does appear in the Trash folder even though the log warning says, Could not move message $73695 from INBOX to [Gmail]/Trash

This doesn't seem to happen with other email providers. I've tried with Yahoo and Zoho.

Mail app version

4.0.2

Mailserver or service

Gmail

Operating system

Linux

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database

MySQL

Additional info

Formated Log

[mail] Debug: deleting message
	DELETE /index.php/api/thread/469715
	from ** by ** at Oct 21, 2024, 9:56:48 AM
[mail] Debug: loading messages of mailbox <642>
	GET /index.php/api/messages?mailboxId=642&limit=1&cursor=1729384992
	from ** by ** at Oct 21, 2024, 9:56:48 AM
[mail] Debug: Mail server closed the connection unexpectedly.
	DELETE /index.php/api/thread/469715
	from ** by ** at Oct 21, 2024, 9:56:49 AM
[mail] Warning: Could not move message $73695 from INBOX to [Gmail]/Trash
	DELETE /index.php/api/thread/469715
	from ** by ** at Oct 21, 2024, 9:56:49 AM

The full log

{"reqId":"GcERXg1Wl9upNxonq1aU","level":0,"time":"2024-10-21T16:56:48+00:00","remoteAddr":"*****","user":"*****","app":"mail","method":"DELETE","url":"/index.php/api/thread/469715","message":"deleting message","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.0.14","data":{"app":"mail","messageId":"73695","mailboxId":"833"},"id":"671687d44ad9e"}
{"reqId":"vLSPWf3o3B7TEbIaL7Ob","level":0,"time":"2024-10-21T16:56:48+00:00","remoteAddr":"*****","user":"*****","app":"mail","method":"GET","url":"/index.php/api/messages?mailboxId=642&limit=1&cursor=1729384992","message":"loading messages of mailbox <642>","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.0.14","data":{"app":"mail"},"id":"671687d44ad9a"}
{"reqId":"GcERXg1Wl9upNxonq1aU","level":0,"time":"2024-10-21T16:56:49+00:00","remoteAddr":"*****","user":"*****","app":"mail","method":"DELETE","url":"/index.php/api/thread/469715","message":"Mail server closed the connection unexpectedly.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.0.14","exception":{"Exception":"Horde_Imap_Client_Exception","Message":"Mail server closed the connection unexpectedly.","Code":4,"Trace":[{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":4560,"function":"read","class":"Horde_Imap_Client_Socket_Connection_Socket","type":"->","args":[]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":4319,"function":"_getLine","class":"Horde_Imap_Client_Socket","type":"->","args":[["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Mailbox"]],["Horde_Imap_Client_Fetch_Results"]]]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":4243,"function":"_sendCmdChunk","class":"Horde_Imap_Client_Socket","type":"->","args":[["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Mailbox"]],["Horde_Imap_Client_Fetch_Results"]],[["Horde_Imap_Client_Interaction_Command",[],true,false,null,null,["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Mailbox"]],["Horde_Imap_Client_Fetch_Results"]],null,"7"]]]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":3691,"function":"_sendCmd","class":"Horde_Imap_Client_Socket","type":"->","args":[["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Mailbox"]],["Horde_Imap_Client_Fetch_Results"]]]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":2977,"function":"_copy","class":"Horde_Imap_Client_Socket","type":"->","args":[["Horde_Imap_Client_Mailbox"],[["Horde_Imap_Client_Ids",false],true,true]]},{"file":"/var/www/html/custom_apps/mail/lib/IMAP/MessageMapper.php","line":324,"function":"copy","class":"Horde_Imap_Client_Base","type":"->","args":["INBOX",["Horde_Imap_Client_Mailbox"],[["Horde_Imap_Client_Ids",false],true,true]]},{"file":"/var/www/html/custom_apps/mail/lib/Service/MailManager.php","line":368,"function":"move","class":"OCA\\Mail\\IMAP\\MessageMapper","type":"->","args":[["OCA\\Mail\\IMAP\\HordeImapClient",["HICenv","HICflags","HIChdrs","HICdate","HICsize","HICstruct"],true,true],"INBOX",73695,"[Gmail]/Trash"]},{"file":"/var/www/html/custom_apps/mail/lib/Service/MailManager.php","line":327,"function":"deleteMessageWithClient","class":"OCA\\Mail\\Service\\MailManager","type":"->","args":[["OCA\\Mail\\Account"],["OCA\\Mail\\Db\\Mailbox",833],73695,["OCA\\Mail\\IMAP\\HordeImapClient",["HICenv","HICflags","HIChdrs","HICdate","HICsize","HICstruct"],true,true]]},{"file":"/var/www/html/custom_apps/mail/lib/Service/MailManager.php","line":930,"function":"deleteMessage","class":"OCA\\Mail\\Service\\MailManager","type":"->","args":[["OCA\\Mail\\Account"],"INBOX",73695]},{"file":"/var/www/html/custom_apps/mail/lib/Controller/ThreadController.php","line":217,"function":"deleteThread","class":"OCA\\Mail\\Service\\MailManager","type":"->","args":[["OCA\\Mail\\Account"],["OCA\\Mail\\Db\\Mailbox",833],"<20241021165439.Horde.WgxKmfS58aAcJ-5C0WWAd6x@*****.com>"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"delete","class":"OCA\\Mail\\Controller\\ThreadController","type":"->","args":[469715]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Mail\\Controller\\ThreadController"],"delete"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Mail\\Controller\\ThreadController"],"delete"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Mail\\Controller\\ThreadController","delete",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["469715","mail.thread.delete"]]},{"file":"/var/www/html/lib/base.php","line":1001,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/mail/api/thread/469715"]},{"file":"/var/www/html/index.php","line":24,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket/Connection/Socket.php","Line":147,"message":"Mail server closed the connection unexpectedly.","exception":{"details":null,"logged":false,"raw_msg":"Mail server closed the connection unexpectedly."},"CustomMessage":"Mail server closed the connection unexpectedly."},"id":"671687d44ad96"}
{"reqId":"GcERXg1Wl9upNxonq1aU","level":2,"time":"2024-10-21T16:56:49+00:00","remoteAddr":"*****","user":"*****","app":"mail","method":"DELETE","url":"/index.php/api/thread/469715","message":"Could not move message $73695 from INBOX to [Gmail]/Trash","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0","version":"30.0.0.14","exception":{"Exception":"OCA\\Mail\\Exception\\ServiceException","Message":"Could not move message $73695 from INBOX to [Gmail]/Trash","Code":0,"Trace":[{"file":"/var/www/html/custom_apps/mail/lib/Service/MailManager.php","line":368,"function":"move","class":"OCA\\Mail\\IMAP\\MessageMapper","type":"->","args":[["OCA\\Mail\\IMAP\\HordeImapClient",["HICenv","HICflags","HIChdrs","HICdate","HICsize","HICstruct"],true,true],"INBOX",73695,"[Gmail]/Trash"]},{"file":"/var/www/html/custom_apps/mail/lib/Service/MailManager.php","line":327,"function":"deleteMessageWithClient","class":"OCA\\Mail\\Service\\MailManager","type":"->","args":[["OCA\\Mail\\Account"],["OCA\\Mail\\Db\\Mailbox",833],73695,["OCA\\Mail\\IMAP\\HordeImapClient",["HICenv","HICflags","HIChdrs","HICdate","HICsize","HICstruct"],true,true]]},{"file":"/var/www/html/custom_apps/mail/lib/Service/MailManager.php","line":930,"function":"deleteMessage","class":"OCA\\Mail\\Service\\MailManager","type":"->","args":[["OCA\\Mail\\Account"],"INBOX",73695]},{"file":"/var/www/html/custom_apps/mail/lib/Controller/ThreadController.php","line":217,"function":"deleteThread","class":"OCA\\Mail\\Service\\MailManager","type":"->","args":[["OCA\\Mail\\Account"],["OCA\\Mail\\Db\\Mailbox",833],"<20241021165439.Horde.WgxKmfS58aAcJ-5C0WWAd6x@******.com>"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"delete","class":"OCA\\Mail\\Controller\\ThreadController","type":"->","args":[469715]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Mail\\Controller\\ThreadController"],"delete"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Mail\\Controller\\ThreadController"],"delete"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Mail\\Controller\\ThreadController","delete",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["469715","mail.thread.delete"]]},{"file":"/var/www/html/lib/base.php","line":1001,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/mail/api/thread/469715"]},{"file":"/var/www/html/index.php","line":24,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/custom_apps/mail/lib/IMAP/MessageMapper.php","Line":339,"Previous":{"Exception":"Horde_Imap_Client_Exception","Message":"Mail server closed the connection unexpectedly.","Code":4,"Trace":[{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":4560,"function":"read","class":"Horde_Imap_Client_Socket_Connection_Socket","type":"->","args":[]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":4319,"function":"_getLine","class":"Horde_Imap_Client_Socket","type":"->","args":[["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Mailbox"]],["Horde_Imap_Client_Fetch_Results"]]]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":4243,"function":"_sendCmdChunk","class":"Horde_Imap_Client_Socket","type":"->","args":[["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Mailbox"]],["Horde_Imap_Client_Fetch_Results"]],[["Horde_Imap_Client_Interaction_Command",[],true,false,null,null,["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Mailbox"]],["Horde_Imap_Client_Fetch_Results"]],null,"7"]]]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":3691,"function":"_sendCmd","class":"Horde_Imap_Client_Socket","type":"->","args":[["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Mailbox"]],["Horde_Imap_Client_Fetch_Results"]]]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":2977,"function":"_copy","class":"Horde_Imap_Client_Socket","type":"->","args":[["Horde_Imap_Client_Mailbox"],[["Horde_Imap_Client_Ids",false],true,true]]},{"file":"/var/www/html/custom_apps/mail/lib/IMAP/MessageMapper.php","line":324,"function":"copy","class":"Horde_Imap_Client_Base","type":"->","args":["INBOX",["Horde_Imap_Client_Mailbox"],[["Horde_Imap_Client_Ids",false],true,true]]},{"file":"/var/www/html/custom_apps/mail/lib/Service/MailManager.php","line":368,"function":"move","class":"OCA\\Mail\\IMAP\\MessageMapper","type":"->","args":[["OCA\\Mail\\IMAP\\HordeImapClient",["HICenv","HICflags","HIChdrs","HICdate","HICsize","HICstruct"],true,true],"INBOX",73695,"[Gmail]/Trash"]},{"file":"/var/www/html/custom_apps/mail/lib/Service/MailManager.php","line":327,"function":"deleteMessageWithClient","class":"OCA\\Mail\\Service\\MailManager","type":"->","args":[["OCA\\Mail\\Account"],["OCA\\Mail\\Db\\Mailbox",833],73695,["OCA\\Mail\\IMAP\\HordeImapClient",["HICenv","HICflags","HIChdrs","HICdate","HICsize","HICstruct"],true,true]]},{"file":"/var/www/html/custom_apps/mail/lib/Service/MailManager.php","line":930,"function":"deleteMessage","class":"OCA\\Mail\\Service\\MailManager","type":"->","args":[["OCA\\Mail\\Account"],"INBOX",73695]},{"file":"/var/www/html/custom_apps/mail/lib/Controller/ThreadController.php","line":217,"function":"deleteThread","class":"OCA\\Mail\\Service\\MailManager","type":"->","args":[["OCA\\Mail\\Account"],["OCA\\Mail\\Db\\Mailbox",833],"<20241021165439.Horde.WgxKmfS58aAcJ-5C0WWAd6x@*****.com>"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"delete","class":"OCA\\Mail\\Controller\\ThreadController","type":"->","args":[469715]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Mail\\Controller\\ThreadController"],"delete"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Mail\\Controller\\ThreadController"],"delete"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Mail\\Controller\\ThreadController","delete",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["469715","mail.thread.delete"]]},{"file":"/var/www/html/lib/base.php","line":1001,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/mail/api/thread/469715"]},{"file":"/var/www/html/index.php","line":24,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket/Connection/Socket.php","Line":147},"message":"Could not move message $73695 from INBOX to [Gmail]/Trash","exception":[],"CustomMessage":"Could not move message $73695 from INBOX to [Gmail]/Trash"},"id":"671687d44ad18"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant