nextcloud / mail

💌 Mail app for Nextcloud
https://apps.nextcloud.com/apps/mail
GNU Affero General Public License v3.0
840 stars 260 forks source link

upgrade to Mail 0.17.0 - DB error #1989

Closed ferdiga closed 5 years ago

ferdiga commented 5 years ago

Steps to reproduce

upgrade to Mail 0.17.0

Expected behaviour

upgrade to Mail 0.17.0

Actual behaviour

An exception occurred while executing 'CREATE TABLE oc_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

Server configuration detail

Operating system: Linux 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u5 (2019-08-11) x86_64

Webserver: Apache/2.4.25 (Debian) (apache2handler)

Database: mysql 10.1.38

PHP version:

7.3.7-1+0~20190710.40+debian9~1.gbp032aec Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, sodium, session, standard, apache2handler, mysqlnd, PDO, xml, apcu, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, imagick, intl, json, ldap, exif, mysqli, pdo_mysql, pdo_pgsql, pgsql, Phar, posix, readline, shmop, SimpleXML, smbclient, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, libsmbclient, Zend OPcache

Nextcloud version: 16.0.4 - 16.0.4.1

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: unknown

Signing status Array ( [core] => Array ( [EXTRA_FILE] => Array ( [.rnd] => Array ( [expected] => [current] => b762ec3850d93d6b9747310bb01d73539915f00f2b540374b46f1ef0a5451d59e402f860135973f514387765823e7c0fb6d590eb2ef5781d46a9efdded8a1718 ) [ocs/.rnd] => Array ( [expected] => [current] => 2bfd2d9b70c3726d004e661f1bffe1f88ff2b8f5075d1c7f46456052c7ee222ffd85db057bef2e97d94e59d607c821be4587f3ae76a1baa730983eaa818f5b73 ) ) ) )
List of activated apps ``` Enabled: - accessibility: 1.2.0 - activity: 2.9.1 - admin_audit: 1.6.0 - announcementcenter: 3.5.1 - apporder: 0.7.1 - audioplayer: 2.8.3 - calendar: 1.7.0 - carnet: 0.17.0 - cloud_federation_api: 0.2.0 - comments: 1.6.0 - contacts: 3.1.3 - dashboard: 6.0.0 - dav: 1.9.2 - deck: 0.6.6 - drawio: 0.9.3 - external: 3.3.0 - federatedfilesharing: 1.6.0 - federation: 1.6.0 - files: 1.11.0 - files_automatedtagging: 1.6.0 - files_external: 1.7.0 - files_external_gdrive: 0.4.0 - files_fulltextsearch: 1.3.6 - files_pdfviewer: 1.5.0 - files_photospheres: 1.0.5 - files_rightclick: 0.15.1 - files_sharing: 1.8.0 - files_texteditor: 2.8.0 - files_trashbin: 1.6.0 - files_versions: 1.9.0 - files_videoplayer: 1.5.0 - firstrunwizard: 2.5.0 - fulltextsearch: 1.3.6 - fulltextsearch_elasticsearch: 1.3.6 - gallery: 18.3.0 - groupfolders: 4.1.0 - issuetemplate: 0.5.0 - logreader: 2.1.0 - lookup_server_connector: 1.4.0 - nextcloud_announcements: 1.5.0 - notes: 3.0.2 - notifications: 2.4.1 - oauth2: 1.4.2 - ocr: 4.3.8 - ocsms: 2.1.3 - password_policy: 1.6.0 - phonetrack: 0.5.2 - previewgenerator: 2.1.0 - printer: 0.0.1 - privacy: 1.0.0 - provisioning_api: 1.6.0 - quota_warning: 1.5.0 - recommendations: 0.4.0 - richdocuments: 3.3.15 - serverinfo: 1.6.0 - sharebymail: 1.6.0 - socialsharing_email: 1.0.5 - spreed: 6.0.4 - support: 1.0.0 - survey_client: 1.4.0 - systemtags: 1.6.0 - tasks: 0.11.1 - theming: 1.7.0 - twofactor_backupcodes: 1.5.0 - updatenotification: 1.6.0 - viewer: 1.1.0 - workflowengine: 1.6.0 Disabled: - bruteforcesettings - circles - encryption - files_accesscontrol - files_retention - mail - ojsxc - registration - user_ldap - workflow_script ```
Configuration (config/config.php) ``` { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "16.0.4.1", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "enable_previews": true, "forcessl": true, "theme": "", "maintenance": false, "mail_smtpmode": "smtp", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "587", "mail_smtptimeout": 10, "loglevel": 0, "share_folder": "\/Shared", "trusted_domains": [ "service.chricar.at" ], "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "singleuser": false, "forceSSLforSubdomains": true, "trashbin_retention_obligation": "auto", "filelocking.enabled": "true", "filesystem_check_changes": 1, "mail_smtpauthtype": "PLAIN", "mail_smtpsecure": "tls", "mail_smtpauth": 1, "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "auth.bruteforce.protection.enabled": true, "overwriteprotocol": "https", "overwrite.cli.url": "https:\/\/service.chricar.at\/owncloud", "updater.release.channel": "stable", "memcache.local": "\\OC\\Memcache\\APCu", "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 6379, "password": "***REMOVED SENSITIVE VALUE***", "timeout": 1.5 }, "preview_max_x": 512, "preview_max_y": 512, "preview_max_scale_factor": 1, "preview_libreoffice_path": "\/usr\/bin\/libreoffice", "enabledPreviewProviders": [ "OC\\Preview\\Image", "OC\\Preview\\MP3", "OC\\Preview\\TXT", "OC\\Preview\\PDF", "OC\\Preview\\Movie", "OC\\Preview\\Photoshop", "OC\\Preview\\TIFF", "OC\\Preview\\SVG", "OC\\Preview\\OpenDocument" ], "has_rebuilt_cache": true, "mysql.utf8mb4": true } ```

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption:

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

Client configuration

Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/76.0.3809.100 Chrome/76.0.3809.100 Safari/537.36

Operating system:

Logs

Web server error log ``` Insert your web server log here ```
Nextcloud log ``` Insert your Nextcloud log here ```
Browser log Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ...
JB1985 commented 5 years ago

Same here:

`mail new version available: 0.17.0 Error: An exception occurred while executing 'CREATE TABLE oc_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 ` updated via occ

ChristophWurst commented 5 years ago

Read the docs and fix your db: https://docs.nextcloud.com/server/stable/admin_manual/configuration_database/mysql_4byte_support.html :)

ferdiga commented 5 years ago

image

I followed the procedure to "Enabling MySQL 4-byte support" nevertheless I can not enable mail 0.17.0 again (after I disabled it ) generating the above error.

can I rerun the "Enabling MySQL 4-byte support" ?

ChristophWurst commented 5 years ago

I think https://github.com/nextcloud/mail/issues/2012#issuecomment-531185096 should help :)

ferdiga commented 5 years ago

yes indeed, thanks probably there should be a warning/check of the version of mariadb