Mise à jour Nextcloud en erreur

What type of hardware are you using: Virtual machine
What YunoHost version are you running: 12.0.17
What app is this about: Nextcloud

Describe your issue

Je ne parviens pas à mettre à jour Nexcloud.
Voilà comment j’ai procédé :

  1. Erreur de mise à jour à cause d’une app non conforme (right-clic)
  2. je désactive l’app et relance la mise à jour
  3. La mise à jour se passe
    https://paste.yunohost.org/raw/ubovilikil
    Je pense avoir interrompu la MAJ (car j’ai eu un timout gateway) et j’ai relancé le serveur.
  4. Nextcloud ne répond pas
  5. Je désinstalle Nextcloud
  6. Je réinstalle la sauvegarde d’avant upgrade
    https://paste.yunohost.org/raw/xojebotuga
    Tout semble ok sur le log
  7. Nextcloud ne réponds plus
  8. la page de l’application nextcloud n’est pas très contente :

Je suis perdu !!
Merci pour votre aide !

Tu peux essayer de faire la mise à jour à nouveau.

sudo yunohost app upgrade nextcloud -u https://github.com/YunoHost-Apps/nextcloud_ynh --force

Merci !

Je viens de refaire une tentative via l’interface.
J’ai laissé tourner cette fois ci malgré le gateway time out.

Cette fois j’ai un log avec des erreurs
https://paste.yunohost.org/raw/cuqexitehi

Mais je ne sais pas trop quoi en faire.

2025-07-12 18:35:54,715: DEBUG - Your data directory is invalid.
2025-07-12 18:35:54,715: DEBUG - Ensure there is a file called ".ocdata" in the root of the data director

I don’t know if this is why the Nextcloud installation is failing, but you could try adding this file:

touch /home/yunohost.app/nextcloud/data/.ocdata

Thanks again for your help.
I have now a .ocdata file

But the problem is still there :
https://paste.yunohost.org/raw/oforicuhaz

Upgrade is not done
My nextcloud save is not working

Ensure it has the correct ownership ‘nextcloud’ : sudo chown nextcloud:nextcloud /home/yunohost.app/nextcloud/data/.ocdata

I tried your command.
Ls -al gives me :

-rw-r----- 1 nextcloud nextcloud    0 Dec 13  2019 .ocdata

Is that good ?
I tried a new update but I do have the same error :

Info: DEBUG - Your data directory is invalid.
Info: DEBUG - Ensure there is a file called ".ocdata" in the root of the data directory.
Info: DEBUG -
Info: DEBUG - An unhandled exception has been thrown:
Info: DEBUG - Exception: Environment not properly prepared. in /var/www/nextcloud/lib/private/Console/Application.php:167
Info: DEBUG - Stack trace:
Info: DEBUG - #0 /var/www/nextcloud/console.php(101): OC\Console\Application->loadCommands()
Info: DEBUG - #1 /var/www/nextcloud/occ(11): require_once('...')
Info: DEBUG - #2 {main}+ ynh_exit_properly

I finally succeed in creating .ocdata in the good place with the correct ownership.
My data directory has been change long time ago !

The app is now upgraded to 31.0.7.
Thanks for your help !!