Roundcube login fails

We noticed that users can’t login to roundcube after the update to v56. The error they’re getting was that on login, they get ‘Oops… something went wrong! an internal error has occurred etc etc.’

I noticed the following error in the Roundcube logs:

[20-Jan-2022 12:15:26 -0800]: <iotvchua> DB Error: [19] NOT NULL constraint failed: carddav_addressbooks2.last_updated (SQL Query: UPDATE carddav_addressbooks2 SET last_updated=strftime('%s', last_updated)) in /usr/local/lib/roundcubemail/program/lib/Roundcube/rcube_db.php on line 566 (POST /mail/?_task=login&_action=login)

[20-Jan-2022 12:15:27 America/Los_Angeles] PHP Fatal error: Uncaught Error: Wrong parameters for MStilkerich\CardDavAddressbook4Roundcube\Db\DatabaseException([string $message [, long $code [, Throwable $previous = NULL]]]) in /usr/local/lib/roundcubemail/plugins/carddav/src/Db/Database.php:112

Stack trace:

#0 /usr/local/lib/roundcubemail/plugins/carddav/src/Db/Database.php(112): Exception->__construct(NULL)

#1 /usr/local/lib/roundcubemail/plugins/carddav/carddav.php(1169): MStilkerich\CardDavAddressbook4Roundcube\Db\Database->startTransaction(false)

#2 /usr/local/lib/roundcubemail/plugins/carddav/carddav.php(339): carddav->deleteAddressbook('6')

#3 /usr/local/lib/roundcubemail/program/lib/Roundcube/rcube_plugin_api.php(513): carddav->initPresets(Array)

#4 /usr/local/lib/roundcubemail/index.php(154): rcube_plugin_api->exec_hook('login_after', Array)

#5 {main}

thrown in /usr/local/lib/roundcubemail/plugins/carddav/src/Db/Database.php on line 112

So it seems like a database error which cascades into an error building an exception. While I’m trying to figure out how to fix it I have made a workaround by disabling the carddav plugin.

To temporarily disable the carddav plugin I navigated to /usr/local/lib/roundcubemail/config and edited config.inc.php. There’s a line with an array of plugins, remove ‘carddav’ from that array. This temporarily fixed the problem, although if your users use carddav that won’t be available, and this will be overwritten by the next update probably.

Please post this to GitHub:

1 Like

Sure thing, I have added it here: Roundcube login breaks because NOT NULL constraint in carddav login · Issue #2086 · mail-in-a-box/mailinabox · GitHub

1 Like

Does this affect upgrades from the previous version 55, or only from older versions? Is there a fix in the works?

This topic was automatically closed 40 days after the last reply. New replies are no longer allowed.