Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update issue #25445

Closed
andydukeusa opened this issue Feb 2, 2021 · 5 comments
Closed

Update issue #25445

andydukeusa opened this issue Feb 2, 2021 · 5 comments

Comments

@andydukeusa
Copy link

andydukeusa commented Feb 2, 2021

polls app update fails when upgrading nextcloud

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'CREATE UNIQUE INDEX UNIQ_options ON nc_polls_options (poll_id, poll_option_text, timestamp)': SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
Detailed logs

Preparing update

Set log level to debug

Turned on maintenance mode

Repair step: Repair MySQL collation

Repair info: All tables already have the correct collation -> nothing to do

Repair step: Repair SQLite autoincrement

Repair step: Copy data from accounts table when migrating from ownCloud

Repair step: Drop account terms table when migrating from ownCloud

Updating database schema

Updated database

Repair step: Delete duplicates

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'CREATE UNIQUE INDEX UNIQ_options ON nc_polls_options (poll_id, poll_option_text, timestamp)': SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

The update was unsuccessful. Please report this issue to the Nextcloud community.

@machinaeXlasse
Copy link

machinaeXlasse commented Feb 2, 2021

I have the exact same error. It happened when updating from NC Version 20.0.5 to 20.0.6 after running the additional app update for polls that I was asked for when opening my nextcloud instance via webbrowser.

I would be very happy, if no quick fix is in sight, to learn how to disable polls to have my NC instance back up and running.

Maybe @andydukeusa change the issue title to something more desriptive like "polls app update fails when upgrading nextcloud"

@machinaeXlasse
Copy link

machinaeXlasse commented Feb 3, 2021

I was able to solve this by enabling mysql 4-byte support following this guide in the NC manual:
https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/mysql_4byte_support.html

Seems a little drastic to solve it this way but enabling emojis was on my list anyways.

Maybe someone knows a more simple solution to fix this polls app update database issue?

@kesselb
Copy link
Contributor

kesselb commented Feb 3, 2021

Thank you for reporting this issue 👍 Please check #15058 for more details.

Usually there are two ways to fix this:

A) Configure your database server to support utf8mb4 (https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/mysql_4byte_support.html).

B) If the database server does not support utf8mb4 disable it by setting 'mysql.utf8mb4' => false in your config.php (emojis in filename, calendar events, etc. are not possible than and you have to accept the warning).

@kesselb kesselb closed this as completed Feb 3, 2021
@andydukeusa
Copy link
Author

I have the exact same error. It happened when updating from NC Version 20.0.5 to 20.0.6 after running the additional app update for polls that I was asked for when opening my nextcloud instance via webbrowser.

I would be very happy, if no quick fix is in sight, to learn how to disable polls to have my NC instance back up and running.

Maybe @andydukeusa change the issue title to something more desriptive like "polls app update fails when upgrading nextcloud"

title updated as you suggested. thanks!

@andydukeusa
Copy link
Author

Thank you for reporting this issue 👍 Please check #15058 for more details.

Usually there are two ways to fix this:

A) Configure your database server to support utf8mb4 (https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/mysql_4byte_support.html).

B) If the database server does not support utf8mb4 disable it by setting 'mysql.utf8mb4' => false in your config.php (emojis in filename, calendar events, etc. are not possible than and you have to accept the warning).

Thank you for your help, however I don't know how to apply this fix on a cpanel hosted mysql database. Any suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants