Issues with Mail App - Nextcloud 16.0.4

Hi,

I wanted to update the Mail app. However, when doing so, nc stops syncing and greets me on the website with the following notice:

## App update necessary

    These apps will be updated:

    * Mail (mail)

    Before continuing, please make sure that the database, the configuration folder and the data folder have been backed up.

    [translated from german:
    ## App-Aktualisierung notwendig

    Diese Apps werden aktualisiert:

    * Mail (mail)

    Stellen Sie vor dem Fortsetzen bitte sicher, dass die Datenbank, der Konfigurationsordner und der Datenordner gesichert wurden.]

There is only one button, to start the update. [“Aktualisierung starten”] It seems, that it is trying to update the entire system, even though the system is already at 16.0.4. Anyways, the attempted update fails:

Aktualisierung auf 16.0.4
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'CREATE TABLE nc_2271_mail_mailboxes (id VARCHAR(255) NOT NULL, account_id INT NOT NULL, sync_token VARCHAR(255) NOT NULL, attributes VARCHAR(255) DEFAULT '[]' NOT NULL, delimiter VARCHAR(1) NOT NULL, messages INT NOT NULL, unseen INT NOT NULL, selectable TINYINT(1) DEFAULT '1' NOT NULL, PRIMARY KEY(account_id, id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ENGINE = InnoDB ROW_FORMAT = compressed': SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

Detaillierte Protokollmeldungen 
Update vorbereiten

Log-Level auf "debug" gesetzt

Wartungsmodus eingeschaltet

Reparaturschritt: Repair MySQL collation

Reparaturinformation: Change row format for nc_2271_addressbooks ...

Reparaturinformation: Change collation for nc_2271_addressbooks ...

Reparaturinformation: Change row format for nc_2271_authtoken ...

Reparaturinformation: Change collation for nc_2271_authtoken ...

Reparaturinformation: Change row format for nc_2271_calendarobjects ...

Reparaturinformation: Change collation for nc_2271_calendarobjects ...

Reparaturinformation: Change row format for nc_2271_calendars ...

Reparaturinformation: Change collation for nc_2271_calendars ...

Reparaturinformation: Change row format for nc_2271_calendarsubscriptions ...

Reparaturinformation: Change collation for nc_2271_calendarsubscriptions ...

Reparaturinformation: Change row format for nc_2271_dav_shares ...

Reparaturinformation: Change collation for nc_2271_dav_shares ...

Reparaturinformation: Change row format for nc_2271_login_flow_v2 ...

Reparaturinformation: Change collation for nc_2271_login_flow_v2 ...

Reparaturinformation: Change row format for nc_2271_migrations ...

Reparaturinformation: Change collation for nc_2271_migrations ...

Reparaturinformation: Change row format for nc_2271_mimetypes ...

Reparaturinformation: Change collation for nc_2271_mimetypes ...

Reparaturinformation: Change row format for nc_2271_systemtag_group ...

Reparaturinformation: Change collation for nc_2271_systemtag_group ...

Reparaturinformation: Change row format for nc_2271_trusted_servers ...

Reparaturinformation: Change collation for nc_2271_trusted_servers ...

Reparaturschritt: Repair SQLite autoincrement

Reparaturschritt: Copy data from accounts table when migrating from ownCloud

Reparaturschritt: Drop account terms table when migrating from ownCloud

Das Datenbankschema wird aktualisiert

Datenbank aktualisiert

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'CREATE TABLE nc_2271_mail_mailboxes (id VARCHAR(255) NOT NULL, account_id INT NOT NULL, sync_token VARCHAR(255) NOT NULL, attributes VARCHAR(255) DEFAULT '[]' NOT NULL, delimiter VARCHAR(1) NOT NULL, messages INT NOT NULL, unseen INT NOT NULL, selectable TINYINT(1) DEFAULT '1' NOT NULL, PRIMARY KEY(account_id, id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ENGINE = InnoDB ROW_FORMAT = compressed': SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

The only way I found to get the sync running again was deleting the ‘mail’-folder in nextcloud/apps (I don’t have root access on the mail server, so no occ). When installing ‘mail’ via the settings on the website, I am back to the above message, that an update of the app is necessary.

What do I miss here? How to reenable the mail app, without crashing nextcloud?

Thanks, best
Martin

That’s interesting that you are able to delete Nextcloud files without having root access to the system. Are you not the administrator of this system?

Please don’t delete anything else as this makes it phenomenally more difficult to troubleshoot.

You will probably need occ to resolve this.

Karl,

thanks for your answer.

No, I’m not superuser, and trying occ without root failed. Trying with root was reported to the admin :smirk:

So, deleting the mail-dir was all I was able to do in order to get nextcloud up and running again. My Nextcloud instance is running on an manitu.de-server, btw.

Any ideas are appreciated.
Best
Martin

Well to be specific, occ must be run as the web server user. It sounds like your sysadmin needs to be involved in fixing your issue.

Read https://docs.nextcloud.com/server/stable/admin_manual/configuration_database/mysql_4byte_support.html :slight_smile:

Hallo Christoph,

besten Dank für den Vorschlag. Du triffst den Nagel auf den Kopf. Nur leider bin ich rechtlich auf dem Server sehr eingeschränkt :frowning:

MariaDB [db13203]> SET GLOBAL innodb_file_format=Barracuda;

ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation

Anderen Hoster suchen, eh?

I had the same on my dev instance. But I could just change the my.cnf to do the changes. If you do not have access to that, yeah, finding another hoster might be the only option.