nextcloud / nextcloud/mail

SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'in_reply_to' at row 1

Open
#6,618 7 comments 0 reactions 1 assignee View on GitHub

@ChristophWurst is already working on this.

Since Sep 19, 2024.

2. developing bug needs info
Dominant language
JavaScript
Stars
1k
Forks
348
Avg merge
12h 28m
Merged PRs (30d)
91

Description

Steps to reproduce

Try to sync a Gmail account using an app password and IMAP using

php -f occ mail:account:sync -f -vvv 1

Expected behavior

Mail syncs without error

Actual behavior

www-data@nextcloud:~/html$ php -f occ mail:account:sync -f -vvv 1
[debug] Skipping mailbox sync for 1
[debug] Skipping mailbox sync for 2
[debug] Skipping mailbox sync for 3
[debug] Syncing 4
[debug] Locking mailbox 4 for new messages sync
[debug] Locking mailbox 4 for changed messages sync
[debug] Locking mailbox 4 for vanished messages sync
[debug] Running initial sync for 4
[debug] Initial sync 1:INBOX - fetch all messages from IMAP took 6s
[debug] Unlocking mailbox 4 from vanished messages sync
[debug] Unlocking mailbox 4 from changed messages sync
[debug] Unlocking mailbox 4 from new messages sync

In ImapToDbSynchronizer.php line 249:

[OCA\Mail\Exception\ServiceException]
Sync failed for 1:INBOX: An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 14
06 Data too long for column 'in_reply_to' at row 1

Exception trace:
at /var/www/html/custom_apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php:249
OCA\Mail\Service\Sync\ImapToDbSynchronizer->sync() at /var/www/html/custom_apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php:135
OCA\Mail\Service\Sync\ImapToDbSynchronizer->syncAccount() at /var/www/html/custom_apps/mail/lib/Command/SyncAccount.php:110
OCA\Mail\Command\SyncAccount->sync() at /var/www/html/custom_apps/mail/lib/Command/SyncAccount.php:94
OCA\Mail\Command\SyncAccount->execute() at /var/www/html/3rdparty/symfony/console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at /var/www/html/3rdparty/symfony/console/Application.php:1009
Symfony\Component\Console\Application->doRunCommand() at /var/www/html/3rdparty/symfony/console/Application.php:273
Symfony\Component\Console\Application->doRun() at /var/www/html/3rdparty/symfony/console/Application.php:149
Symfony\Component\Console\Application->run() at /var/www/html/lib/private/Console/Application.php:211
OC\Console\Application->run() at /var/www/html/console.php:99
require_once() at /var/www/html/occ:11

In ExceptionConverter.php line 114:

[Doctrine\DBAL\Exception\DriverException (1406)]
An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for colu
mn 'in_reply_to' at row 1

Exception trace:
at /var/www/html/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:114
Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert() at /var/www/html/3rdparty/doctrine/dbal/src/Connection.php:1780
Doctrine\DBAL\Connection->handleDriverException() at /var/www/html/3rdparty/doctrine/dbal/src/Connection.php:1719
Doctrine\DBAL\Connection->convertExceptionDuringQuery() at /var/www/html/3rdparty/doctrine/dbal/src/Connection.php:1173
Doctrine\DBAL\Connection->executeStatement() at /var/www/html/lib/private/DB/Connection.php:294
OC\DB\Connection->executeStatement() at /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php:354
Doctrine\DBAL\Query\QueryBuilder->execute() at /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php:281
OC\DB\QueryBuilder\QueryBuilder->execute() at /var/www/html/custom_apps/mail/lib/Db/MessageMapper.php:315
OCA\Mail\Db\MessageMapper->insertBulk() at /var/www/html/custom_apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php:305
OCA\Mail\Service\Sync\ImapToDbSynchronizer->runInitialSync() at /var/www/html/custom_apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php:226
OCA\Mail\Service\Sync\ImapToDbSynchronizer->sync() at /var/www/html/custom_apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php:135
OCA\Mail\Service\Sync\ImapToDbSynchronizer->syncAccount() at /var/www/html/custom_apps/mail/lib/Command/SyncAccount.php:110
OCA\Mail\Command\SyncAccount->sync() at /var/www/html/custom_apps/mail/lib/Command/SyncAccount.php:94
OCA\Mail\Command\SyncAccount->execute() at /var/www/html/3rdparty/symfony/console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at /var/www/html/3rdparty/symfony/console/Application.php:1009
Symfony\Component\Console\Application->doRunCommand() at /var/www/html/3rdparty/symfony/console/Application.php:273
Symfony\Component\Console\Application->doRun() at /var/www/html/3rdparty/symfony/console/Application.php:149
Symfony\Component\Console\Application->run() at /var/www/html/lib/private/Console/Application.php:211
OC\Console\Application->run() at /var/www/html/console.php:99
require_once() at /var/www/html/occ:11

In Exception.php line 26:

[Doctrine\DBAL\Driver\PDO\Exception (1406)]
SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'in_reply_to' at row 1

Exception trace:
at /var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php:26
Doctrine\DBAL\Driver\PDO\Exception::new() at /var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php:94
Doctrine\DBAL\Driver\PDO\Statement->execute() at /var/www/html/3rdparty/doctrine/dbal/src/Connection.php:1163
Doctrine\DBAL\Connection->executeStatement() at /var/www/html/lib/private/DB/Connection.php:294
OC\DB\Connection->executeStatement() at /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php:354
Doctrine\DBAL\Query\QueryBuilder->execute() at /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php:281
OC\DB\QueryBuilder\QueryBuilder->execute() at /var/www/html/custom_apps/mail/lib/Db/MessageMapper.php:315
OCA\Mail\Db\MessageMapper->insertBulk() at /var/www/html/custom_apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php:305
OCA\Mail\Service\Sync\ImapToDbSynchronizer->runInitialSync() at /var/www/html/custom_apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php:226
OCA\Mail\Service\Sync\ImapToDbSynchronizer->sync() at /var/www/html/custom_apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php:135
OCA\Mail\Service\Sync\ImapToDbSynchronizer->syncAccount() at /var/www/html/custom_apps/mail/lib/Command/SyncAccount.php:110
OCA\Mail\Command\SyncAccount->sync() at /var/www/html/custom_apps/mail/lib/Command/SyncAccount.php:94
OCA\Mail\Command\SyncAccount->execute() at /var/www/html/3rdparty/symfony/console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at /var/www/html/3rdparty/symfony/console/Application.php:1009
Symfony\Component\Console\Application->doRunCommand() at /var/www/html/3rdparty/symfony/console/Application.php:273
Symfony\Component\Console\Application->doRun() at /var/www/html/3rdparty/symfony/console/Application.php:149
Symfony\Component\Console\Application->run() at /var/www/html/lib/private/Console/Application.php:211
OC\Console\Application->run() at /var/www/html/console.php:99
require_once() at /var/www/html/occ:11

In Statement.php line 92:

[PDOException (22001)]
SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'in_reply_to' at row 1

Exception trace:
at /var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php:92
PDOStatement->execute() at /var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php:92
Doctrine\DBAL\Driver\PDO\Statement->execute() at /var/www/html/3rdparty/doctrine/dbal/src/Connection.php:1163
Doctrine\DBAL\Connection->executeStatement() at /var/www/html/lib/private/DB/Connection.php:294
OC\DB\Connection->executeStatement() at /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php:354
Doctrine\DBAL\Query\QueryBuilder->execute() at /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php:281
OC\DB\QueryBuilder\QueryBuilder->execute() at /var/www/html/custom_apps/mail/lib/Db/MessageMapper.php:315
OCA\Mail\Db\MessageMapper->insertBulk() at /var/www/html/custom_apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php:305
OCA\Mail\Service\Sync\ImapToDbSynchronizer->runInitialSync() at /var/www/html/custom_apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php:226
OCA\Mail\Service\Sync\ImapToDbSynchronizer->sync() at /var/www/html/custom_apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php:135
OCA\Mail\Service\Sync\ImapToDbSynchronizer->syncAccount() at /var/www/html/custom_apps/mail/lib/Command/SyncAccount.php:110
OCA\Mail\Command\SyncAccount->sync() at /var/www/html/custom_apps/mail/lib/Command/SyncAccount.php:94
OCA\Mail\Command\SyncAccount->execute() at /var/www/html/3rdparty/symfony/console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at /var/www/html/3rdparty/symfony/console/Application.php:1009
Symfony\Component\Console\Application->doRunCommand() at /var/www/html/3rdparty/symfony/console/Application.php:273
Symfony\Component\Console\Application->doRun() at /var/www/html/3rdparty/symfony/console/Application.php:149
Symfony\Component\Console\Application->run() at /var/www/html/lib/private/Console/Application.php:211
OC\Console\Application->run() at /var/www/html/console.php:99
require_once() at /var/www/html/occ:11

mail:account:sync [-f|--force] [--]

Mail app version

1.12.1

Mailserver or service

Gmail

Operating system

Oracle Linux

PHP engine version

PHP 8.0

Web server

Apache (supported)

Database

MySQL

Additional info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.