Configuration panel not accessible for an app (nextcloud) after making a change

What type of hardware are you using: VPS bought online
What YunoHost version are you running: 12.0.11
How are you able to access your server: The webadmin
SSH

Describe your issue

Hello all,

I modified the config for my Nextcloud install in the config panel (I enabled the option to use the mail redirection) and saved the change.
After those change, I cannot access the config panel for that app (the other panels work well).

It doesn’t load, and that’s all I can see (sorry for the screenshot):

When trying to get more information on the CLI side, I wasn’t able to locate any relevant log with errors but when I do a
sudo yunohost app config get nextcloud --debug, I get an error stating "ValueError: illegal environment variable name" (full log available)

The change I did seem to be in /home/yunohost/app/nextcloud/settings.yml so I worked the first time.

Is there anything else I could do to gather more information?

Does someone has an idea of how to fix this?

Should I open an issue on Github?

Share relevant logs or error messages

Log of the last action that worked: https://paste.yunohost.org/raw/ivomuterup
Log of yunohost app config get nextcloud --debug: hastebin

I could “fix” the issue by restoring the /etc/yunohost/app/nextcloud/settings.yml from a backup I made 3 days ago.

What is strange is that the setting I modified (enable_forward_email) is absent from the file I restored, yet yunohost sees it as enabled:

root@hostname:/# yunohost app config get nextcloud
main.maintenance.maintenance_mode:
  ask: Enable maintenance mode
  value: no
main.addressbook.system_addressbook_exposed:
  ask: Enable address book
  value: no
main.notify_push.enable_notify_push:
  ask: Enable Notify Push
  value: yes
main.forward_email.enable_forward_email:
  ask: Set YunoHost user's forward email instead of YunoHost user's main email?
  value: yes

but
root@hostname:/#grep "enable_forward_email" /etc/yunohost/apps/nextcloud/settings.yml
doesn’t return anything (it did return a line before)

So I tried to again to modify the same value in the config panel, and I got the same issue BUT I saw a warning that could explain it (raised when saving the config file):

The line md5sum : option non reconnue ‘–file=/var/www/nextcloud/apps/user_ldap/lib/User/User.php’ was already seen in the log I first shared.

It comes from helper ynh_store_file_checksum. I’ll see if I can investigate a little more.

OK, I think I saw the issue in the way the helper is called, I opened a PR: Removing argument --file to calls of ynh_store_file_checksum helper by e-jim · Pull Request #792 · YunoHost-Apps/nextcloud_ynh · GitHub

Is there a way to add an automated test that test that the configs can indeed be saved?

Also: sorry, but I now realize it was NOT a global issue of YNH but only an app issue. Can I move my topic to the Nextcloud section?
Edit: I moved the topic.