Open sergiupapuc opened 1 year ago
Related to https://github.com/nextcloud/mail/pull/8839#pullrequestreview-1615662456. I assume this happens when horde can't map the moved messages.
...the message is not moved, but also not accesible in old folder...apears but not accesible
Full stack here.
{
"reqId": "HZlY023CZnI0J1QHOjfj",
"level": 3,
"time": "2023-11-02T09:57:48+01:00",
"remoteAddr": "85.112.211.113",
"user": "steph@ec.fr",
"app": "mail",
"method": "GET",
"url": "/apps/mail/api/messages/10522/body",
"message": "Could not load message",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0",
"version": "27.1.3.2",
"exception": {
"Exception": "OCA\\Mail\\Exception\\ServiceException",
"Message": "Could not load message",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/apps/mail/lib/Controller/MessagesController.php",
"line": 220,
"function": "getImapMessage",
"class": "OCA\\Mail\\Service\\MailManager",
"type": "->",
"args": [
[
"OCA\\Mail\\IMAP\\ImapClientRateLimitingDecorator",
[
"HICenv",
"HICflags",
"HIChdrs",
"HICdate",
"HICsize",
"And 1 more entries, set log level to debug to see all entries"
],
true,
true
],
[
"OCA\\Mail\\Account"
],
[
"OCA\\Mail\\Db\\Mailbox",
153
],
106318,
true
]
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 230,
"function": "getBody",
"class": "OCA\\Mail\\Controller\\MessagesController",
"type": "->",
"args": [
10522
]
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 137,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [
[
"OCA\\Mail\\Controller\\MessagesController"
],
"getBody"
]
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
"line": 183,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [
[
"OCA\\Mail\\Controller\\MessagesController"
],
"getBody"
]
},
{
"file": "/var/www/nextcloud/lib/private/Route/Router.php",
"line": 315,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::",
"args": [
"OCA\\Mail\\Controller\\MessagesController",
"getBody",
[
"OC\\AppFramework\\DependencyInjection\\DIContainer"
],
[
"10522",
"mail.messages.getBody"
]
]
},
{
"file": "/var/www/nextcloud/lib/base.php",
"line": 1068,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->",
"args": [
"/apps/mail/api/messages/10522/body"
]
},
{
"file": "/var/www/nextcloud/index.php",
"line": 36,
"function": "handleRequest",
"class": "OC",
"type": "::",
"args": []
}
],
"File": "/var/www/nextcloud/apps/mail/lib/Service/MailManager.php",
"Line": 200,
"Previous": {
"Exception": "OCP\\AppFramework\\Db\\DoesNotExistException",
"Message": "Message does not exist",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/apps/mail/lib/Service/MailManager.php",
"line": 192,
"function": "find",
"class": "OCA\\Mail\\IMAP\\MessageMapper",
"type": "->",
"args": [
[
"OCA\\Mail\\IMAP\\ImapClientRateLimitingDecorator",
[
"HICenv",
"HICflags",
"HIChdrs",
"HICdate",
"HICsize",
"And 1 more entries, set log level to debug to see all entries"
],
true,
true
],
"INBOX",
106318,
"steph@ec.fr",
true
]
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Controller/MessagesController.php",
"line": 220,
"function": "getImapMessage",
"class": "OCA\\Mail\\Service\\MailManager",
"type": "->",
"args": [
[
"OCA\\Mail\\IMAP\\ImapClientRateLimitingDecorator",
[
"HICenv",
"HICflags",
"HIChdrs",
"HICdate",
"HICsize",
"And 1 more entries, set log level to debug to see all entries"
],
true,
true
],
[
"OCA\\Mail\\Account"
],
[
"OCA\\Mail\\Db\\Mailbox",
153
],
106318,
true
]
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 230,
"function": "getBody",
"class": "OCA\\Mail\\Controller\\MessagesController",
"type": "->",
"args": [
10522
]
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 137,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [
[
"OCA\\Mail\\Controller\\MessagesController"
],
"getBody"
]
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
"line": 183,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [
[
"OCA\\Mail\\Controller\\MessagesController"
],
"getBody"
]
},
{
"file": "/var/www/nextcloud/lib/private/Route/Router.php",
"line": 315,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::",
"args": [
"OCA\\Mail\\Controller\\MessagesController",
"getBody",
[
"OC\\AppFramework\\DependencyInjection\\DIContainer"
],
[
"10522",
"mail.messages.getBody"
]
]
},
{
"file": "/var/www/nextcloud/lib/base.php",
"line": 1068,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->",
"args": [
"/apps/mail/api/messages/10522/body"
]
},
{
"file": "/var/www/nextcloud/index.php",
"line": 36,
"function": "handleRequest",
"class": "OC",
"type": "::",
"args": []
}
],
"File": "/var/www/nextcloud/apps/mail/lib/IMAP/MessageMapper.php",
"Line": 90
},
"message": "Could not load message",
"exception": [],
"CustomMessage": "Could not load message"
},
"id": "6544a8d771406"
}
{
"reqId": "bKwMHUz5f0wDWIhsKFSu",
"level": 3,
"time": "2023-11-02T09:57:51+01:00",
"remoteAddr": "85.112.211.113",
"user": "steph@ecoutin.fr",
"app": "PHP",
"method": "DELETE",
"url": "/apps/mail/api/thread/10481",
"message": "Undefined array key 106266 at /var/www/nextcloud/apps/mail/lib/IMAP/MessageMapper.php#334",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0",
"version": "27.1.3.2",
"data": {
"app": "PHP"
},
"id": "6544a8d7712b8"
}
{
"reqId": "bKwMHUz5f0wDWIhsKFSu",
"level": 3,
"time": "2023-11-02T09:57:51+01:00",
"remoteAddr": "85.112.211.113",
"user": "steph@ec.fr",
"app": "mail",
"method": "DELETE",
"url": "/apps/mail/api/thread/10481",
"message": "OCA\\Mail\\IMAP\\MessageMapper::move(): Return value must be of type int, null returned in file '/var/www/nextcloud/apps/mail/lib/IMAP/MessageMapper.php' line 334",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0",
"version": "27.1.3.2",
"exception": {
"Exception": "Exception",
"Message": "OCA\\Mail\\IMAP\\MessageMapper::move(): Return value must be of type int, null returned in file '/var/www/nextcloud/apps/mail/lib/IMAP/MessageMapper.php' line 334",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
"line": 183,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [
[
"OCA\\Mail\\Controller\\ThreadController"
],
"delete"
]
},
{
"file": "/var/www/nextcloud/lib/private/Route/Router.php",
"line": 315,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::",
"args": [
"OCA\\Mail\\Controller\\ThreadController",
"delete",
[
"OC\\AppFramework\\DependencyInjection\\DIContainer"
],
[
"10481",
"mail.thread.delete"
]
]
},
{
"file": "/var/www/nextcloud/lib/base.php",
"line": 1068,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->",
"args": [
"/apps/mail/api/thread/10481"
]
},
{
"file": "/var/www/nextcloud/index.php",
"line": 36,
"function": "handleRequest",
"class": "OC",
"type": "::",
"args": []
}
],
"File": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"Line": 169,
"Previous": {
"Exception": "TypeError",
"Message": "OCA\\Mail\\IMAP\\MessageMapper::move(): Return value must be of type int, null returned",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/apps/mail/lib/Service/MailManager.php",
"line": 375,
"function": "move",
"class": "OCA\\Mail\\IMAP\\MessageMapper",
"type": "->",
"args": [
[
"OCA\\Mail\\IMAP\\ImapClientRateLimitingDecorator",
[
"HICenv",
"HICflags",
"HIChdrs",
"HICdate",
"HICsize",
"And 1 more entries, set log level to debug to see all entries"
],
true,
true
],
"INBOX",
106266,
"Trash"
]
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Service/MailManager.php",
"line": 334,
"function": "deleteMessageWithClient",
"class": "OCA\\Mail\\Service\\MailManager",
"type": "->",
"args": [
[
"OCA\\Mail\\Account"
],
[
"OCA\\Mail\\Db\\Mailbox",
153
],
106266,
[
"OCA\\Mail\\IMAP\\ImapClientRateLimitingDecorator",
[
"HICenv",
"HICflags",
"HIChdrs",
"HICdate",
"HICsize",
"And 1 more entries, set log level to debug to see all entries"
],
true,
true
]
]
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Service/MailManager.php",
"line": 871,
"function": "deleteMessage",
"class": "OCA\\Mail\\Service\\MailManager",
"type": "->",
"args": [
[
"OCA\\Mail\\Account"
],
"INBOX",
106266
]
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Controller/ThreadController.php",
"line": 186,
"function": "deleteThread",
"class": "OCA\\Mail\\Service\\MailManager",
"type": "->",
"args": [
[
"OCA\\Mail\\Account"
],
[
"OCA\\Mail\\Db\\Mailbox",
153
],
"<1070782459.332265841698773176299.JavaMail.app@bg61-ca-ec1.prod.awspr>"
]
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 230,
"function": "delete",
"class": "OCA\\Mail\\Controller\\ThreadController",
"type": "->",
"args": [
10481
]
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 137,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [
[
"OCA\\Mail\\Controller\\ThreadController"
],
"delete"
]
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
"line": 183,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [
[
"OCA\\Mail\\Controller\\ThreadController"
],
"delete"
]
},
{
"file": "/var/www/nextcloud/lib/private/Route/Router.php",
"line": 315,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::",
"args": [
"OCA\\Mail\\Controller\\ThreadController",
"delete",
[
"OC\\AppFramework\\DependencyInjection\\DIContainer"
],
[
"10481",
"mail.thread.delete"
]
]
},
{
"file": "/var/www/nextcloud/lib/base.php",
"line": 1068,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->",
"args": [
"/apps/mail/api/thread/10481"
]
},
{
"file": "/var/www/nextcloud/index.php",
"line": 36,
"function": "handleRequest",
"class": "OC",
"type": "::",
"args": []
}
],
"File": "/var/www/nextcloud/apps/mail/lib/IMAP/MessageMapper.php",
"Line": 334
},
"message": "OCA\\Mail\\IMAP\\MessageMapper::move(): Return value must be of type int, null returned in file '/var/www/nextcloud/apps/mail/lib/IMAP/MessageMapper.php' line 334",
"exception": [],
"CustomMessage": "OCA\\Mail\\IMAP\\MessageMapper::move(): Return value must be of type int, null returned in file '/var/www/nextcloud/apps/mail/lib/IMAP/MessageMapper.php' line 334"
},
"id": "6544a8d7712ae"
}
If you've previously moved the message on a different email client, you could be experiencing #9168
Steps to reproduce
1.open mail app 2.try to move message 3.open log
Expected behavior
Message move
Actual behavior
Exception: OCA\Mail\IMAP\MessageMapper::move(): Return value must be of type int, null returned in file '/var/www/nextcloud/apps/mail/lib/IMAP/MessageMapper.php' line 334
Undefined array key 13 at /var/www/nextcloud/apps/mail/lib/IMAP/MessageMapper.php#334
Mail app version
3.4.0
Mailserver or service
Imap
Operating system
Ubuntu 22.04
PHP engine version
PHP 8.1
Web server
Apache (supported)
Database
MySQL
Additional info
No response