nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.63k stars 3.99k forks source link

TypeError during update integrity check #28607

Closed pprkut closed 1 year ago

pprkut commented 3 years ago

How to use GitHub

Steps to reproduce

  1. Update from nextcloud 21.0.1 to 22.1.0
  2. Run php occ upgrade

Expected behaviour

No Error

Actual behaviour

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
Disabled incompatible app: cookbook
Disabled incompatible app: impersonate
Disabled incompatible app: previewgenerator
Disabled incompatible app: spreed
Updating <password_policy> ...
Updated <password_policy> to 1.12.0
Updating <activity> ...
Updated <activity> to 2.15.0
Updating <dav> ...
Fix broken values of calendar objects

 Done
    0/0 [->--------------------------]   0%
Updated <dav> to 1.18.0
Updating <files_sharing> ...
Updated <files_sharing> to 1.13.2
Updating <firstrunwizard> ...
Updated <firstrunwizard> to 2.11.0
Updating <nextcloud_announcements> ...
Updated <nextcloud_announcements> to 1.11.0
Updating <notifications> ...
Updated <notifications> to 2.10.1
Updating <files_pdfviewer> ...
Updated <files_pdfviewer> to 2.3.0
Updating <files_rightclick> ...
Updated <files_rightclick> to 1.1.0
Updating <files_videoplayer> ...
Updated <files_videoplayer> to 1.11.0
Updating <logreader> ...
Updated <logreader> to 2.7.0
Updating <photos> ...
Updated <photos> to 1.4.0
Updating <privacy> ...
Updated <privacy> to 1.6.0
Updating <recommendations> ...
Updated <recommendations> to 1.1.0
Updating <serverinfo> ...
Updated <serverinfo> to 1.12.0
Updating <support> ...
Updated <support> to 1.5.0
Updating <survey_client> ...
Updated <survey_client> to 1.10.0
Updating <text> ...
Updated <text> to 3.3.0
Updating <twofactor_backupcodes> ...
Updated <twofactor_backupcodes> to 1.10.1
Updating <viewer> ...
Updated <viewer> to 1.6.0
Checking for update of app accessibility in appstore
Checked for update of app "accessibility" in App Store 
Checking for update of app activity in appstore
Checked for update of app "activity" in App Store 
Checking for update of app audioplayer in appstore
Checked for update of app "audioplayer" in App Store 
Checking for update of app bookmarks in appstore
Checked for update of app "bookmarks" in App Store 
Checking for update of app calendar in appstore
Checked for update of app "calendar" in App Store 
Checking for update of app cloud_federation_api in appstore
Checked for update of app "cloud_federation_api" in App Store 
Checking for update of app comments in appstore
Checked for update of app "comments" in App Store 
Checking for update of app contacts in appstore
Update app contacts from App Store
Checked for update of app "contacts" in App Store 
Checking for update of app contactsinteraction in appstore
Checked for update of app "contactsinteraction" in App Store 
Checking for update of app dashboard in appstore
Checked for update of app "dashboard" in App Store 
Checking for update of app dav in appstore
Checked for update of app "dav" in App Store 
Checking for update of app federatedfilesharing in appstore
Checked for update of app "federatedfilesharing" in App Store 
Checking for update of app federation in appstore
Checked for update of app "federation" in App Store 
Checking for update of app files in appstore
Checked for update of app "files" in App Store 
Checking for update of app files_pdfviewer in appstore
Checked for update of app "files_pdfviewer" in App Store 
Checking for update of app files_rightclick in appstore
Checked for update of app "files_rightclick" in App Store 
Checking for update of app files_sharing in appstore
Checked for update of app "files_sharing" in App Store 
Checking for update of app files_trashbin in appstore
Checked for update of app "files_trashbin" in App Store 
Checking for update of app files_versions in appstore
Checked for update of app "files_versions" in App Store 
Checking for update of app files_videoplayer in appstore
Checked for update of app "files_videoplayer" in App Store 
Checking for update of app firstrunwizard in appstore
Checked for update of app "firstrunwizard" in App Store 
Checking for update of app logreader in appstore
Checked for update of app "logreader" in App Store 
Checking for update of app lookup_server_connector in appstore
Checked for update of app "lookup_server_connector" in App Store 
Checking for update of app metadata in appstore
Checked for update of app "metadata" in App Store 
Checking for update of app news in appstore
Checked for update of app "news" in App Store 
Checking for update of app nextcloud_announcements in appstore
Checked for update of app "nextcloud_announcements" in App Store 
Checking for update of app notes in appstore
Checked for update of app "notes" in App Store 
Checking for update of app notifications in appstore
Checked for update of app "notifications" in App Store 
Checking for update of app oauth2 in appstore
Checked for update of app "oauth2" in App Store 
Checking for update of app password_policy in appstore
Checked for update of app "password_policy" in App Store 
Checking for update of app photos in appstore
Checked for update of app "photos" in App Store 
Checking for update of app privacy in appstore
Checked for update of app "privacy" in App Store 
Checking for update of app provisioning_api in appstore
Checked for update of app "provisioning_api" in App Store 
Checking for update of app recommendations in appstore
Checked for update of app "recommendations" in App Store 
Checking for update of app serverinfo in appstore
Checked for update of app "serverinfo" in App Store
Checking for update of app settings in appstore
Checked for update of app "settings" in App Store
Checking for update of app sharebymail in appstore
Checked for update of app "sharebymail" in App Store
Checking for update of app support in appstore
Checked for update of app "support" in App Store
Checking for update of app survey_client in appstore
Checked for update of app "survey_client" in App Store
Checking for update of app systemtags in appstore
Checked for update of app "systemtags" in App Store
Checking for update of app text in appstore
Checked for update of app "text" in App Store
Checking for update of app theming in appstore
Checked for update of app "theming" in App Store
Checking for update of app twofactor_backupcodes in appstore
Checked for update of app "twofactor_backupcodes" in App Store
Checking for update of app updatenotification in appstore
Checked for update of app "updatenotification" in App Store
Checking for update of app user_status in appstore
Checked for update of app "user_status" in App Store
Checking for update of app viewer in appstore
Checked for update of app "viewer" in App Store
Checking for update of app weather_status in appstore
Checked for update of app "weather_status" in App Store
Checking for update of app workflowengine in appstore
Checked for update of app "workflowengine" in App Store
Checking for update of app cookbook in appstore
Checked for update of app "cookbook" in App Store
Checking for update of app impersonate in appstore
Update app impersonate from App Store
Checked for update of app "impersonate" in App Store
Checking for update of app previewgenerator in appstore
Checked for update of app "previewgenerator" in App Store
Checking for update of app spreed in appstore
Update app spreed from App Store
Checked for update of app "spreed" in App Store
Starting code integrity check...
An unhandled exception has been thrown:
TypeError: explode() expects parameter 2 to be string, bool given in /var/www/apps/nextcloud-22.1.0/lib/private/IntegrityCheck/Checker.php:195
Stack trace:
#0 /var/www/apps/nextcloud-22.1.0/lib/private/IntegrityCheck/Checker.php(195): explode()
#1 /var/www/apps/nextcloud-22.1.0/lib/private/IntegrityCheck/Checker.php(388): OC\IntegrityCheck\Checker->generateHashes()
#2 /var/www/apps/nextcloud-22.1.0/lib/private/IntegrityCheck/Checker.php(570): OC\IntegrityCheck\Checker->verify()
#3 /var/www/apps/nextcloud-22.1.0/lib/private/IntegrityCheck/Checker.php(591): OC\IntegrityCheck\Checker->verifyCoreSignature()
#4 /var/www/apps/nextcloud-22.1.0/lib/private/Updater.php(293): OC\IntegrityCheck\Checker->runInstanceVerification()
#5 /var/www/apps/nextcloud-22.1.0/lib/private/Updater.php(130): OC\Updater->doUpgrade()
#6 /var/www/apps/nextcloud-22.1.0/core/Command/Upgrade.php(241): OC\Updater->upgrade()
#7 /var/www/apps/nextcloud-22.1.0/apps/bookmarks/vendor/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute()
#8 /var/www/apps/nextcloud-22.1.0/apps/bookmarks/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#9 /var/www/apps/nextcloud-22.1.0/apps/bookmarks/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#10 /var/www/apps/nextcloud-22.1.0/apps/bookmarks/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#11 /var/www/apps/nextcloud-22.1.0/lib/private/Console/Application.php(209): Symfony\Component\Console\Application->run()
#12 /var/www/apps/nextcloud-22.1.0/console.php(99): OC\Console\Application->run()
#13 /var/www/apps/nextcloud-22.1.0/occ(11): require_once('/var/www/apps/n...')
#14 {main}

Server configuration

Operating system: Slackware64-current (post 15.0 rc1)

Web server: nginx 1.20.1

Database: MariaDB 10.5.12

PHP version: PHP 7.4.23

Nextcloud version: (see Nextcloud admin page) Nextcloud 22.1.0

Updated from an older Nextcloud/ownCloud or fresh install: Updated from 21.0.1

Where did you install Nextcloud from: Zip file

Signing status:

Signing status ``` Login as admin user into your Nextcloud and access http://example.com/index.php/settings/integrity/failed paste the results here. ```

List of activated apps:

App list ``` If you have access to your command line run e.g.: sudo -u www-data php occ app:list from within your Nextcloud installation folder ``` ``` 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.7.0 - activity: 2.15.0 - audioplayer: 3.2.1 - bookmarks: 4.4.1 - calendar: 2.3.2 - circles: 22.1.0 - cloud_federation_api: 1.4.0 - comments: 1.11.0 - contacts: 4.0.2 - contactsinteraction: 1.2.0 - dashboard: 7.1.0 - dav: 1.18.0 - federatedfilesharing: 1.11.0 - federation: 1.11.0 - files: 1.16.0 - files_pdfviewer: 2.3.0 - files_rightclick: 1.1.0 - files_sharing: 1.13.2 - files_trashbin: 1.11.0 - files_versions: 1.14.0 - files_videoplayer: 1.11.0 - firstrunwizard: 2.11.0 - impersonate: 1.9.0 - logreader: 2.7.0 - lookup_server_connector: 1.9.0 - metadata: 0.14.0 - news: 16.0.1 - nextcloud_announcements: 1.11.0 - notes: 4.1.1 - notifications: 2.10.1 - oauth2: 1.9.0 - password_policy: 1.12.0 - photos: 1.4.0 - privacy: 1.6.0 - provisioning_api: 1.11.0 - recommendations: 1.1.0 - serverinfo: 1.12.0 - settings: 1.3.0 - sharebymail: 1.11.0 - spreed: 12.0.1 - support: 1.5.0 - survey_client: 1.10.0 - systemtags: 1.11.0 - text: 3.3.0 - theming: 1.12.0 - twofactor_backupcodes: 1.10.1 - updatenotification: 1.11.0 - user_status: 1.1.1 - viewer: 1.6.0 - weather_status: 1.1.0 - workflowengine: 2.3.0 Disabled: - admin_audit - bruteforcesettings - cookbook - encryption - files_external - previewgenerator - user_ldap ``` **Nextcloud configuration:**
Config report ``` If you have access to your command line run e.g.: sudo -u www-data php occ config:list system from within your Nextcloud installation folder or Insert your config.php content here. Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …) ``` ``` 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": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "cloud.example.com", "cloud.example.nl" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "21.0.1.1", "overwrite.cli.url": "https:\/\/cloud.example.com", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "mail_smtpmode": "sendmail", "mail_sendmailmode": "smtp", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "filelocking.enabled": true, "memcache.locking": "\\OC\\Memcache\\Redis", "memcache.local": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0, "timeout": 0 }, "maintenance": true, "enable_previews": true, "enabledPreviewProviders": [ "OC\\Preview\\TXT", "OC\\Preview\\MarkDown", "OC\\Preview\\PDF", "OC\\Preview\\Image", "OC\\Preview\\Photoshop", "OC\\Preview\\TIFF", "OC\\Preview\\SVG", "OC\\Preview\\MP3", "OC\\Preview\\Movie", "OC\\Preview\\MKV", "OC\\Preview\\MP4", "OC\\Preview\\AVI" ], "theme": "", "loglevel": 0, "default_phone_region": "NL" } } ``` **Are you using external storage, if yes which one:** local/smb/sftp/... local **Are you using encryption:** yes/no no **Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/... no ### Logs #### Web server error log
Web server error log ``` Insert your webserver log here ```
#### Nextcloud log (data/nextcloud.log)
Nextcloud log ``` Insert your Nextcloud log here ```
#### Browser log
Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
pprkut commented 3 years ago

Permissions for .htaccess in the new dir were not good. Setting the correct permissions fixes the error. That's not immediately obvious from the error message though, so perhaps the error handling there can be improved?

szaimen commented 1 year ago

Hi, please update to 24.0.9 or better 25.0.3 and report back if it fixes the issue. Thank you!

My goal is to add a label like e.g. 25-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort!

If you don't manage to reproduce the issue in time and the issue gets closed but you can reproduce the issue afterwards, feel free to create a new bug report with up-to-date information by following this link: https://github.com/nextcloud/server/issues/new?assignees=&labels=bug%2C0.+Needs+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+

joho1968 commented 1 year ago

So, this becomes a problem when you want to go from a very old Nextcloud, 20.x, to, say Nextcloud 26.x, since you have to manually upgrade it along every single major release:

You cannot skip major releases. Please re-run the upgrade until you have reached the highest available (or applicable) release. Example: 18.0. 5 -> 18.0. 11 -> 19.0.

Since this issue is present in the 21.x release archive downloadable from Nextcloud ... you can't get past 21.x on your way to 26.x ... :thinking: