Mail: Error loading inbox on initial sync

Created on 24 May 2020  路  8Comments  路  Source: nextcloud/mail

Expected behavior

Load messages on initial sync and show inbox.

Actual behavior

Infinite loading spinner on inbox.
Other folders like "Sent" work fine.

The log files show following errors:

OCA\Mail\Exception\MailboxLockedException: 63 is already being synced

and

OCA\Mail\Exception\ServiceException: Sync failed for 4:INBOX: An exception occurred while executing 'INSERT INTO `oc_mail_messages` (`uid`, `message_id`, `mailbox_id`, `subject`, `sent_at`, `flag_answered`, `flag_deleted`, `flag_draft`, `flag_flagged`, `flag_seen`, `flag_forwarded`, `flag_junk`, `flag_notjunk`) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [5441,"<!&!LgAAAAAAAADABPoxPNmDSrmP+DVVYHi1AQDDto4Q93URzrTNAKoAu7bmAAAAAAAOAABGAAAAAAAAAMAE+jE82YNKuY\/4NVVgeLUHAMO2jhD3dRHOtM0AqgC7tuYAAAAAAA4AAIKOmpursH1LuOJnIn9TbkMAAAAAJmAAAAAAAAAQAAAAk7BnEzGJYEaaPX3gW5O+xRoAAABCaXR0ZSB1bSBIaWxmZSBpbSBPdXRsb29rAA==@*********.com>", 63, "R\u00fcckruf: Bitte um Hilfe im Outlook", 1464728935, false, false, false, false, true, false, false, false]: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'message_id' at row 1

Full log (of these two errors): nextcloud_mail.log

Mail app

Mail app version: 1.3.5

Mailserver or service: GMX

Server configuration

Operating system: Ubuntu 19.10

Web server: Apache

Database: MariaDB

PHP version: 7.3.11

Nextcloud Version: 18.0.4

Client configuration

Browser: Firefox 76.0.1

Operating system: Windows 10

2. developing bug

Most helpful comment

but I am a total noob when it comes to programming and so on. I am sure servers will explode and cities will burn when I start coding in PHP

I laughed. You just earned a free bug fix.

All 8 comments

***.com>

Huh. I guess that is a valid message ID, but we only allow 255 chars https://github.com/nextcloud/mail/blob/d672ec4f4b8c08c711a0930579c9a6bc8343f768/lib/Migration/Version1020Date20191002091035.php#L43-L46.

We have to migrate to a widen column. https://stackoverflow.com/a/34811337/2239067 has some ideas about the max width to expect.

Was the limit introduced in the near past?
Because I have used this mail account on my nextcloud mail before and it was working.

The mail is from 2016 so it may also very well be that the former nextcloud mail version did not load that far into the past.

Nevertheless I guess that the error could be resolved by just deleting the specific mail but I wanted to mention it if anyone stumbles across that type of error.
I won't delete it for now to later test a new version (if this gets fixed/changed).

It's caused by the message cache feature in v1.3+

Nevertheless I guess that the error could be resolved by just deleting the specific mail but I wanted to mention it if anyone stumbles across that type of error.
I won't delete it for now to later test a new version (if this gets fixed/changed).

No, we should fix this :)

Is there a workaround?

The workaround is

1) Add a migration that widens the column to the discussed width
2) Sumit a PR
3) Profit from open source collaboration

:v:

The workaround is

  1. Add a migration that widens the column to the discussed width
  2. Sumit a PR
  3. Profit from open source collaboration

鉁岋笍

Thank you very much, but I am just an IT engineer. I am able to install servers, configure network equipment and do magic with policies and so on... but I am a total noob when it comes to programming and so on. I am sure servers will explode and cities will burn when I start coding in PHP. I do understand some basic batch scripting and a little bash shell scripting... But that's it. Sorry...

...although I am happy to try but I don't know where to start. I did already edit the PHP file and changed the value 255 to 510, but it doesn't seem to work that way. Is there another file I need to edit?

Any help to point me in the right direction is appreciated. Thanks.

but I am a total noob when it comes to programming and so on. I am sure servers will explode and cities will burn when I start coding in PHP

I laughed. You just earned a free bug fix.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cheesewizz picture cheesewizz  路  5Comments

ChristophWurst picture ChristophWurst  路  3Comments

sscherfke picture sscherfke  路  5Comments

HLFH picture HLFH  路  3Comments

g6094199 picture g6094199  路  3Comments