Roundcube doesn't start after upgrade becaues of missing table
efelon opened this issue · 2 comments
Linux 5.15.84-v8+ #1613 SMP PREEMPT Thu Jan 5 12:03:08 GMT 2023 aarch64 GNU/Linux
PHP 8.1.14 (cli) (built: Jan 13 2023 10:38:02) (NTS)
I just updated roundcube from 1.6.0 to 1.6.1 which also upgraded rcmcarddav using composer:
Running update script at target...
Executing database schema update.
Updating database schema (2022081200)... [OK]
Executing php composer.phar to update dependencies...
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Lock file operations: 0 installs, 10 updates, 0 removals
- Upgrading doctrine/instantiator (1.4.1 => 2.0.0)
- Upgrading mstilkerich/carddavclient (v1.2.3 => v1.3.0)
- Upgrading nikic/php-parser (v4.15.2 => v4.15.3)
- Upgrading phpunit/php-code-coverage (9.2.22 => 9.2.24)
- Upgrading phpunit/phpunit (9.5.27 => 9.5.28)
- Upgrading pimlie/authres_status (0.6.2 => 0.6.3)
- Upgrading psr/log (1.1.4 => 3.0.0)
- Upgrading roundcube/carddav (v4.4.5 => v5.0.1)
- Upgrading sabre/vobject (4.5.1 => 4.5.3)
- Upgrading sabre/xml (2.2.5 => 3.0.0)
Writing lock file
Installing dependencies from lock file
Package operations: 0 installs, 6 updates, 0 removals
- Downloading pimlie/authres_status (0.6.3)
- Downloading sabre/xml (3.0.0)
- Downloading sabre/vobject (4.5.3)
- Downloading psr/log (3.0.0)
- Downloading mstilkerich/carddavclient (v1.3.0)
- Downloading roundcube/carddav (v5.0.1)
0/6 [>---------------------------] 0%
2/6 [=========>------------------] 33%
4/6 [==================>---------] 66%
6/6 [============================] 100%
- Upgrading pimlie/authres_status (0.6.2 => 0.6.3): Extracting archive
- Upgrading sabre/xml (2.2.5 => 3.0.0): Extracting archive
- Upgrading sabre/vobject (4.5.1 => 4.5.3): Extracting archive
- Upgrading psr/log (1.1.4 => 3.0.0): Extracting archive
- Upgrading mstilkerich/carddavclient (v1.2.3 => v1.3.0): Extracting archive
- Upgrading roundcube/carddav (v4.4.5 => v5.0.1): Extracting archive
0/6 [>---------------------------] 0%Restored authres_status/config.inc.php
Restored carddav/config.inc.php
6/6 [============================] 100%
Generating autoload files
5 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found
Restored carddav/config.inc.phpThis instance of Roundcube is up-to-date.
Have fun!
All done.
From the upgrade notes I assumed that the database migration happens on the first login?
Upgrading from 4.x
Database migration happens automatically. However, the assignment of addressbooks to accounts uses a heuristic (see CHANGELOG.md for details) that can produce extra accounts for user-created accounts. In this case, the user will have to cleanup manually by deleting those accounts in the settings interface.
... but I get the following error and roundcube saying "Internal Error".
[30-Jan-2023 17:36:00 +0100]: <q823hc6q> [5 ERR] Database::get (SELECT * FROM carddav_accounts WHERE ((`user_id` = '3'))) ERROR: [1146] Table 'roundcube_db.carddav_accounts' doesn't exist
[30-Jan-2023 17:36:00 +0100]: <q823hc6q> [5 ERR] Could not init rcmcarddav: [1146] Table 'roundcube_db.carddav_accounts' doesn't exist
Have I missed something?
Thanks in advance.
Yes, the database migration should happen when you log into roundcube. The error message indicates that the DB migration did not happen, because the carddav_accounts
table is a new table in v5 that should be created by the migration scripts. Are there any error in the logs concerning failed DB migration? When a migration fails, an error
level log message is logged.
@mstilkerich I only have the following errors in the log:
[30-Jan-2023 17:22:53 +0100]: <iuf7a1fj> DB Error: [1146] Table 'roundcube_db.carddav_accounts' doesn't exist (SQL Query: SELECT * FROM carddav_accounts WHERE ((`user_id` = '3'))) in /var/www/webmail/program/lib/Roundcube/rcube_db.php on line 567 (GET /webmail/?_task=mail)
[30-Jan-2023 17:36:00 +0100]: <q823hc6q> DB Error: [1146] Table 'roundcube_db.carddav_accounts' doesn't exist (SQL Query: SELECT * FROM carddav_accounts WHERE ((`user_id` = '3'))) in /var/www/webmail/program/lib/Roundcube/rcube_db.php on line 567 (GET /webmail/?_task=mail)
But in the meantime I can login again without error. I closed my browser in the meantime (which clears the cache). Is it possible that the cache was the problem in this case?
Thanks for the quick response.