oc_mail_mailboxes dosn't exists
Expected behavior
it should simply log in to my mail acc
Actual behavior
It gave me the http error 500
Log
Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT * FROM oc_mail_mailboxes WHERE account_id = ?' with params [12]: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cloud_db.oc_mail_mailboxes' doesn't exist
/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php - line 169:
Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException("An exceptio ... t", Doctrine\DBA ... ]})
/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php - line 149:
Doctrine\DBAL\DBALException::wrapException(Doctrine\DBA ... {}, Doctrine\DBA ... ]}, "An exceptio ... t")
/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php - line 914:
Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBA ... {}, Doctrine\DBA ... ]}, "SELECT * FR ... ?", { 1: 12})
/var/www/nextcloud/lib/private/DB/Connection.php - line 194:
Doctrine\DBAL\Connection->executeQuery("SELECT * FR ... ?", [ 12], [ 2], null)
/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php - line 206:
OC\DB\Connection->executeQuery("SELECT * FR ... 1", { dcValue1: 12}, { dcValue1: 2})
/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php - line 217:
Doctrine\DBAL\Query\QueryBuilder->execute()
/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php - line 320:
OC\DB\QueryBuilder\QueryBuilder->execute()
/var/www/nextcloud/apps/mail/lib/Db/MailboxMapper.php - line 65:
OCP\AppFramework\Db\QBMapper->findEntities(OC\DB\QueryB ... {})
/var/www/nextcloud/apps/mail/lib/Service/Classification/ImportanceClassifier.php - line 231:
OCA\Mail\Db\MailboxMapper->findAll(OCA\Mail\Account {})
/var/www/nextcloud/apps/mail/lib/Service/Classification/ImportanceClassifier.php - line 156:
OCA\Mail\Service\Classification\ImportanceClassifier->getIncomingMailboxes(OCA\Mail\Account {})
/var/www/nextcloud/apps/mail/lib/BackgroundJob/TrainImportanceClassifierJob.php - line 86:
OCA\Mail\Service\Classification\ImportanceClassifier->train(OCA\Mail\Account {}, OC\AppFramew ... {})
/var/www/nextcloud/lib/public/BackgroundJob/Job.php - line 80:
OCA\Mail\BackgroundJob\TrainImportanceClassifierJob->run({ accountId: 12})
/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php - line 61:
OCP\BackgroundJob\Job->execute(OC\BackgroundJob\JobList {}, OC\Log {})
/var/www/nextcloud/cron.php - line 127:
OCP\BackgroundJob\TimedJob->execute(OC\BackgroundJob\JobList {}, OC\Log {})
Caused by Doctrine\DBAL\Driver\PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cloud_db.oc_mail_mailboxes' doesn't exist /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php - line 906:
Doctrine\DBAL\Driver\PDOStatement->execute()
/var/www/nextcloud/lib/private/DB/Connection.php - line 194:
Doctrine\DBAL\Connection->executeQuery("SELECT * FR ... ?", [ 12], [ 2], null)
/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php - line 206:
OC\DB\Connection->executeQuery("SELECT * FR ... 1", { dcValue1: 12}, { dcValue1: 2})
/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php - line 217:
Doctrine\DBAL\Query\QueryBuilder->execute()
/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php - line 320:
OC\DB\QueryBuilder\QueryBuilder->execute()
/var/www/nextcloud/apps/mail/lib/Db/MailboxMapper.php - line 65:
OCP\AppFramework\Db\QBMapper->findEntities(OC\DB\QueryB ... {})
/var/www/nextcloud/apps/mail/lib/Service/Classification/ImportanceClassifier.php - line 231:
OCA\Mail\Db\MailboxMapper->findAll(OCA\Mail\Account {})
/var/www/nextcloud/apps/mail/lib/Service/Classification/ImportanceClassifier.php - line 156:
OCA\Mail\Service\Classification\ImportanceClassifier->getIncomingMailboxes(OCA\Mail\Account {})
/var/www/nextcloud/apps/mail/lib/BackgroundJob/TrainImportanceClassifierJob.php - line 86:
OCA\Mail\Service\Classification\ImportanceClassifier->train(OCA\Mail\Account {}, OC\AppFramew ... {})
/var/www/nextcloud/lib/public/BackgroundJob/Job.php - line 80:
OCA\Mail\BackgroundJob\TrainImportanceClassifierJob->run({ accountId: 12})
/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php - line 61:
OCP\BackgroundJob\Job->execute(OC\BackgroundJob\JobList {}, OC\Log {})
/var/www/nextcloud/cron.php - line 127:
OCP\BackgroundJob\TimedJob->execute(OC\BackgroundJob\JobList {}, OC\Log {})
Caused by PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cloud_db.oc_mail_mailboxes' doesn't exist /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php - line 127:
PDOStatement->execute(null)
/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php - line 906:
Doctrine\DBAL\Driver\PDOStatement->execute()
/var/www/nextcloud/lib/private/DB/Connection.php - line 194:
Doctrine\DBAL\Connection->executeQuery("SELECT * FR ... ?", [ 12], [ 2], null)
/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php - line 206:
OC\DB\Connection->executeQuery("SELECT * FR ... 1", { dcValue1: 12}, { dcValue1: 2})
/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php - line 217:
Doctrine\DBAL\Query\QueryBuilder->execute()
/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php - line 320:
OC\DB\QueryBuilder\QueryBuilder->execute()
/var/www/nextcloud/apps/mail/lib/Db/MailboxMapper.php - line 65:
OCP\AppFramework\Db\QBMapper->findEntities(OC\DB\QueryB ... {})
/var/www/nextcloud/apps/mail/lib/Service/Classification/ImportanceClassifier.php - line 231:
OCA\Mail\Db\MailboxMapper->findAll(OCA\Mail\Account {})
/var/www/nextcloud/apps/mail/lib/Service/Classification/ImportanceClassifier.php - line 156:
OCA\Mail\Service\Classification\ImportanceClassifier->getIncomingMailboxes(OCA\Mail\Account {})
/var/www/nextcloud/apps/mail/lib/BackgroundJob/TrainImportanceClassifierJob.php - line 86:
OCA\Mail\Service\Classification\ImportanceClassifier->train(OCA\Mail\Account {}, OC\AppFramew ... {})
/var/www/nextcloud/lib/public/BackgroundJob/Job.php - line 80:
OCA\Mail\BackgroundJob\TrainImportanceClassifierJob->run({ accountId: 12})
/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php - line 61:
OCP\BackgroundJob\Job->execute(OC\BackgroundJob\JobList {}, OC\Log {})
/var/www/nextcloud/cron.php - line 127:
OCP\BackgroundJob\TimedJob->execute(OC\BackgroundJob\JobList {}, OC\Log {})
Mail app
Mail app version: (see apps admin page, e.g. 0.5.3) 1.6.0 Mailserver or service: (e.g. Outlook, Yahoo, Gmail, Exchange,...) Gmail
Server configuration
Operating system: (e.g. Debian 8) Linux 5.4.72-v7l+ armv7l Web server: (e.g. Apache, Nginx,...) Nginx Database: (e.g. MariaDB, SQLite or PostgreSQL) MariaDB PHP version: (e.g. 7.0) 7.4 Nextcloud Version: (see admin page, e.g. 13.0.2) 20.0.1.1
Client configuration
Browser: (e.g. Firefox 48) Google Chrome 86.0.4240.183 Operating system: (e.g. Arch Linux) Win10
I had to delete the table because with the installation of mail some value was already law and it killed the installation and I thought that nextcloud would fix it.
Nextcloud does not fix it. Restore the latest backup and install the app again.
But this wars a fresh install...
The install Nextcloud from scratch. There is no supported procedure to restore manually deleted tables.
we have https://github.com/nextcloud/mail/blob/master/doc/developer.md#resetting-the-app but that is for development instances only. It might just bork your production instance even harder. Use it at your own risk.