What app is this about, and its version: Nextcloud, 32.0.5~ynh1 What YunoHost version are you running: 12.1.39 What type of hardware are you using: Old laptop or computer
Describe your issue
The upgrade of nextcloud failed unexpectedly, apparently due to an unfulfilled dependency as the log advises ›Nextcloud or one of the apps require upgrade‹ before failing with ›An error occurred inside the app upgrade script‹. Has anyone else had problems with this update?
I discovered I have also two LDAP configurations, the first one s01 is correct not the second one s02 because perhaps like you it haven’t a ldapEmailAttribute ! I have remove it the Admin nextcloud => Integration AD/LDAP
Thank you very much, rodinux, for your help and for bringing me onto the right track! Indeed, php occ ldap:show-config only shows one configuration without prefix s01 or s02, so this is likely why the update script is unable to find the ldapEmailAttribute, although it present:
I remember deleting the two configurations at some point in the past, via the GUI, which then seemed like useless duplicates of the remaining config to me.
First thing that came to mind, was recreating the config prefixed with s01 or s02. Thus, on a test machine, I created an empty config with php occ ldap:create-empty-config and tried to copy the values via SQL from an existing one to the new config, then activating it. But somehow these manual changes are not persistent. And after re-connection to the DB, I only see config s01, not the modified s02. Why could this happen? Would you choose a different route?
So, a closer look into the upgrade script revealed, that my situation (having ldap config without prefix used to be normal) had already been contemplated by alexAubin, thus modifying the setting ldap_config_prefix from ldap_config_prefix: s02 to ldap_config_prefix: '' was sufficient to take advantage of the upgrade logic and smoothly transition to 32.0.6!
# Before NCv32, Yunohost was not using any prefix for the LDAP config.
# This is now mandatory so we need to create a new config with a prefix.
if [ "$ldap_config_prefix" = "" ]
then
ldap_config_prefix=$(exec_occ ldap:create-empty-config --only-print-prefix)
ynh_app_setting_set --key=ldap_config_prefix --value="$ldap_config_prefix"
fi