Update from Nextcloud 34.0.1 to 34.0.2 fail because of an "error in script"

What app is this about, and its version: 34.0.1~ynh1
What YunoHost version are you running: YunoHost 12.1.40.1
What type of hardware are you using: VPS bought online

Describe your issue

I tried to update NC from the version 34.0.1 to 34.0.2 via both admin interface and shell (via yunohost app command). Each time I tried, the update failed saying “An error occurred inside the app upgrade script”. I tried to check the logs, but I don’t really see any information that seem relevant to me. I put the logs in YunoPaste.

Could you help me ?
Thanks in advance

Share relevant logs or error messages

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

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

Have you checked if an application in Nextcloud needs to be updated?

Hi, thanks for your answer ! I checked and updated some apps that needed to be updated, but after trying the update again, I faced the same issue…

Putting the logs here, with the same error : https://paste.yunohost.org/raw/foyoxavaki.

Another guess ?

Thank you

May be related:

Hi, thanks a lot for your help, it is in fact related !
I’m sorry I didn’t see it before posting this subject.

If someone else have the same issue, here is what I’ve done to solve it :

Diagnostic :

The problem was that the LDAP config configured for my NC instance was s02, while the one that was supposed to be used by the yunohost script was s01.

In the logs :

exec_occ config:app:get user_ldap s01ldap_email_attr

Output of the command ``php occ ldap:show-config`` :

Solution :
The solution was given by rodinux in the other topic. You juste have to set the prefix on the right configuration, so the upgrade script uses the good one.

To do this, use this command, replacing the s02 prefix with the one that the script should use :

yunohost app setting nextcloud ldap_config_prefix -v "s02"

:white_check_mark: Done !