This morning, nextcloud web user interface welcomed me with a message that Pools requires an update. After commiting, it startet updating and failed. Same on console.
sudo -u www-data ./occ upgrade
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Turned on maintenance mode
Updating database schema
Updated database
Updating <polls> ...
Doctrine\DBAL\Exception\NotNullConstraintViolationException: An exception occurred while executing 'ALTER TABLE oc_polls_share CHANGE `user_id` user_id VARCHAR(64) CHARACTER SET utf8mb4 DEFAULT '' NOT NULL COLLATE `utf8mb4_bin`':
SQLSTATE[22004]: Null value not allowed: 1138 Invalid use of NULL value
Update failed
Maintenance mode is kept active
Resetting log level
Update should execute without failures, but in any case Nextcloud should keep being available to users if non-critical apps fail to update
Update fails, Nextcloud is unusable, web interface not available, sync clients can't connect to server
nextcloud/polls#1376
Nextcloud apps list
sudo -u www-data ./occ app:list
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Enabled:
- accessibility: 1.6.0
- activity: 2.13.4
- admin_audit: 1.10.0
- announcementcenter: 4.0.1
- apporder: 0.11.0
- bruteforcesettings: 2.0.1
- calendar: 2.1.3
- cloud_federation_api: 1.3.0
- comments: 1.10.0
- contacts: 3.4.3
- contactsinteraction: 1.1.0
- dashboard: 7.0.0
- dav: 1.16.2
- deck: 1.2.3
- federatedfilesharing: 1.10.2
- federation: 1.10.1
- files: 1.15.0
- files_accesscontrol: 1.10.2
- files_automatedtagging: 1.10.1
- files_external: 1.11.1
- files_markdown: 2.3.1
- files_pdfviewer: 2.0.1
- files_rightclick: 0.17.0
- files_sharing: 1.12.2
- files_trashbin: 1.10.1
- files_versions: 1.13.0
- files_videoplayer: 1.9.0
- firstrunwizard: 2.9.0
- group_everyone: 0.1.6
- groupfolders: 8.2.0
- logreader: 2.5.0
- lookup_server_connector: 1.8.0
- nextcloud_announcements: 1.9.0
- notifications: 2.8.0
- oauth2: 1.8.0
- password_policy: 1.10.1
- photos: 1.2.3
- polls: 1.6.3
- privacy: 1.4.0
- provisioning_api: 1.10.0
- quota_warning: 1.9.1
- ransomware_protection: 1.8.0
- recommendations: 0.8.0
- serverinfo: 1.10.0
- settings: 1.2.0
- sharebymail: 1.10.0
- spreed: 10.0.5
- support: 1.3.0
- survey_client: 1.8.0
- systemtags: 1.10.0
- tasks: 0.13.6
- terms_of_service: 1.6.1
- text: 3.1.0
- theming: 1.11.0
- twofactor_backupcodes: 1.9.0
- twofactor_totp: 5.0.0
- updatenotification: 1.10.0
- user_status: 1.0.1
- viewer: 1.4.0
- weather_status: 1.0.0
- workflowengine: 2.2.0
Disabled:
- data_request
- encryption
- files_retention
- user_ldap
Nextcloud config
sudo -u www-data php occ config:list system
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
{
"system": {
"updatechecker": false,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"***REMOVED SENSITIVE VALUE***",
"***REMOVED SENSITIVE VALUE***",
"***REMOVED SENSITIVE VALUE***",
"***REMOVED SENSITIVE VALUE***"
],
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"overwritehost": "***REMOVED SENSITIVE VALUE***",
"overwriteprotocol": "https",
"overwritewebroot": "\/cloud",
"overwritecondaddr": "***REMOVED SENSITIVE VALUE***",
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"memcache.local": "\\OC\\Memcache\\APCu",
"filelocking.enabled": true,
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379,
"timeout": 0,
"password": "***REMOVED SENSITIVE VALUE***"
},
"overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "20.0.6.1",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"logtimezone": "UTC",
"installed": true,
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"ldapIgnoreNamingRules": false,
"mail_smtpauthtype": "LOGIN",
"mail_smtpauth": 1,
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "25",
"mail_smtpsecure": "tls",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"loglevel": 3,
"maintenance": true,
"theme": "",
"htaccess.RewriteBase": "\/cloud",
"singleuser": false,
"updater.release.channel": "stable",
"mysql.utf8mb4": true,
"app_install_overwrite": [
"admin_notifications"
]
}
}
Nextcloud log
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":1,"time":"2021-02-01T09:54:06+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"/cloud/occ","message":"\\OC\\Repair::step: Repair step: Drop account terms table when migrating from ownCloud","userAgent":"--","version":"20.0.6.1"}
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":1,"time":"2021-02-01T09:54:06+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"/cloud/occ","message":"\\OC\\Updater::dbUpgradeBefore: Updating database schema","userAgent":"--","version":"20.0.6.1"}
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":1,"time":"2021-02-01T09:54:06+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"/cloud/occ","message":"\\OC\\Updater::dbUpgrade: Updated database","userAgent":"--","version":"20.0.6.1"}
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":0,"time":"2021-02-01T09:54:06+00:00","remoteAddr":"","user":"--","app":"group_everyone","method":"","url":"/cloud/occ","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"20.0.6.1"}
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":0,"time":"2021-02-01T09:54:06+00:00","remoteAddr":"","user":"--","app":"files_external","method":"","url":"/cloud/occ","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"20.0.6.1"}
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":0,"time":"2021-02-01T09:54:06+00:00","remoteAddr":"","user":"--","app":"files_sharing","method":"","url":"/cloud/occ","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"20.0.6.1"}
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":0,"time":"2021-02-01T09:54:06+00:00","remoteAddr":"","user":"--","app":"groupfolders","method":"","url":"/cloud/occ","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"20.0.6.1"}
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":0,"time":"2021-02-01T09:54:06+00:00","remoteAddr":"","user":"--","app":"terms_of_service","method":"","url":"/cloud/occ","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"20.0.6.1"}
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":0,"time":"2021-02-01T09:54:06+00:00","remoteAddr":"","user":"--","app":"ransomware_protection","method":"","url":"/cloud/occ","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"20.0.6.1"}
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":1,"time":"2021-02-01T09:54:06+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"/cloud/occ","message":"\\OC\\Updater::appUpgradeStarted: Updating <polls> ...","userAgent":"--","version":"20.0.6.1"}
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":1,"time":"2021-02-01T09:54:06+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"/cloud/occ","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"20.0.6.1"}
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":1,"time":"2021-02-01T09:54:06+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"/cloud/occ","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"20.0.6.1"}
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":1,"time":"2021-02-01T09:54:06+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"/cloud/occ","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"20.0.6.1"}
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":1,"time":"2021-02-01T09:54:06+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"/cloud/occ","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"20.0.6.1"}
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":1,"time":"2021-02-01T09:54:06+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"/cloud/occ","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"20.0.6.1"}
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":1,"time":"2021-02-01T09:54:06+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"/cloud/occ","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"20.0.6.1"}
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":1,"time":"2021-02-01T09:54:06+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"/cloud/occ","message":"\\OC\\Repair::step: Repair step: Delete duplicates","userAgent":"--","version":"20.0.6.1"}
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":3,"time":"2021-02-01T09:54:09+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"/cloud/occ","message":{"Exception":"Doctrine\\DBAL\\Exception\\NotNullConstraintViolationException","Message":"An exception occurred while executing 'ALTER TABLE oc_polls_share CHANGE `user_id` user_id VARCHAR(64) CHARACTER SET utf8mb4 DEFAULT '' NOT NULL COLLATE `utf8mb4_bin`':\n\nSQLSTATE[22004]: Null value not allowed: 1138 Invalid use of NULL value","Code":0,"Trace":[{"file":"/var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php","line":169,"function":"convertException","class":"Doctrine\\DBAL\\Driver\\AbstractMySQLDriver","type":"->"},{"file":"/var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php","line":149,"function":"wrapException","class":"Doctrine\\DBAL\\DBALException","type":"::"},{"file":"/var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":1019,"function":"driverExceptionDuringQuery","class":"Doctrine\\DBAL\\DBALException","type":"::"},{"file":"/var/www/owncloud/lib/private/DB/Migrator.php","line":261,"function":"query","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/owncloud/lib/private/DB/Migrator.php","line":85,"function":"applySchema","class":"OC\\DB\\Migrator","type":"->"},{"file":"/var/www/owncloud/lib/private/DB/Connection.php","line":466,"function":"migrate","class":"OC\\DB\\Migrator","type":"->"},{"file":"/var/www/owncloud/lib/private/DB/MigrationService.php","line":491,"function":"migrateToSchema","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/owncloud/lib/private/DB/MigrationService.php","line":419,"function":"executeStep","class":"OC\\DB\\MigrationService","type":"->"},{"file":"/var/www/owncloud/lib/private/legacy/OC_App.php","line":976,"function":"migrate","class":"OC\\DB\\MigrationService","type":"->"},{"file":"/var/www/owncloud/lib/private/Updater.php","line":379,"function":"updateApp","class":"OC_App","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/owncloud/lib/private/Updater.php","line":258,"function":"doAppUpgrade","class":"OC\\Updater","type":"->"},{"file":"/var/www/owncloud/lib/private/Updater.php","line":130,"function":"doUpgrade","class":"OC\\Updater","type":"->"},{"file":"/var/www/owncloud/core/Command/Upgrade.php","line":255,"function":"upgrade","class":"OC\\Updater","type":"->"},{"file":"/var/www/owncloud/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OC\\Core\\Command\\Upgrade","type":"->"},{"file":"/var/www/owncloud/3rdparty/symfony/console/Application.php","line":1000,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/var/www/owncloud/3rdparty/symfony/console/Application.php","line":271,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/owncloud/3rdparty/symfony/console/Application.php","line":147,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/owncloud/lib/private/Console/Application.php","line":215,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/owncloud/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/owncloud/occ","line":11,"args":["/var/www/owncloud/console.php"],"function":"require_once"}],"File":"/var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php","Line":103,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDOException","Message":"SQLSTATE[22004]: Null value not allowed: 1138 Invalid use of NULL value","Code":"22004","Trace":[{"file":"/var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":1017,"function":"query","class":"Doctrine\\DBAL\\Driver\\PDOConnection","type":"->"},{"file":"/var/www/owncloud/lib/private/DB/Migrator.php","line":261,"function":"query","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/owncloud/lib/private/DB/Migrator.php","line":85,"function":"applySchema","class":"OC\\DB\\Migrator","type":"->"},{"file":"/var/www/owncloud/lib/private/DB/Connection.php","line":466,"function":"migrate","class":"OC\\DB\\Migrator","type":"->"},{"file":"/var/www/owncloud/lib/private/DB/MigrationService.php","line":491,"function":"migrateToSchema","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/owncloud/lib/private/DB/MigrationService.php","line":419,"function":"executeStep","class":"OC\\DB\\MigrationService","type":"->"},{"file":"/var/www/owncloud/lib/private/legacy/OC_App.php","line":976,"function":"migrate","class":"OC\\DB\\MigrationService","type":"->"},{"file":"/var/www/owncloud/lib/private/Updater.php","line":379,"function":"updateApp","class":"OC_App","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/owncloud/lib/private/Updater.php","line":258,"function":"doAppUpgrade","class":"OC\\Updater","type":"->"},{"file":"/var/www/owncloud/lib/private/Updater.php","line":130,"function":"doUpgrade","class":"OC\\Updater","type":"->"},{"file":"/var/www/owncloud/core/Command/Upgrade.php","line":255,"function":"upgrade","class":"OC\\Updater","type":"->"},{"file":"/var/www/owncloud/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OC\\Core\\Command\\Upgrade","type":"->"},{"file":"/var/www/owncloud/3rdparty/symfony/console/Application.php","line":1000,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/var/www/owncloud/3rdparty/symfony/console/Application.php","line":271,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/owncloud/3rdparty/symfony/console/Application.php","line":147,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/owncloud/lib/private/Console/Application.php","line":215,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/owncloud/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/owncloud/occ","line":11,"args":["/var/www/owncloud/console.php"],"function":"require_once"}],"File":"/var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php","Line":83,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[22004]: Null value not allowed: 1138 Invalid use of NULL value","Code":"22004","Trace":[{"file":"/var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php","line":78,"function":"query","class":"PDO","type":"->"},{"file":"/var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":1017,"function":"query","class":"Doctrine\\DBAL\\Driver\\PDOConnection","type":"->"},{"file":"/var/www/owncloud/lib/private/DB/Migrator.php","line":261,"function":"query","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/owncloud/lib/private/DB/Migrator.php","line":85,"function":"applySchema","class":"OC\\DB\\Migrator","type":"->"},{"file":"/var/www/owncloud/lib/private/DB/Connection.php","line":466,"function":"migrate","class":"OC\\DB\\Migrator","type":"->"},{"file":"/var/www/owncloud/lib/private/DB/MigrationService.php","line":491,"function":"migrateToSchema","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/owncloud/lib/private/DB/MigrationService.php","line":419,"function":"executeStep","class":"OC\\DB\\MigrationService","type":"->"},{"file":"/var/www/owncloud/lib/private/legacy/OC_App.php","line":976,"function":"migrate","class":"OC\\DB\\MigrationService","type":"->"},{"file":"/var/www/owncloud/lib/private/Updater.php","line":379,"function":"updateApp","class":"OC_App","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/owncloud/lib/private/Updater.php","line":258,"function":"doAppUpgrade","class":"OC\\Updater","type":"->"},{"file":"/var/www/owncloud/lib/private/Updater.php","line":130,"function":"doUpgrade","class":"OC\\Updater","type":"->"},{"file":"/var/www/owncloud/core/Command/Upgrade.php","line":255,"function":"upgrade","class":"OC\\Updater","type":"->"},{"file":"/var/www/owncloud/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OC\\Core\\Command\\Upgrade","type":"->"},{"file":"/var/www/owncloud/3rdparty/symfony/console/Application.php","line":1000,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/var/www/owncloud/3rdparty/symfony/console/Application.php","line":271,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/owncloud/3rdparty/symfony/console/Application.php","line":147,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/owncloud/lib/private/Console/Application.php","line":215,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/owncloud/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/owncloud/occ","line":11,"args":["/var/www/owncloud/console.php"],"function":"require_once"}],"File":"/var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php","Line":78}},"CustomMessage":"--"},"userAgent":"--","version":"20.0.6.1"}
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":3,"time":"2021-02-01T09:54:09+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"/cloud/occ","message":"\\OC\\Updater::failure: Doctrine\\DBAL\\Exception\\NotNullConstraintViolationException: An exception occurred while executing 'ALTER TABLE oc_polls_share CHANGE `user_id` user_id VARCHAR(64) CHARACTER SET utf8mb4 DEFAULT '' NOT NULL COLLATE `utf8mb4_bin`':\n\nSQLSTATE[22004]: Null value not allowed: 1138 Invalid use of NULL value","userAgent":"--","version":"20.0.6.1"}
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":3,"time":"2021-02-01T09:54:09+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"/cloud/occ","message":"\\OC\\Updater::updateEnd: Update failed","userAgent":"--","version":"20.0.6.1"}
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":1,"time":"2021-02-01T09:54:09+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"/cloud/occ","message":"\\OC\\Updater::maintenanceActive: Maintenance mode is kept active","userAgent":"--","version":"20.0.6.1"}
{"reqId":"ROIXqwNo71wBR9UTmK7t","level":1,"time":"2021-02-01T09:54:09+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"/cloud/occ","message":"\\OC\\Updater::resetLogLevel: Reset log level to Error(3)","userAgent":"--","version":"20.0.6.1"}
Confirmed - have exactly the same problem. Same error message. Cannot access Nextcloud after failed polls update.
Removing the polls folder in nextcloud/apps let you finish the upgrade and bring the instance back. However, polls can not be reenabled.
A little less force is disabling the app with occ.
Great. The migration was well tested, but ... .
Can you send me a dump of the table oc_polls_share?
Upload is possible here: https://nc.yagst.de/s/GpWbWDJ5DBqgN4t (write-only)
Should be there.
There is an invalid record in your table containig a share without type and user_id (second record).
The migration should run through, if this record gets deleted.
I will enhance the migration step and delete these records.
@tacruc But this causes the error in #1376.
Nonsense. This is the right issue.
There is an invalid record in your table containig a share without type and user_id (second record).
The migration should run through, if this record gets deleted.
I will enhance the migration step and delete these records.
fyi: in my case, oc_polls_share is empty (I have the App installed but never used it).
I this
@tacruc But this causes the error in #1376.
Nonsense. This is the right issue.
I think this is a duplicate of #1376.
@tacruc Is your issue fixed?
@dartcafe I tried with sudo -u www-data ./occ app:enable polls and still got
An exception occurred while executing 'ALTER TABLE oc_polls_share CHANGE `user_id` user_id VARCHAR(64) CHARACTER SET utf8mb4 DEFAULT '' NOT NULL COLLATE `utf8mb4_bin`':
SQLSTATE[22004]: Null value not allowed: 1138 Invalid use of NULL value
Do I have to do anything special to test? (sudo -u www-data ./occ app:update --all was not enough)
That won't help, because the error happens in the migration.
Think there is an error in the table. I try to fix the migration.
@tacruc Is your issue fixed?
Yes thanks.
In my table, there is following content (with replaced sensitive data):
mysql> select * from oc_polls_share;
+----+------------------+-------+---------+--------------+-----------------+--------------+---------------+
| id | token | type | poll_id | user_id | invitation_sent | display_name | email_address |
+----+------------------+-------+---------+--------------+-----------------+--------------+---------------+
| 1 | *SENSITIVE* | group | 1 | *SENSITIVE* | 1 | | NULL |
| 2 | *SENSITIVE* | | 1 | NULL | 2 | | NULL |
| 3 | *SENSITIVE* | group | 2 | *SENSITIVE* | 3 | | NULL |
| 4 | *SENSITIVE* | group | 2 | *SENSITIVE* | 4 | | NULL |
+----+------------------+-------+---------+--------------+-----------------+--------------+---------------+
4 rows in set (0.00 sec)
Delete the second entry, this should help. But I am wondering, how these entries could happen. Same as @tacruc
Next time hide the tokens, too. Actually no problem, because they are group shares, but the token is a secret.
Ahh, my stalled polls update produced another error message than the one reported by JochenHWezel. I didn't read his issue careful enough.
The affected table in my case was oc_polls_options and the error was about an invalid key length. Unfortunately I meanwhile removed the polls folder from the App folder and cannot reproduce the exact error message.
All oc_polls_ tables were empty in my database, as I never used polls.
This just for information, I will not start a new issue and I am not affected by this one - closed for me.
@andreasklostermaier Regarding your issue, please check #1375
Thanks to @dartcafe . Now it works for me after following commands bringing back my (temporay) disabled polls app:
sudo -u www-data php occ app:update polls
sudo -u www-data php occ app:enable polls
Hello
I've tried to upgrade polls app yesterday and I've had an error similar to the one described in this issue that broke access to the nextcloud server.
I had to disable polls app in cli, to access my nextcloud server again.
Here is the error when I want to re enable polls app:
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE oc_polls_votes CHANGE user_id user_id VARCHAR(64) CHARACTER SET utf8mb4 DEFAULT '' NOT NULL COLLATE utf8mb4_bin, CHANGE vote_option_text vote_option_text VARCHAR(256) CHARACTER SET utf8mb4 DEFAULT '' NOT NULL COLLATE utf8mb4_bin': SQLSTATE[01000]: Warning: 1265 Data truncated for column 'vote_option_text' at row 1
What can I do to re enable this app?
Thanks for your answers
Please do not comment in closed issues. Your request could be missed easily. New issues get more attention.
Most helpful comment
There is an invalid record in your table containig a share without type and user_id (second record).
The migration should run through, if this record gets deleted.
I will enhance the migration step and delete these records.