Nextcloud upgrade repeated failure due to incompatible NC apps with v32 (but thankfully clean restore now)

What app is this about, and its version: Nextcloud 31.0.11~ynh1
What YunoHost version are you running: YunoHost 12.1.39 (stable).
What type of hardware are you using: Old laptop or computer

Describe your issue

I am unable to uograde my current version of Nextcloud. In the past this was always a simple one to upgrade but that is no longer the case. I have made sure that all Apps within Nextcloud are up to date, all my YNH is up to date and all is working well. However, every time I try to upgrade it fails. Previously the automated restore from backup would fail but that now seems to be fixed after I applied som other fixes (e.g. Yarn key) . I’ve hit a bit of a brickwall and can’t see anything similar in other cases. Any help is really welcomed!

Share relevant logs or error messages

https://paste.yunohost.org/raw/wiyaremehi

I just spotted this buried in the logs “installed_apps_not_compatible_with_future_version=”. Now I do seem to remember another case on here refering to something similar and mentioning some setting you can apply through the Nextcloud UI to highlight these Apps but I cannot find any such switch. Has anyone else seen this before?

Based on another item in here I ran this command (from Alexs) to see what app are active in Nextcloud:-
cd /var/www/nextcloud

sudo -u nextcloud php --define apc.enable_cli=1 occ --no-interaction --no-ansi app:list

This gives me a list of active and deactivated apps (below) but how do I know which one is causing the issue?

Enabled:

  • activity: 4.0.0
  • app_api: 5.0.2
  • bruteforcesettings: 4.0.0
  • calendar: 5.5.15
  • circles: 31.0.0
  • cloud_federation_api: 1.14.0
  • comments: 1.21.0
  • contacts: 7.3.16
  • contactsinteraction: 1.12.1
  • dashboard: 7.11.0
  • dav: 1.33.0
  • federatedfilesharing: 1.21.0
  • federation: 1.21.0
  • files: 2.3.1
  • files_downloadlimit: 4.0.0
  • files_external: 1.23.0
  • files_pdfviewer: 4.0.0
  • files_reminders: 1.4.0
  • files_sharing: 1.23.2
  • files_trashbin: 1.21.0
  • files_versions: 1.24.0
  • firstrunwizard: 4.0.0
  • logreader: 4.0.0
  • lookup_server_connector: 1.19.0
  • nextcloud_announcements: 3.0.0
  • notifications: 4.0.0
  • oauth2: 1.19.1
  • password_policy: 3.0.0
  • photos: 4.0.0
  • privacy: 3.0.0
  • profile: 1.0.0
  • provisioning_api: 1.21.0
  • related_resources: 2.0.0
  • richdocuments: 8.7.8
  • richdocumentscode: 25.4.902
  • serverinfo: 3.0.0
  • settings: 1.14.0
  • sharebymail: 1.21.0
  • spreed: 21.1.9
  • support: 3.0.0
  • survey_client: 3.0.0
  • systemtags: 1.21.1
  • text: 5.0.2
  • theming: 2.6.1
  • twofactor_backupcodes: 1.20.0
  • updatenotification: 1.21.0
  • user_ldap: 1.22.0
  • user_status: 1.11.0
  • viewer: 4.0.0
  • weather_status: 1.11.0
  • webhook_listeners: 1.2.0
  • workflowengine: 2.13.0
    Disabled:
  • admin_audit: 1.21.0
  • encryption: 2.19.0
  • recommendations: 4.0.0 (installed 4.0.0)
  • suspicious_login: 9.0.1
  • twofactor_nextcloud_notification: 5.0.0
  • twofactor_totp: 13.0.0-dev.0

I see there is a command to delete an app on the CLI (below) but how do I know which one is the problem (and hopefully is one I won’t miss).

cd /var/www/nextcloud

sudo -u nextcloud php --define apc.enable_cli=1 /var/www/nextcloud/occ app:remove APPNAME

example:-

sudo -u nextcloud php --define apc.enable_cli=1 /var/www/nextcloud/occ app:remove breezedark

I wonder if I can spot the culprit on here:-

I found a match !! app_api . But what does it do and can I live without it? I suppose there is only one way of finding out…

I have disabled the App called app_api in the Nextcloud app interface. Let’s see if I can live without it operating for a day and then see if the upgrade works. If not I can use the command to remove the app from Nextcloud. I suggest the latter as I see upgrades sometimes fail if an app is incompatible and disabled !

Of course, it could be that I do need this app and I suppose I will then have to avoid upgrading until the app developers have upgraded their code to be compatiblle with Nextcloud v32 .

It all seemed to be working OK so I couldn’t wait and tried the update again. This time it failed with a fairly fundamental problem. Not sure what is wrong, perhaps I will try again later.

https://paste.yunohost.org/raw/pijiwuzumu

Well the update worked better BUT still the same problem. It looks like I may need to manually remove the app as just disabling it doesn’t help.

https://paste.yunohost.org/raw/nahoritepa

Darn it, I cant delete that app either with or without it being enabled. Apparently it’s a “shipped app” so can’t be deleted. Yet if I am correct and thats the app that is stopping the upgrade then I’m stuck.

Result with it enabled:-

root@giliker:/var/www/nextcloud# sudo -u nextcloud php --define apc.enable_cli=1 /var/www/nextcloud/occ app:remove app_api
app_api could not be removed as it is a shipped app

And result with it disabled:-
root@giliker:/var/www/nextcloud# sudo -u nextcloud php --define apc.enable_cli=1 /var/www/nextcloud/occ app:remove app_api
app_api is not enabled

Has anyone got any suggestions? Have I gone down a rabbit hole? Is there a simple answer?

Hi, i think you are on a wrong way.

I think the update is blocked on line 124 of thé upgrade script:

Dont panic

Ahhhh. That looks promising. Well spotted! Cheers Marc.

What would be the way forward? Disable the ldap mail or somehow upgrade it?

Trick: :wink:
Other method with next command:
yunohost app shell nextcloud

To know the list of installed and activated apps
php occ app:list --enabled

To find out the list of apps installed and disabled
php occ app:list --disabled

To exit the shell:

exit

try again the last command :

sudo -u nextcloud env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin COREPACK_ENABLE_DOWNLOAD_PROMPT=0 NPM_CONFIG_UPDATE_NOTIFIER=false php8.3 --define apc.enable_cli=1 occ --no-interaction --no-ansi config:app:get user_ldap s02ldap_email_attr

e Tue, 3 Mar 2026 22:15:30 +0000, Tux a écrit :

Marc, I ran that command through an SSH terminal. It seemed to work OK, at least no errors appeared. I then ran the upgrade from the YNH UI. Sadly it failed “An error occured inside the app upgrade script”.

Error: "500"

Action: "PUT" /yunohost/api/apps/nextcloud/upgrade

https://paste.yunohost.org/raw/ihunalehab

Any other suggestions? Your support is appreciated.

Thanks for this Jfmb. Cheers.

1 Like

This may help:

Otm, that seems to make sense to me but I am not sure how to use this insight. Is it something that needs to tweaked in the YNH upgrade script for NC v32. I am still an amateur on Linux (I did code on Unix with Cobol, Pascal and Coral-66 a lifetime ago) but I’m not sure how to use this insight. Any advice…

Well, in the post transferred by @otm33 , there is nosolution yet.

I don’t understand why your script stops. It says that you ldapEmail is void, but it should continue.

Let’s control you upgrade script.

Please can you share it?

sudo yunohost log share /etc/yunohost/apps/nextcloud/scripts/upgrade

And we should also control nextcloud log:

sudo yunohost log share /var/log/nextcloud/nextcloud.log

And php log

ls /var/log | grep php8.3

Do you have empty servers conf in LDAP/AD Integration tab ?

Here is the upgrade script. https://paste.yunohost.org/raw/upifihivov