Internal servererror after updating mail app

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 25.0.1): 27.0.2
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04.3
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.52
PHP version (eg, 7.4): 8.2.8

The issue you are facing:

After updating the mail app i get an error when i click the mail icon in the upper app bar. I deactivated, deleted and installed it again but the error is still there.

Is this the first time you’ve seen this error? (Y/N):

Yes

Steps to replicate it:

  1. Try to open the mail app

The output of your Nextcloud log in Admin > Logging:

	BadFunctionCallException: quotaPercentage is not a valid attribute

    /var/www/nextcloud/lib/public/AppFramework/Db/Entity.php - line 167:

    OCP\AppFramework\Db\Entity->setter()

    /var/www/nextcloud/lib/public/AppFramework/Db/Entity.php - line 75:

    OCP\AppFramework\Db\Entity->__call()

    /var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php - line 321:

    OCP\AppFramework\Db\Entity::fromRow()

    /var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php - line 339:

    OCP\AppFramework\Db\QBMapper->mapRowToEntity()

    /var/www/nextcloud/apps/mail/lib/Db/MailAccountMapper.php - line 97:

    OCP\AppFramework\Db\QBMapper->findEntities()

    /var/www/nextcloud/apps/mail/lib/Service/AccountService.php - line 72:

    OCA\Mail\Db\MailAccountMapper->findByUserId()

    /var/www/nextcloud/apps/mail/lib/Controller/PageController.php - line 134:

    OCA\Mail\Service\AccountService->findByUserId()

    /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 230:

    OCA\Mail\Controller\PageController->index()

    /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 137:

    OC\AppFramework\Http\Dispatcher->executeController()

    /var/www/nextcloud/lib/private/AppFramework/App.php - line 183:

    OC\AppFramework\Http\Dispatcher->dispatch()

    /var/www/nextcloud/lib/private/Route/Router.php - line 315:

    OC\AppFramework\App::main()

    /var/www/nextcloud/lib/base.php - line 1071:

    OC\Route\Router->match()

    /var/www/nextcloud/index.php - line 36:

    OC::handleRequest()

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' => 
  array (
    1 => '',
    2 => '',
    3 => '',
    4 => '',
    5 => '',
    6 => '',
    7 => '',
    8 => '',
    0 => 'localhost:90',
  ),
  'datadirectory' => '/media/WDRed/Nextcloud/data',
  'overwrite.cli.url' => 'http://localhost:90',
  'dbtype' => 'mysql',
  'version' => '27.0.2.1',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost:90',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'logtimezone' => 'UTC',
  'installed' => true,
  'mail_domain' => 'xxx.de',
  'mail_smtpmode' => 'smtp',
  'mail_from_address' => 'info',
  'maintenance' => false,
  'debug' => false,
  'theme' => '',
  'logfile' => '/var/log/nextcloud.log',
  'loglevel' => 0,
  'default_phone_region' => 'DE',
  'mail_smtpauthtype' => 'LOGIN',
  'trashbin_retention_obligation' => '30, 60',
  'mail_smtpauth' => 1,
  'mail_smtpsecure' => 'ssl',
  'mail_smtphost' => 'smtp.xxx.de',
  'mail_smtpport' => '123',
  'mail_smtpname' => x@xxx.de',
  'mail_smtppassword' => 'xxx',
  'mail_smtptimeout' => 30,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\APCu',
  'mail_sendmailmode' => 'smtp',
  'mysql.utf8mb4' => true,
  'app_install_overwrite' => 
  array (
    0 => 'weather',
    1 => 'social',
    2 => 'piwik',
    3 => 'files_retention',
    4 => 'onlyoffice',
    5 => 'music',
    6 => 'talk_matterbridge',
    7 => 'bruteforcesettings',
    8 => 'occweb',
    9 => 'unsplash',
    10 => 'twofactor_nextcloud_notification',
    11 => 'previewgenerator',
    12 => 'documentserver_community',
    13 => 'maps',
  ),
  'filelocking.enabled' => true,
  'filelocking.ttl' => 18000,
  'simpleSignUpLink.shown' => false,
  'enable_previews' => true,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\TXT',
    1 => 'OC\\Preview\\Movie',
    2 => 'OC\\Preview\\MP4',
    3 => 'OC\\Preview\\MKV',
    4 => 'OC\\Preview\\AVI',
    5 => 'OC\\Preview\\Image',
  ),
  'updater.release.channel' => 'stable',
  'updater.secret' => 'xxx',
);

Hi, which version of the mail app did you install?

Hi, i have the latest version 3.2.6 of the mail app installed.

You didn’t install one of our prereleases? Because the quota warning is coming with Mail 3.4.

Ah, some weeks ago i switched to the beta channel out of curiosity about the new release and back. Probably i updated the mail app in this time i guess. Sorry i forgot that. :see_no_evil: I hopefully learned my lesson but maybe there is a solution for my fault like updating to the corresponding mail app alpha/beta and than wait for the stable or something like that?

Okay, that explains the column.

You can grab the latest beta for mail 3.4 from https://apps.nextcloud.com/apps/mail.

Thank you i updated the mail app but unfortunately i cannot activate it. It gives me the following error when i try:

Exception: Database error when running migration 3300Date20230801124717 for app mail An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 3072 bytes

Sorry, maybe a little off topic but my “Inner Monk”… (you know :wink:)…

Of course, this just has to be ‘localhost’ if, like yours, a unix socket is connected. Nextcloud fixes or “negates” this error and only uses what is in front of the colon, but it just caught my eye, because if a tcp port (usually 3306) is required for the database, then the key ‘dbport’ must be used.


and…

You can safely remove:
social, piwik, files_retention, onlyoffice, music, talk_matterbridge, bruteforcesettings, unsplash, twofactor_nextcloud_notification, previewgenerator and maps from your ‘app_install_overwrite’ array, since they all are fully supported by nextcloud 27.

bruteforcesettings is even a shipped app that is delivered with the server code and therefore always supports the version by definition.

Only
weather (NC-max 25), occweb (NC-max 23) and documentserver_community (NC-max 25)
need to remain in this array (if at all).

Tip: you can keep your ‘app_install_overwrite’ array up to date, fully automatic with
nc-apps install_overwrite

Much luck!
ernolf