Retrieving Mail Account - first time

Hi everyone, I’ve installed Nextcloud Mail App, but I was unable to retrieve all the messages.
I got the following errors.

    [mail] Error: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'UPDATE "oc_mail_mailboxes" SET "sync_new_lock" = ?, "sync_changed_lock" = ?, "sync_vanished_lock" = ? WHERE "id" = ?' with params [1595357703, 1595357703, null, 42]:

SQLSTATE[25P02]: In failed sql transaction: 7 ERRO:  transação atual foi interrompida, comandos ignorados até o fim do bloco de transação at <<closure>>

 0. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 169
    Doctrine\DBAL\Driver\AbstractPostgreSQLDriver->convertException("An exception oc ... o", Doctrine\DBAL\Dr ... ]})
 1. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 145
    Doctrine\DBAL\DBALException::wrapException(Doctrine\DBAL\Driver\PDOPgSql\Driver {}, Doctrine\DBAL\Dr ... ]}, "An exception oc ... o")
 2. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 1063
    Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOPgSql\Driver {}, Doctrine\DBAL\Dr ... ]}, "UPDATE \"oc_mai ... ?", {1: 1595357703,2 ... 2})
 3. /var/www/html/lib/private/DB/Connection.php line 214
    Doctrine\DBAL\Connection->executeUpdate("UPDATE \"oc_mai ... ?", [1595357703,1595357703,null,42], [1,1,1,1])
 4. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php line 203
    OC\DB\Connection->executeUpdate("UPDATE \"oc_mai ... 4", {dcValue1: 15953 ... 2}, {dcValue1: 1,dcV ... 1})
 5. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 216
    Doctrine\DBAL\Query\QueryBuilder->execute()
 6. /var/www/html/lib/public/AppFramework/Db/QBMapper.php line 203
    OC\DB\QueryBuilder\QueryBuilder->execute()
 7. /var/www/html/custom_apps/mail/lib/Db/MailboxMapper.php line 196
    OCP\AppFramework\Db\QBMapper->update("*** sensitive parameters replaced ***")
 8. /var/www/html/custom_apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php line 216
    OCA\Mail\Db\MailboxMapper->unlockFromVanishedSync("*** sensitive parameter replaced ***")
 9. /var/www/html/custom_apps/mail/lib/Service/Sync/SyncService.php line 126
    OCA\Mail\Service\Sync\ImapToDbSynchronizer->sync(OCA\Mail\Account {}, "*** sensitive parameter replaced ***", 42, [], true)
10. /var/www/html/custom_apps/mail/lib/Controller/FoldersController.php line 124
    OCA\Mail\Service\Sync\SyncService->syncMailbox(OCA\Mail\Account {}, "INBOX", 42, [], false, "is:important")
11. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 170
    OCA\Mail\Controller\FoldersController->sync(3, "SU5CT1g=", [], true, "is:important")
12. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 100
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Mail\Controller\FoldersController {}, "sync")
13. /var/www/html/lib/private/AppFramework/App.php line 137
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Mail\Controller\FoldersController {}, "sync")
14. /var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OCA\\Mail\\Cont ... r", "sync", OC\AppFramework\ ... {}, {accountId: "3", ... "})
15. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({accountId: "3", ... "})
16. /var/www/html/lib/private/Route/Router.php line 297
    call_user_func(OC\AppFramework\ ... {}, {accountId: "3", ... "})
17. /var/www/html/lib/base.php line 1007
    OC\Route\Router->match("/apps/mail/api/ ... c")
18. /var/www/html/index.php line 37
    OC::handleRequest()

POST /apps/mail/api/accounts/3/folders/SU5CT1g%3D/sync
from 2804:14d:baa2:4eb7:c026:216:9069:f19d by v.ramos at 2020-07-21T18:55:19+00:00

How can I fix it? There are 7,855 messages in my mail box.
Thanks!