Data too long for column 'inbound_user'
Open
Nobody has claimed this yet.
1. to develop
bug
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 348
- Avg merge
- 12h 28m
- Merged PRs (30d)
- 91
Description
Steps to reproduce
1./settings/admin/groupware
2.make settings for mail settings
3.Provision all accounts
Expected behavior
not error...Provision all accounts
Actual behavior
Error
{
"reqId": "pc4ivehLDm3ekB9nadz8",
"level": 3,
"time": "2024-08-09T09:03:25+00:00",
"remoteAddr": "192.168.64.22",
"user": "015D1767-5A9A-415C-ABA1-E4A3CD2183D7",
"app": "index",
"method": "PUT",
"url": "/index.php/apps/mail/api/settings/provisioning/all",
"message": "An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'inbound_user' at row 1",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36 Edg/127.0.0.0",
"version": "29.0.4.1",
"exception": {
"Exception": "OC\\DB\\Exceptions\\DbalException",
"Message": "An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'inbound_user' at row 1",
"Code": 1406,
"Trace": [
{
"file": "/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 328,
"function": "wrap",
"class": "OC\\DB\\Exceptions\\DbalException",
"type": "::"
},
{
"file": "/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php",
"line": 137,
"function": "executeStatement",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Service/Provisioning/Manager.php",
"line": 220,
"function": "insert",
"class": "OCP\\AppFramework\\Db\\QBMapper",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Service/Provisioning/Manager.php",
"line": 120,
"function": "provisionSingleUser",
"class": "OCA\\Mail\\Service\\Provisioning\\Manager",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/User/Manager.php",
"line": 561,
"function": "OCA\\Mail\\Service\\Provisioning\\{closure}",
"class": "OCA\\Mail\\Service\\Provisioning\\Manager",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Service/Provisioning/Manager.php",
"line": 123,
"function": "callForAllUsers",
"class": "OC\\User\\Manager",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Controller/SettingsController.php",
"line": 70,
"function": "provision",
"class": "OCA\\Mail\\Service\\Provisioning\\Manager",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 232,
"function": "provision",
"class": "OCA\\Mail\\Controller\\SettingsController",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 138,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
"line": 184,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Route/Router.php",
"line": 338,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/var/www/nextcloud/lib/base.php",
"line": 1050,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/var/www/nextcloud/index.php",
"line": 49,
"function": "handleRequest",
"class": "OC",
"type": "::"
}
],
"File": "/var/www/nextcloud/lib/private/DB/Exceptions/DbalException.php",
"Line": 71,
"Previous": {
"Exception": "Doctrine\\DBAL\\Exception\\DriverException",
"Message": "An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'inbound_user' at row 1",
"Code": 1406,
"Trace": [
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1943,
"function": "convert",
"class": "Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1885,
"function": "handleDriverException",
"class": "Doctrine\\DBAL\\Connection",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1213,
"function": "convertExceptionDuringQuery",
"class": "Doctrine\\DBAL\\Connection",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php",
"line": 292,
"function": "executeStatement",
"class": "Doctrine\\DBAL\\Connection",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/DB/Connection.php",
"line": 373,
"function": "executeStatement",
"class": "Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
"line": 393,
"function": "executeStatement",
"class": "OC\\DB\\Connection",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 280,
"function": "execute",
"class": "Doctrine\\DBAL\\Query\\QueryBuilder",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 326,
"function": "execute",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php",
"line": 137,
"function": "executeStatement",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Service/Provisioning/Manager.php",
"line": 220,
"function": "insert",
"class": "OCP\\AppFramework\\Db\\QBMapper",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Service/Provisioning/Manager.php",
"line": 120,
"function": "provisionSingleUser",
"class": "OCA\\Mail\\Service\\Provisioning\\Manager",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/User/Manager.php",
"line": 561,
"function": "OCA\\Mail\\Service\\Provisioning\\{closure}",
"class": "OCA\\Mail\\Service\\Provisioning\\Manager",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Service/Provisioning/Manager.php",
"line": 123,
"function": "callForAllUsers",
"class": "OC\\User\\Manager",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Controller/SettingsController.php",
"line": 70,
"function": "provision",
"class": "OCA\\Mail\\Service\\Provisioning\\Manager",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 232,
"function": "provision",
"class": "OCA\\Mail\\Controller\\SettingsController",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 138,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
"line": 184,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Route/Router.php",
"line": 338,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/var/www/nextcloud/lib/base.php",
"line": 1050,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/var/www/nextcloud/index.php",
"line": 49,
"function": "handleRequest",
"class": "OC",
"type": "::"
}
],
"File": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php",
"Line": 117,
"Previous": {
"Exception": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
"Message": "SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'inbound_user' at row 1",
"Code": 1406,
"Trace": [
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
"line": 132,
"function": "new",
"class": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
"type": "::"
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1207,
"function": "execute",
"class": "Doctrine\\DBAL\\Driver\\PDO\\Statement",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php",
"line": 292,
"function": "executeStatement",
"class": "Doctrine\\DBAL\\Connection",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/DB/Connection.php",
"line": 373,
"function": "executeStatement",
"class": "Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
"line": 393,
"function": "executeStatement",
"class": "OC\\DB\\Connection",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 280,
"function": "execute",
"class": "Doctrine\\DBAL\\Query\\QueryBuilder",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 326,
"function": "execute",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php",
"line": 137,
"function": "executeStatement",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Service/Provisioning/Manager.php",
"line": 220,
"function": "insert",
"class": "OCP\\AppFramework\\Db\\QBMapper",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Service/Provisioning/Manager.php",
"line": 120,
"function": "provisionSingleUser",
"class": "OCA\\Mail\\Service\\Provisioning\\Manager",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/User/Manager.php",
"line": 561,
"function": "OCA\\Mail\\Service\\Provisioning\\{closure}",
"class": "OCA\\Mail\\Service\\Provisioning\\Manager",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Service/Provisioning/Manager.php",
"line": 123,
"function": "callForAllUsers",
"class": "OC\\User\\Manager",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Controller/SettingsController.php",
"line": 70,
"function": "provision",
"class": "OCA\\Mail\\Service\\Provisioning\\Manager",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 232,
"function": "provision",
"class": "OCA\\Mail\\Controller\\SettingsController",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 138,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
"line": 184,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Route/Router.php",
"line": 338,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/var/www/nextcloud/lib/base.php",
"line": 1050,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/var/www/nextcloud/index.php",
"line": 49,
"function": "handleRequest",
"class": "OC",
"type": "::"
}
],
"File": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php",
"Line": 28,
"Previous": {
"Exception": "PDOException",
"Message": "SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'inbound_user' at row 1",
"Code": "22001",
"Trace": [
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
"line": 130,
"function": "execute",
"class": "PDOStatement",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1207,
"function": "execute",
"class": "Doctrine\\DBAL\\Driver\\PDO\\Statement",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php",
"line": 292,
"function": "executeStatement",
"class": "Doctrine\\DBAL\\Connection",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/DB/Connection.php",
"line": 373,
"function": "executeStatement",
"class": "Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection",
"type": "->"
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
"line": 393,
"function": "executeStatement",
"class": "OC\\DB\\Connection",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 280,
"function": "execute",
"class": "Doctrine\\DBAL\\Query\\QueryBuilder",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 326,
"function": "execute",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php",
"line": 137,
"function": "executeStatement",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Service/Provisioning/Manager.php",
"line": 220,
"function": "insert",
"class": "OCP\\AppFramework\\Db\\QBMapper",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Service/Provisioning/Manager.php",
"line": 120,
"function": "provisionSingleUser",
"class": "OCA\\Mail\\Service\\Provisioning\\Manager",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/User/Manager.php",
"line": 561,
"function": "OCA\\Mail\\Service\\Provisioning\\{closure}",
"class": "OCA\\Mail\\Service\\Provisioning\\Manager",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Service/Provisioning/Manager.php",
"line": 123,
"function": "callForAllUsers",
"class": "OC\\User\\Manager",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/mail/lib/Controller/SettingsController.php",
"line": 70,
"function": "provision",
"class": "OCA\\Mail\\Service\\Provisioning\\Manager",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 232,
"function": "provision",
"class": "OCA\\Mail\\Controller\\SettingsController",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 138,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
"line": 184,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Route/Router.php",
"line": 338,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/var/www/nextcloud/lib/base.php",
"line": 1050,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/var/www/nextcloud/index.php",
"line": 49,
"function": "handleRequest",
"class": "OC",
"type": "::"
}
],
"File": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
"Line": 130
}
}
},
"message": "An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'inbound_user' at row 1",
"exception": [],
"CustomMessage": "An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'inbound_user' at row 1"
},
"id": "66b5dca84d2f0"
}
Mail app version
3.7.6
Mailserver or service
IMAP (DOVECOT)
Operating system
UBUNTU 22.04
PHP engine version
PHP 8.1
Web server
Apache (supported)
Database
MariaDB
Additional info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at apps/mail/lib/Service/Provisioning/Manager.php, especially provisionSingleUser and the insert reported at line 220, then trace the /apps/mail/api/settings/provisioning/all request. Compare the inbound_user value with the database column limit; done means provisioning all accounts completes without the SQL truncation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, php
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100