Account provisioning cannot be disabled

Hello,
since Nextcloud 21 I have the same problem on two Nextcloud-Instances (VM from hanssonit.se, and Univention Server 4.4-8), after I did click in “Settings” - “Groupware” by fault on “Deploy all Accounts”.

Now there exist these settings in the Nextcloud-database “oc_mail_accounts” as 10 “dead” entries with “domain.com”, partially even in deactivated accounts.

If I click in the Settings-Groupware on the button “Undeploy and delete settings”, I get the error message:
“Error Deleting and Unprovisioning Accounts for “*””

It also is not possible to delete the settings in the mail-app itself.

Nextcloud.log:

{“reqId”:“DrFBMNTTYk7pUvqhnhOb”,“level”:3,“time”:“2021-09-15T14:35:12+00:00”,“remoteAddr”:“79.194.182.103”,“user”:“Administrator”,“app”:“index”,“method”:“DELETE”,“url”:"/nextcloud/apps/mail/api/settings/provisioning/1",“message”:{“Exception”:“Doctrine\DBAL\Exception\DriverException”,“Message”:“An exception occurred while executing a query: SQLSTATE[22P02]: Invalid text representation: 7 FEHLER: ung\u00fcltige Eingabesyntax f\u00fcr ganze Zahl: \u00bbt\u00ab”,“Code”:7,“Trace”:[{“file”:"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",“line”:1728,“function”:“convert”,“class”:“Doctrine\DBAL\Driver\API\PostgreSQL\ExceptionConverter”,“type”:"->"},{“file”:"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",“line”:1667,“function”:“handleDriverException”,“class”:“Doctrine\DBAL\Connection”,“type”:"->"},{“file”:"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",“line”:1146,“function”:“convertExceptionDuringQuery”,“class”:“Doctrine\DBAL\Connection”,“type”:"->"},{“file”:"/var/www/html/lib/private/DB/Connection.php",“line”:257,“function”:“executeStatement”,“class”:“Doctrine\DBAL\Connection”,“type”:"->"},{“file”:"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",“line”:213,“function”:“executeStatement”,“class”:“OC\DB\Connection”,“type”:"->"},{“file”:"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php",“line”:287,“function”:“execute”,“class”:“Doctrine\DBAL\Query\QueryBuilder”,“type”:"->"},{“file”:"/var/www/html/apps/mail/lib/Db/MailAccountMapper.php",“line”:140,“function”:“execute”,“class”:“OC\DB\QueryBuilder\QueryBuilder”,“type”:"->"},{“file”:"/var/www/html/apps/mail/lib/Service/Provisioning/Manager.php",“line”:185,“function”:“deleteProvisionedAccounts”,“class”:“OCA\Mail\Db\MailAccountMapper”,“type”:"->"},{“file”:"/var/www/html/apps/mail/lib/Controller/SettingsController.php",“line”:85,“function”:“deprovision”,“class”:“OCA\Mail\Service\Provisioning\Manager”,“type”:"->"},{“file”:"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",“line”:218,“function”:“deprovision”,“class”:“OCA\Mail\Controller\SettingsController”,“type”:"->"},{“file”:"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",“line”:127,“function”:“executeController”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->"},{“file”:"/var/www/html/lib/private/AppFramework/App.php",“line”:157,“function”:“dispatch”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->"},{“file”:"/var/www/html/lib/private/Route/Router.php",“line”:302,“function”:“main”,“class”:“OC\AppFramework\App”,“type”:"::"},{“file”:"/var/www/html/lib/base.php",“line”:993,“function”:“match”,“class”:“OC\Route\Router”,“type”:"->"},{“file”:"/var/www/html/index.php",“line”:37,“function”:“handleRequest”,“class”:“OC”,“type”:"::"}],“File”:"/var/www/html/3rdparty/doctrine/dbal/src/Driver/API/PostgreSQL/ExceptionConverter.php",“Line”:83,“Previous”:{“Exception”:“Doctrine\DBAL\Driver\PDO\Exception”,“Message”:“SQLSTATE[22P02]: Invalid text representation: 7 FEHLER: ung\u00fcltige Eingabesyntax f\u00fcr ganze Zahl: \u00bbt\u00ab”,“Code”:7,“Trace”:[{“file”:"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",“line”:84,“function”:“new”,“class”:“Doctrine\DBAL\Driver\PDO\Exception”,“type”:"::"},{“file”:"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",“line”:1136,“function”:“execute”,“class”:“Doctrine\DBAL\Driver\PDO\Statement”,“type”:"->"},{“file”:"/var/www/html/lib/private/DB/Connection.php",“line”:257,“function”:“executeStatement”,“class”:“Doctrine\DBAL\Connection”,“type”:"->"},{“file”:"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",“line”:213,“function”:“executeStatement”,“class”:“OC\DB\Connection”,“type”:"->"},{“file”:"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php",“line”:287,“function”:“execute”,“class”:“Doctrine\DBAL\Query\QueryBuilder”,“type”:"->"},{“file”:"/var/www/html/apps/mail/lib/Db/MailAccountMapper.php",“line”:140,“function”:“execute”,“class”:“OC\DB\QueryBuilder\QueryBuilder”,“type”:"->"},{“file”:"/var/www/html/apps/mail/lib/Service/Provisioning/Manager.php",“line”:185,“function”:“deleteProvisionedAccounts”,“class”:“OCA\Mail\Db\MailAccountMapper”,“type”:"->"},{“file”:"/var/www/html/apps/mail/lib/Controller/SettingsController.php",“line”:85,“function”:“deprovision”,“class”:“OCA\Mail\Service\Provisioning\Manager”,“type”:"->"},{“file”:"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",“line”:218,“function”:“deprovision”,“class”:“OCA\Mail\Controller\SettingsController”,“type”:"->"},{“file”:"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",“line”:127,“function”:“executeController”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->"},{“file”:"/var/www/html/lib/private/AppFramework/App.php",“line”:157,“function”:“dispatch”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->"},{“file”:"/var/www/html/lib/private/Route/Router.php",“line”:302,“function”:“main”,“class”:“OC\AppFramework\App”,“type”:"::"},{“file”:"/var/www/html/lib/base.php",“line”:993,“function”:“match”,“class”:“OC\Route\Router”,“type”:"->"},{“file”:"/var/www/html/index.php",“line”:37,“function”:“handleRequest”,“class”:“OC”,“type”:"::"}],“File”:"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php",“Line”:26,“Previous”:{“Exception”:“PDOException”,“Message”:“SQLSTATE[22P02]: Invalid text representation: 7 FEHLER: ung\u00fcltige Eingabesyntax f\u00fcr ganze Zahl: \u00bbt\u00ab”,“Code”:“22P02”,“Trace”:[{“file”:"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",“line”:82,“function”:“execute”,“class”:“PDOStatement”,“type”:"->"},{“file”:"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",“line”:1136,“function”:“execute”,“class”:“Doctrine\DBAL\Driver\PDO\Statement”,“type”:"->"},{“file”:"/var/www/html/lib/private/DB/Connection.php",“line”:257,“function”:“executeStatement”,“class”:“Doctrine\DBAL\Connection”,“type”:"->"},{“file”:"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",“line”:213,“function”:“executeStatement”,“class”:“OC\DB\Connection”,“type”:"->"},{“file”:"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php",“line”:287,“function”:“execute”,“class”:“Doctrine\DBAL\Query\QueryBuilder”,“type”:"->"},{“file”:"/var/www/html/apps/mail/lib/Db/MailAccountMapper.php",“line”:140,“function”:“execute”,“class”:“OC\DB\QueryBuilder\QueryBuilder”,“type”:"->"},{“file”:"/var/www/html/apps/mail/lib/Service/Provisioning/Manager.php",“line”:185,“function”:“deleteProvisionedAccounts”,“class”:“OCA\Mail\Db\MailAccountMapper”,“type”:"->"},{“file”:"/var/www/html/apps/mail/lib/Controller/SettingsController.php",“line”:85,“function”:“deprovision”,“class”:“OCA\Mail\Service\Provisioning\Manager”,“type”:"->"},{“file”:"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",“line”:218,“function”:“deprovision”,“class”:“OCA\Mail\Controller\SettingsController”,“type”:"->"},{“file”:"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",“line”:127,“function”:“executeController”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->"},{“file”:"/var/www/html/lib/private/AppFramework/App.php",“line”:157,“function”:“dispatch”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:"->"},{“file”:"/var/www/html/lib/private/Route/Router.php",“line”:302,“function”:“main”,“class”:“OC\AppFramework\App”,“type”:"::"},{“file”:"/var/www/html/lib/base.php",“line”:993,“function”:“match”,“class”:“OC\Route\Router”,“type”:"->"},{“file”:"/var/www/html/index.php",“line”:37,“function”:“handleRequest”,“class”:“OC”,“type”:"::"}],“File”:"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",“Line”:82}},“CustomMessage”:"–"},“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0”,“version”:“21.0.4.1”}

Univention Corporate Server 4.4.8

Debian GNU/Linux 9 (stretch)
PostgreSQL 9.6.23
Apache 2.4
PHP 7.0.33-0+deb9u11
Nextcloud 21.0.4
8GB RAM
in a Virtual Box 6.1-environment under Windows 10

The second server with same issue:

Ubuntu Server 20.04 LTS 64-bit
Apache 2.4
PostgreSQL 12
PHP-FPM 7.4
Linux Kernel: 5.4
Nextcloud 22.1.1
16GB RAM
pre-configured VM from hanssonit.se
in VM-Ware ESXi-environment

the section

'app.mail.accounts.default' => [
...

does not exist in my config.php.

How can I get rid of the “Account provisioning”, which is flooding my nextcloud.log because of non-existent domain and accounts on IMAP server?
Removing and installing new of the mail-app does not work, the settings will be kept.

Same in German

Fixed with Set proper type for provisioning_id by kesselb · Pull Request #5559 · nextcloud/mail · GitHub and v1.10.5

1 Like

Yeah, Christoph! - You are my hero.
Today I got the message, that there was an update of the mail-app.
After update from 1.10.3 to 1.10.5 it works now.

Thank you

1 Like