nextcloud / server

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

do not update apps when new version is incompatible with current installation #28239

Closed robje closed 3 years ago

robje commented 3 years ago

How to use GitHub

Steps to reproduce

  1. install (or have running) nextcloud on 32-bit system
  2. update app news app to 16.0.0 (requires 64-bit integer)
  3. update fails
  4. end up with completely broken nextcloud installation

Expected behaviour

When the app version to upgrade to is incompatible with the current nextcloud installation, disable upgrade

Actual behaviour

upgrade is possible breaking nextcloud entirely

Server configuration

Hardware: kobol.io helios4 (32-bit armhf)

Operating system: Debian 11 (buster)

Web server: Apache 2.4.48-3.1 (debian repository)

Database: mariadb 1:10.5.10-2 (debian repository)

PHP version: 7.4.21-1+deb11u1 (debian repository)

Nextcloud version: (see Nextcloud admin page) 21.0.3

Updated from an older Nextcloud/ownCloud or fresh install: installation from the owncloud days

Where did you install Nextcloud from: unknown

Signing status:

Signing status ``` No errors have been found. ```

List of activated apps:

App list ``` Enabled: - accessibility: 1.7.0 - activity: 2.14.3 - bruteforcesettings: 2.2.0 - calendar: 2.3.1 - cloud_federation_api: 1.4.0 - comments: 1.11.0 - contacts: 4.0.1 - contactsinteraction: 1.2.0 - cookbook: 0.8.4 - dashboard: 7.1.0 - dav: 1.17.1 - deck: 1.4.3 - federatedfilesharing: 1.11.0 - federation: 1.11.0 - files: 1.16.0 - files_external: 1.12.0 - files_pdfviewer: 2.1.0 - files_rightclick: 1.0.0 - files_sharing: 1.13.1 - files_texteditor: 2.14.0 - files_trashbin: 1.11.0 - files_versions: 1.14.0 - files_videoplayer: 1.10.0 - firstrunwizard: 2.10.0 - gpxpod: 4.2.8 - integration_discourse: 1.0.0 - integration_github: 1.0.0 - integration_gitlab: 1.0.0 - logreader: 2.6.0 - lookup_server_connector: 1.9.0 - metadata: 0.14.0 - news: 15.4.5 - nextcloud_announcements: 1.10.0 - notes: 4.1.0 - notifications: 2.9.0 - oauth2: 1.9.0 - password_policy: 1.11.0 - photos: 1.3.0 - privacy: 1.5.0 - provisioning_api: 1.11.0 - qownnotesapi: 21.7.0 - recommendations: 1.0.0 - serverinfo: 1.11.0 - settings: 1.3.0 - sharebymail: 1.11.0 - support: 1.4.0 - survey_client: 1.9.0 - systemtags: 1.11.0 - tasks: 0.14.0 - text: 3.2.0 - theming: 1.12.0 - twofactor_backupcodes: 1.10.0 - updatenotification: 1.11.0 - user_status: 1.1.1 - viewer: 1.5.0 - weather_status: 1.1.0 - workflowengine: 2.3.0 Disabled: - admin_audit - encryption - user_ldap ```

Nextcloud configuration:

Config report ``` { "system": { "debug": false, "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "owncloud.renf.us", "owncloud.yi.org", "cloud.renf.us" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "overwrite.cli.url": "https:\/\/cloud.renf.us", "dbtype": "mysql", "version": "21.0.3.1", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "logtimezone": "UTC", "installed": true, "mail_smtpmode": "sendmail", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "updatechecker": false, "maintenance": false, "loglevel": "1", "appstore.experimental.enabled": true, "theme": "", "htaccess.RewriteBase": "\/", "memcache.local": "\\OC\\Memcache\\APCu", "updater.release.channel": "stable", "mysql.utf8mb4": true, "default_phone_region": "NL" } } ```

Are you using external storage, if yes which one: no

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser:

Operating system:

Logs

Web server error log

Web server error log ``` not really applicable here. Logs show 503 errors after attempt to upgrade. ```

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` {"reqId":"HnJUXyDTSBHXwCB1gczl","level":1,"time":"2021-07-29T11:41:28+00:00","remoteAddr":"192.168.206.165","user":"--","app":"no app in context","method":"PUT","url":"/apps/user_status/heartbeat","message":{"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"ocs.files.DirectEditing.info\" as such route does not exist.","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":365,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/CachingRouter.php","line":60,"function":"generate","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/lib/private/URLGenerator.php","line":101,"function":"generate","class":"OC\\Route\\CachingRouter","type":"->"},{"file":"/var/www/nextcloud/apps/files/lib/Capabilities.php","line":72,"function":"linkToOCSRouteAbsolute","class":"OC\\URLGenerator","type":"->"},{"file":"/var/www/nextcloud/lib/private/CapabilitiesManager.php","line":72,"function":"getCapabilities","class":"OCA\\Files\\Capabilities","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSConfigHelper.php","line":183,"function":"getCapabilities","class":"OC\\CapabilitiesManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/TemplateLayout.php","line":211,"function":"getConfig","class":"OC\\Template\\JSConfigHelper","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":183,"function":"__construct","class":"OC\\TemplateLayout","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":397,"function":"printPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":949,"function":"printUpgradePage","class":"OC","type":"::"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/3rdparty/symfony/routing/Generator/UrlGenerator.php","Line":143,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0","version":"21.0.3.1"} {"reqId":"HnJUXyDTSBHXwCB1gczl","level":1,"time":"2021-07-29T11:41:28+00:00","remoteAddr":"192.168.206.165","user":"--","app":"no app in context","method":"PUT","url":"/apps/user_status/heartbeat","message":{"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"cloud_federation_api.RequestHandler.addShare\" as such route does not exist.","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":365,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/CachingRouter.php","line":60,"function":"generate","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/lib/private/URLGenerator.php","line":85,"function":"generate","class":"OC\\Route\\CachingRouter","type":"->"},{"file":"/var/www/nextcloud/lib/private/URLGenerator.php","line":97,"function":"linkToRoute","class":"OC\\URLGenerator","type":"->"},{"file":"/var/www/nextcloud/apps/cloud_federation_api/lib/Capabilities.php","line":45,"function":"linkToRouteAbsolute","class":"OC\\URLGenerator","type":"->"},{"file":"/var/www/nextcloud/lib/private/CapabilitiesManager.php","line":72,"function":"getCapabilities","class":"OCA\\CloudFederationAPI\\Capabilities","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSConfigHelper.php","line":183,"function":"getCapabilities","class":"OC\\CapabilitiesManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/TemplateLayout.php","line":211,"function":"getConfig","class":"OC\\Template\\JSConfigHelper","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":183,"function":"__construct","class":"OC\\TemplateLayout","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":397,"function":"printPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":949,"function":"printUpgradePage","class":"OC","type":"::"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/3rdparty/symfony/routing/Generator/UrlGenerator.php","Line":143,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0","version":"21.0.3.1"} {"reqId":"HnJUXyDTSBHXwCB1gczl","level":1,"time":"2021-07-29T11:41:28+00:00","remoteAddr":"192.168.206.165","user":"--","app":"no app in context","method":"PUT","url":"/apps/user_status/heartbeat","message":{"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"ocs.password_policy.API.generate\" as such route does not exist.","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":365,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/CachingRouter.php","line":60,"function":"generate","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/lib/private/URLGenerator.php","line":101,"function":"generate","class":"OC\\Route\\CachingRouter","type":"->"},{"file":"/var/www/nextcloud/apps/password_policy/lib/Capabilities.php","line":57,"function":"linkToOCSRouteAbsolute","class":"OC\\URLGenerator","type":"->"},{"file":"/var/www/nextcloud/lib/private/CapabilitiesManager.php","line":72,"function":"getCapabilities","class":"OCA\\Password_Policy\\Capabilities","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSConfigHelper.php","line":183,"function":"getCapabilities","class":"OC\\CapabilitiesManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/TemplateLayout.php","line":211,"function":"getConfig","class":"OC\\Template\\JSConfigHelper","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":183,"function":"__construct","class":"OC\\TemplateLayout","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":397,"function":"printPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":949,"function":"printUpgradePage","class":"OC","type":"::"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/3rdparty/symfony/routing/Generator/UrlGenerator.php","Line":143,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0","version":"21.0.3.1"} {"reqId":"HnJUXyDTSBHXwCB1gczl","level":1,"time":"2021-07-29T11:41:28+00:00","remoteAddr":"192.168.206.165","user":"--","app":"no app in context","method":"PUT","url":"/apps/user_status/heartbeat","message":{"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"ocs.password_policy.API.validate\" as such route does not exist.","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":365,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/CachingRouter.php","line":60,"function":"generate","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/lib/private/URLGenerator.php","line":101,"function":"generate","class":"OC\\Route\\CachingRouter","type":"->"},{"file":"/var/www/nextcloud/apps/password_policy/lib/Capabilities.php","line":58,"function":"linkToOCSRouteAbsolute","class":"OC\\URLGenerator","type":"->"},{"file":"/var/www/nextcloud/lib/private/CapabilitiesManager.php","line":72,"function":"getCapabilities","class":"OCA\\Password_Policy\\Capabilities","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/JSConfigHelper.php","line":183,"function":"getCapabilities","class":"OC\\CapabilitiesManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/TemplateLayout.php","line":211,"function":"getConfig","class":"OC\\Template\\JSConfigHelper","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":183,"function":"__construct","class":"OC\\TemplateLayout","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":397,"function":"printPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":949,"function":"printUpgradePage","class":"OC","type":"::"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/3rdparty/symfony/routing/Generator/UrlGenerator.php","Line":143,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0","version":"21.0.3.1"} ```
kesselb commented 3 years ago

Thanks for reporting :+1:

Closing in favour of https://github.com/nextcloud/server/issues/27797.