Mail: signatureMode is not a valid attribute

The Mail app stopped working, when I try to open it, it immediately gives an 500 internal server error, and I have the following line in the log.

The error persists throug uninstalling/reinstalling the app.

The only appearance of “signatureMode” is in /storage/nextcloud/www-root/3rdparty/phpseclib/phpseclib/phpseclib/Crypt/RSA.php, and I can’t find it anywhere in the DB.

What might be wrong, and how to fix this?

NC 24.0.6
Mail 1.14.1

[index] Error: BadFunctionCallException: signatureMode is not a valid attribute at <<closure>>

 0. /var/www/html/lib/public/AppFramework/Db/Entity.php line 165
    OCP\AppFramework\Db\Entity->setter("signatureMode", ["0"])
 1. /var/www/html/lib/public/AppFramework/Db/Entity.php line 73
    OCP\AppFramework\Db\Entity->__call("setSignatureMode", ["0"])
 2. /var/www/html/lib/public/AppFramework/Db/QBMapper.php line 322
    OCP\AppFramework\Db\Entity::fromRow(["1","mortee","m ... "])
 3. /var/www/html/lib/public/AppFramework/Db/QBMapper.php line 341
    OCP\AppFramework\Db\QBMapper->mapRowToEntity(["1","mortee","m ... "])
 4. /var/www/html/custom_apps/mail/lib/Db/MailAccountMapper.php line 98
    OCP\AppFramework\Db\QBMapper->findEntities(OC\DB\QueryBuilder\QueryBuilder {})
 5. /var/www/html/custom_apps/mail/lib/Service/AccountService.php line 72
    OCA\Mail\Db\MailAccountMapper->findByUserId("mortee")
 6. /var/www/html/custom_apps/mail/lib/Controller/PageController.php line 129
    OCA\Mail\Service\AccountService->findByUserId("mortee")
 7. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 225
    OCA\Mail\Controller\PageController->index()
 8. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 133
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Mail\Controller\PageController {}, "index")
 9. /var/www/html/lib/private/AppFramework/App.php line 172
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Mail\Controller\PageController {}, "index")
10. /var/www/html/lib/private/Route/Router.php line 298
    OC\AppFramework\App::main("OCA\\Mail\\Controller\\PageController", "index", OC\AppFramework\ ... {}, ["mail.page.index"])
11. /var/www/html/lib/base.php line 1030
    OC\Route\Router->match("/apps/mail/")
12. /var/www/html/index.php line 36
    OC::handleRequest()

Hey,

signature_mode is a new field for oc_mail_accounts and oc_mail_aliases. It should be added when you update to Mail 2.0: https://github.com/nextcloud/mail/blob/stable2.0/lib/Migration/Version1140Date20220628174152.php

If you run Mail 1.14 and see the field in oc_mail_accounts or oc_mail_alias it should be safe to drop it.

To prepare for Mail 2.0 (which is only available for Nextcloud 25) please have a look in the migrations table.

select *
from oc_migrations
where app = 'mail' and version = '1140Date20220628174152'

If a row exists, please delete it (otherwise it would not add the fields automatically when you upgrade to Mail 2.0 sometime).

Please make a backup just in case :wink:

1 Like

Thank you @kesselb! It was caused indeed by those extra columns. I intended to upgrade, made some preparations, but during the process turned out my system is not supported anymore by NC 25, so I’m stuck with 24 and the older Mail.

I would’ve figured it out myself if the column name wouldn’t use a different naming convention than the in-memory (thus in-log) object properties :man_facepalming: