nextcloud / server

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

Prevent app update if requirements are not met #27797

Open LeSpocky opened 3 years ago

LeSpocky commented 3 years ago

How to use GitHub

Steps to reproduce

  1. Install Nextcloud on a 32-bit host system
  2. Install app news version up to 15.x (NOT 16.x or higher)
  3. Upgrade app through web ui or commandline

Expected behaviour

The news app requires a 64-bit host system. This requirement should be checked before updating the app. Update should be prevented if requirement is not met.

Actual behaviour

Update is tried, however "news" presents a message, requirements are not met and suggests to run "occ upgrade", which has no effect, because the same broken news app is installed. You can not recover from web ui, there's no rollback, you can not deactivate the app. See https://github.com/nextcloud/news/issues/1423 for details.

Server configuration

Operating system: Debian GNU/Linux 10 (buster), i686 arch (32bit)

Web server: lighttpd/1.4.59

Database: MariaDB 10.3.29

PHP version: 7.3.27

Nextcloud version: 21.0.3

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

Where did you install Nextcloud from: tarball

Signing status:

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

List of activated apps:

App list ``` Enabled: - accessibility: 1.7.0 - activity: 2.14.3 - admin_audit: 1.11.0 - audioplayer: 3.1.0 - bookmarks: 4.2.2 - bruteforcesettings: 2.2.0 - calendar: 2.3.0 - cloud_federation_api: 1.4.0 - comments: 1.11.0 - contacts: 3.5.1 - contactsinteraction: 1.2.0 - cookbook: 0.8.4 - dashboard: 7.1.0 - dav: 1.17.1 - deck: 1.4.2 - federatedfilesharing: 1.11.0 - federation: 1.11.0 - files: 1.16.0 - files_antivirus: 3.2.1 - files_external: 1.12.0 - files_markdown: 2.3.3 - files_pdfviewer: 2.1.0 - files_rightclick: 1.0.0 - files_sharing: 1.13.1 - files_trashbin: 1.11.0 - files_versions: 1.14.0 - files_videoplayer: 1.10.0 - firstrunwizard: 2.10.0 - keeweb: 0.6.5 - logreader: 2.6.0 - lookup_server_connector: 1.9.0 - maps: 0.1.8 - 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: 20.9.0 - recommendations: 1.0.0 - serverinfo: 1.11.0 - settings: 1.3.0 - sharebymail: 1.11.0 - social: 0.4.2 - spreed: 11.2.2 - support: 1.4.0 - survey_client: 1.9.0 - suspicious_login: 4.0.0 - systemtags: 1.11.0 - tasks: 0.13.6 - text: 3.2.0 - theming: 1.12.0 - twofactor_backupcodes: 1.10.0 - twofactor_totp: 6.1.0 - updatenotification: 1.11.0 - user_status: 1.1.1 - viewer: 1.5.0 - weather_status: 1.1.0 - workflowengine: 2.3.0 Disabled: - analytics - checksum - encryption - gpxpod - news - ojsxc - ransomware_detection - ransomware_protection - 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, …) ```

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

Are you using encryption: no

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

Client configuration

Browser: Firefox

Operating system: Debian GNU/Linux

kesselb commented 3 years ago

Closing as per https://github.com/nextcloud/news/issues/1423#issuecomment-874074128

ValdarXY commented 3 years ago

I ran into the same issue using Nextcloud version 20.0.11

keunes commented 3 years ago

Just to chip in that I am also affected: my Nextcloud app upgraded without problem to version 16, even though Nextcloud is running on an official Raspbian OS in 32-bit, which had been explicitly set by the app maintainers. Now I'm running into a bug with the app, because of this platform issue.

Not a huge problem for me - but hoping no businesses using & relying on apps accidentally render their instance unusable.

robje commented 3 years ago

sorry for the duplicate. didn't search hard enough.

ran into the same issue on a 32-bit armhf platform (kobol.io helios4)

work-around was

occ app:disable news
ValdarXY commented 2 years ago

Just updated to NC 22.2.0 on my 32-bit-server - update to news-16 which only supports 64bit-servers is still offered

bcutter commented 2 years ago

Just updated to NC 22.2.0 on my 32-bit-server - update to news-16 which only supports 64bit-servers is still offered

Confirmed (NC v22.2.3.0). It's so annoying and chances are good an accidental update is performed sooner or later. Hitting the "update all" button is dangerous. Every single core/server update is a pain in the ass as we need to avoid the app being updated (by not forgetting to disable the app prior starting the server update and reenabling it afterwards). Really starting to get inacceptable inconvenient. Takes so much time for a database restore/rollback in case the app has accidentally been updated. Nothing normal users can handle. On. Every. Server. Update.

Please do not offer app updates if the requirements (in this case: platform compatibility) are not met. It could instead just be shown as "up to date".

szaimen commented 2 years ago

Closing due to https://github.com/nextcloud/documentation/pull/9071

LeSpocky commented 2 years ago

Closing due to nextcloud/documentation#9071

Sorry @szaimen, but in what way is a recommendation in documentation preventing the issue here? That change is not adding any checks in code which the requirements for an app are and if they are met. Please reopen!

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+

bcutter commented 1 year ago

What kind of information do you need?

Server simply still does not block app updates which have unmet dependencies (like needing a 64 bit OS, specific PHP version etc. etc.) but allow to install them which breaks things (and rollbacks are nearly impossible especially in terms of database rollbacks, so basically backup restoration is needed which is very time-consuming and painful), so let's start at the source:

Those updates should be blocked or at least hidden so they can not "accidentally" (like using Update all apps in the UI or the OCC command) be installed.


For example I am running NC v25.0.3.2 and Nextcloud News Update is still offered (stuck at 15 series while v20.0.0 is "available to break my system").