Mail App not connecting after update

The mail app now fails after the upgrade to 3.5.0

Have tried reboots etc but no joy. This did happen after a previous mail app upgrade a few months ago. That time a reboot did the trick. It goes to a light blue Nextcloud page with this message:

Internal Server Error

The server was unable to complete your request.
If this happens again, please send the technical details below to the server administrator.
More details can be found in the server log.

Technical details

  • Remote Address: 2xx.1xx.6x.2xx
  • Request ID: dbgPwv9Yh6vJWbP4HAAw

Before I bury my head in the server log :crazy_face: can anyone help with a quick fix? :slightly_smiling_face:

Here’s the support template with as much detail as I can do:

Nextcloud version (eg, 26.0.1): 27.1.4
Operating system and version (eg, Ubuntu 22.04): Ubuntu Linux 22.04.3
Apache or nginx version (eg, Apache 2.4.25): nginx version 1.18.0
PHP version (eg, 8.1): 8.1
Database (sqlite or MariaDB or Postgres) MariaDB
Docker (compose) No
Snap No
Is this the first time you’ve seen this error? no

The issue you are facing: Mail app won’t connect - details above

  • Steps to replicate it:
  • The output of your Nextcloud log in Admin > Logging:
[index] Error: BadFunctionCallException: searchBody is not a valid attribute at <<closure>>

 0. /var/www/nextcloud/lib/public/AppFramework/Db/Entity.php line 167
    OCP\AppFramework\Db\Entity->setter()
 1. /var/www/nextcloud/lib/public/AppFramework/Db/Entity.php line 75
    OCP\AppFramework\Db\Entity->__call()
 2. /var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php line 321
    OCP\AppFramework\Db\Entity::fromRow()
 3. /var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php line 339
    OCP\AppFramework\Db\QBMapper->mapRowToEntity()
 4. /var/www/nextcloud/apps/mail/lib/Db/MailAccountMapper.php line 97
    OCP\AppFramework\Db\QBMapper->findEntities()
 5. /var/www/nextcloud/apps/mail/lib/Service/AccountService.php line 73
    OCA\Mail\Db\MailAccountMapper->findByUserId()
 6. /var/www/nextcloud/apps/mail/lib/Controller/PageController.php line 153
    OCA\Mail\Service\AccountService->findByUserId()
 7. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\Mail\Controller\PageController->index()
 8. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController()
 9. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
10. /var/www/nextcloud/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
11. /var/www/nextcloud/lib/base.php line 1068
    OC\Route\Router->match()
12. /var/www/nextcloud/index.php line 36
    OC::handleRequest()

GET /apps/mail/
from 217.155.63.213 by NigelNext at 2023-12-14T08:26:05+00:00

[and a few seconds later]

[no app in context] Error: BadFunctionCallException: searchBody is not a valid attribute at <<closure>>

 0. /var/www/nextcloud/lib/public/AppFramework/Db/Entity.php line 167
    OCP\AppFramework\Db\Entity->setter()
 1. /var/www/nextcloud/lib/public/AppFramework/Db/Entity.php line 75
    OCP\AppFramework\Db\Entity->__call()
 2. /var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php line 321
    OCP\AppFramework\Db\Entity::fromRow()
 3. /var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php line 339
    OCP\AppFramework\Db\QBMapper->mapRowToEntity()
 4. /var/www/nextcloud/apps/mail/lib/Db/MailAccountMapper.php line 97
    OCP\AppFramework\Db\QBMapper->findEntities()
 5. /var/www/nextcloud/apps/mail/lib/Service/AccountService.php line 73
    OCA\Mail\Db\MailAccountMapper->findByUserId()
 6. /var/www/nextcloud/apps/mail/lib/Dashboard/MailWidgetV2.php line 64
    OCA\Mail\Service\AccountService->findByUserId()
 7. /var/www/nextcloud/apps/dashboard/lib/Controller/DashboardApiController.php line 172
    OCA\Mail\Dashboard\MailWidgetV2->getWidgetButtons()
 8. <<closure>>
    OCA\Dashboard\Controller\DashboardApiController->OCA\Dashboard\Controller\{closure}("*** sensitive parameters replaced ***")
 9. /var/www/nextcloud/apps/dashboard/lib/Controller/DashboardApiController.php line 151
    array_map()
10. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\Dashboard\Controller\DashboardApiController->getWidgets()
11. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController()
12. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
13. /var/www/nextcloud/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
14. /var/www/nextcloud/ocs/v1.php line 64
    OC\Route\Router->match()
15. /var/www/nextcloud/ocs/v2.php line 23
    require_once("/var/www/nextcloud/ocs/v1.php")

GET /ocs/v2.php/apps/dashboard/api/v1/widgets
from 217.155.63.213 by NigelNext at 2023-12-14T08:26:12+00:00
  • The output of your config.php file in /path/to/nextcloud**
    (use https://.../settings/admin/support which auto-removes identifying information!):
{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "localhost",
        "nextcloud.orchardmusic.com",
        "192.168.178.33"
    ],
    "default_phone_region": "GB",
    "memcache.local": "\\OC\\Memcache\\Redis",
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "27.1.4.1",
    "overwrite.cli.url": "https:\/\/nextcloud.orchardmusic.com",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "app_install_overwrite": [
        "integration_libretranslate"
    ],
    "mail_smtpmode": "smtp",
    "mail_sendmailmode": "smtp",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "587",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpauth": 1,
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "maintenance": false,
    "memcache.distributed": "\\OC\\Memcache\\Redis",
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 6379
    },
    "theme": "",
    "loglevel": 2
}
  • for Docker/Podman list environment variables ( run “docker inspect {container name}”)**
PASTE HERE - n/a
  • The output of your Apache/nginx/system log in /var/log/____:
  • For Docker/Podman post STDOUT of the container (run docker logs {container name})
Error log empty
  • errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors.
Found nextcloud.log in the data folder. It's very long and I couldn't see how to filter for errors. Looked as admin within nextcloud itself but failed to find?

Hi @nigelharpur,
You are missing the required support template. Please fill this form out and edit into your post. It is common courtesy when requesting support.

This will give us the technical info and logs needed to help you! Thanks.

Will do!
The last time I did a support post it was already there in the top of the new post so not sure why not this time - I did wonder - will edit in as much as I can provide, thanks.

@just Is there anything else I can do? There’s a NC27 update out now and I wonder if I should hold off on that until my Mail App issues is solved? Thanks.

I applied the latest NC27 update anyway today and the Mail App now works again. Also the Calendar widget (upcoming events) which had stopped working as well, although the Calendar app itself was fine. Will mark as solved.