[Broke] Nextcloud Update to 30.0.4 : broken, backup broken too (".ocdata" file)

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.0.9
What app is this about: Nextcloud

Describe your issue

Yesterday,

I update Nextcloud via admin GUI. My fault : i didn’t look if it goes at end.
From 29.0.9~ynh1 to 30.0.4.

This morning ; i see Nextcloud is broken, i go to home page :

Votre répertoire des données n’est pas valide.
Assurez-vous que le répertoire de données contient un fichier “.ocdata” à sa racine.

(english translation via deepl)

Your data directory is invalid.
Make sure your data directory contains an “.ocdata” file at its root.

Then I try to update again via CLI and broken,
Paste is here : https://paste.yunohost.org/raw/ucabijeyod

Some checking :

/var/www/nextcloud/config/config.php

#cat /var/www/nextcloud/config/config.php
<?php
$CONFIG = array (
  'instanceid' => 'XXXXX',
  'passwordsalt' => 'XXXXXXXXXXXx',
  'secret' => 'XXXXXXXXXXXXXXXXXXXXXX',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'maison.domain.example.net',
  ),
  'datadirectory' => '/home/yunohost.app/nextcloud/data',
  'overwrite.cli.url' => 'https://maison.domain.example.net/owncloud',
  'dbtype' => 'mysql',
  'version' => '29.0.9.2',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'XXXXXXXXXXXXXXXXXXX',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'maintenance' => false,
  'loglevel' => 2,
  'trashbin_retention_obligation' => 'auto',
  'theme' => '',
  'updatechecker' => false,
  'integrity.check.disabled' => true,
  'logout_url' => 'https://maison.domain.example.net
/yunohost/sso/?action=logout&r=XXXXXXXXXXXXXXXXXX',
  'htaccess.RewriteBase' => '/owncloud',
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'ldapIgnoreNamingRules' => false,
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => '6379',
    'timeout' => '0.0',
    'password' => '',
  ),
  'hashing_default_password' => true,
  'localstorage.allowsymlinks' => true,
  'simpleSignUpLink.shown' => false,
  'mysql.utf8mb4' => true,
  'app_install_overwrite' => 
  array (
    0 => 'contacts',
  ),
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'maison.domain.example.net',
  'mail_smtphost' => 'localhost',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'nextcloud',
  'mail_smtppassword' => 'XXXXXXXXXXXXX',
  'mail_smtpport' => '25',
  'mail_smtpstreamoptions' => 
  array (
    'ssl' => 
    array (
      'allow_self_signed' => true,
      'verify_peer' => false,
      'verify_peer_name' => false,
    ),
  ),
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'maintenance_window_start' => 1,
  'trusted_proxies' => 
  array (
    0 => '127.0.0.1',
    1 => '::1',
  ),
);
root@maison:/# ls -la /home/yunohost.app/nextcloud/data/
total 100
drwxr-x--- 17 nextcloud nextcloud  4096 Dec 19 16:43 .
drwxr-x---  9 nextcloud nextcloud  4096 Dec 19 16:39 ..
drwxr-x---  3 nextcloud nextcloud  4096 Jul 27  2023 admin_2329
drwxr-x--- 14 nextcloud nextcloud  4096 Jul 27  2023 appdata_ocxsmc2kyo1p
drwxr-x---  3 nextcloud nextcloud  4096 Dec 26  2021 backupbelar
drwxr-x---  2 nextcloud nextcloud  4096 Dec  9  2015 cops
drwxr-x---  9 nextcloud nextcloud  4096 Jul 26  2019 denis
drwxr-x---  2 nextcloud nextcloud  4096 Jun 27 08:33 files_external
drwxr-x---  8 nextcloud nextcloud  4096 Jul 25  2019 gatien
drwxr-x---  7 nextcloud nextcloud  4096 Mar 29  2019 hector
-rw-r-----  1 nextcloud nextcloud   542 Dec 19 16:24 .htaccess
-rw-r-----  1 nextcloud nextcloud   145 Aug  1  2016 htaccesstest.txt
-rw-r-----  1 nextcloud nextcloud     0 Dec 19 16:24 index.html
drwxr-x---  2 nextcloud nextcloud  4096 May 29  2015 .locks
drwxr-x---  9 nextcloud nextcloud  4096 Aug 25  2021 lolotte
drwxr-x---  9 nextcloud nextcloud  4096 Aug 27  2017 manou
-rw-r-----  1 nextcloud nextcloud   120 Apr 11  2016 mount.json
-rw-r-----  1 nextcloud nextcloud    52 Dec 19 16:24 .ncdata
drwxr-x---  4 nextcloud nextcloud  4096 Nov  7  2015 news
-rw-r-----  1 nextcloud nextcloud 12112 Dec 19 17:07 nextcloud.log
-rw-r-----  1 nextcloud nextcloud     1 Dec 21 11:23 owncloud.log
drwxr-x---  2 nextcloud nextcloud  4096 Aug 27  2020 svcjitsifocus
drwxr-x---  2 nextcloud nextcloud  4096 May 26  2015 test
drwxr-x---  2 nextcloud nextcloud  4096 Jun  1  2015 updater_backup

Check if oi can create a file as nextcloud user : OK

# sudo -u nextcloud touch /home/yunohost.app/nextcloud/data/test2
root@maison:/# ls -la /home/yunohost.app/nextcloud/data/
total 100
drwxrwx--- 17 nextcloud nextcloud  4096 Dec 21 11:37 .
drwxr-x---  9 nextcloud nextcloud  4096 Dec 19 16:39 ..
drwxrwxr-x  3 nextcloud nextcloud  4096 Jul 27  2023 admin_2329
drwxrwxr-x 14 nextcloud nextcloud  4096 Jul 27  2023 appdata_ocxsmc2kyo1p
drwxrwxr-x  3 nextcloud nextcloud  4096 Dec 26  2021 backupbelar
drwxrwxr-x  2 nextcloud nextcloud  4096 Dec  9  2015 cops
drwxrwxr-x  9 nextcloud nextcloud  4096 Jul 26  2019 denis
drwxrwxr-x  2 nextcloud nextcloud  4096 Jun 27 08:33 files_external
drwxrwxr-x  8 nextcloud nextcloud  4096 Jul 25  2019 gatien
drwxrwxr-x  7 nextcloud nextcloud  4096 Mar 29  2019 hector
-rwxrwxr-x  1 nextcloud nextcloud   542 Dec 19 16:24 .htaccess
-rwxrwxr-x  1 nextcloud nextcloud   145 Aug  1  2016 htaccesstest.txt
-rwxrwxr-x  1 nextcloud nextcloud     0 Dec 19 16:24 index.html
drwxrwxr-x  2 nextcloud nextcloud  4096 May 29  2015 .locks
drwxrwxr-x  9 nextcloud nextcloud  4096 Aug 25  2021 lolotte
drwxrwxr-x  9 nextcloud nextcloud  4096 Aug 27  2017 manou
-rwxrwxr-x  1 nextcloud nextcloud   120 Apr 11  2016 mount.json
-rwxrwxr-x  1 nextcloud nextcloud    52 Dec 19 16:24 .ncdata
drwxrwxr-x  4 nextcloud nextcloud  4096 Nov  7  2015 news
-rwxrwxr-x  1 nextcloud nextcloud 12112 Dec 19 17:07 nextcloud.log
-rwxrwxr-x  1 nextcloud nextcloud     1 Dec 21 11:23 owncloud.log
drwxrwxr-x  2 nextcloud nextcloud  4096 Aug 27  2020 svcjitsifocus
drwxrwxr-x  2 nextcloud nextcloud  4096 May 26  2015 test
-rw-r--r--  1 nextcloud nextcloud     0 Dec 21 11:37 test2
drwxrwxr-x  2 nextcloud nextcloud  4096 Jun  1  2015 updater_backup

Some test (hacking PHP file)

# sudo -u nextcloud env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin php8.2 --define apc.enable_cli=1 occ
Your data directory is invalid.
Ensure there is a file called ".ocdata" in the root of the data directory.

An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /var/www/nextcloud/lib/private/Console/Application.php:167
Stack trace:
#0 /var/www/nextcloud/console.php(101): OC\Console\Application->loadCommands()
#1 /var/www/nextcloud/occ(11): require_once('...')
  1. data dir is : /home/yunohost.app/nextcloud/data

Share relevant logs or error messages

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

J’avance, en regardant le code PHP

root@maison:/var/www/nextcloud# cat /home/yunohost.app/nextcloud/data/.ncdata > /home/yunohost.app/nextcloud/data/.ocdata
root@maison:/var/www/nextcloud# sudo -u nextcloud env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin php8.2 --define apc.enable_cli=1 occ check
root@maison:/var/www/nextcloud# sudo -u nextcloud env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin php8.2 --define apc.enable_cli=1 occ upgrade
Nextcloud is already latest version
root@maison:/var/www/nextcloud# sudo -u nextcloud env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin php8.2 --define apc.enable_cli=1 occ status
  - installed: true
  - version: 29.0.9.2
  - versionstring: 29.0.9
  - edition: 
  - maintenance: false
  - needsDbUpgrade: false
  - productname: Nextcloud
  - extendedSupport: false

Par contre : home page :slight_smile:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

Le log nextcloud (touhours ausii … … clair)

{
  "reqId": "LI8KFveSUtp4byiN2N0t",
  "level": 3,
  "time": "2024-12-21T11:14:20+00:00",
  "remoteAddr": "192.168.1.161",
  "user": "denis",
  "app": "core",
  "method": "GET",
  "url": "/owncloud/apps/files/",
  "message": "Exception thrown: OCP\\Files\\GenericFileException",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0",
  "version": "29.0.9.2",
  "exception": {
    "Exception": "OCP\\Files\\GenericFileException",
    "Message": "",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/lib/private/Files/SimpleFS/SimpleFile.php",
        "line": 74,
        "function": "getContent",
        "class": "OC\\Files\\Node\\File",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Template/JSCombiner.php",
        "line": 118,
        "function": "getContent",
        "class": "OC\\Files\\SimpleFS\\SimpleFile",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Template/JSCombiner.php",
        "line": 93,
        "function": "isCached",
        "class": "OC\\Template\\JSCombiner",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Template/JSResourceLocator.php",
        "line": 132,
        "function": "process",
        "class": "OC\\Template\\JSCombiner",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Template/JSResourceLocator.php",
        "line": 91,
        "function": "cacheAndAppendCombineJsonIfExist",
        "class": "OC\\Template\\JSResourceLocator",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Template/ResourceLocator.php",
        "line": 73,
        "function": "doFind",
        "class": "OC\\Template\\JSResourceLocator",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/TemplateLayout.php",
        "line": 409,
        "function": "find",
        "class": "OC\\Template\\ResourceLocator",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/TemplateLayout.php",
        "line": 240,
        "function": "findJavascriptFiles",
        "class": "OC\\TemplateLayout",
        "type": "::"
      },
      {
        "file": "/var/www/nextcloud/lib/private/legacy/OC_Template.php",
        "line": 145,
        "function": "__construct",
        "class": "OC\\TemplateLayout",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Template/Base.php",
        "line": 132,
        "function": "fetchPage",
        "class": "OC_Template",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/legacy/OC_Template.php",
        "line": 320,
        "function": "printPage",
        "class": "OC\\Template\\Base",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/index.php",
        "line": 114,
        "function": "printExceptionErrorPage",
        "class": "OC_Template",
        "type": "::"
      }
    ],
    "File": "/var/www/nextcloud/lib/private/Files/Node/File.php",
    "Line": 56,
    "CustomMessage": "Exception thrown: OCP\\Files\\GenericFileException"
  }
}

J’ai fait le con, j’ai voulu remettre à jour via CLI

Et boum : plus d’appli
yunohost log share 20241221-114116-backup_restore_app-nextcloud

Une idée de comment résinatller sans perdre la confir précédente ?

root@maison:/var/www/nextcloud# yunohost tools upgrade apps
Info: Now upgrading nextcloud…
Info: Creating a safety backup prior to the upgrade
Info: Collecting files to be backed up for nextcloud…
Info: Declaring files to be backed up...
Info: /home/yunohost.app/nextcloud will not be saved, because 'BACKUP_CORE_ONLY' is set.
Info: Backing up the MySQL database...
Info: Backup script completed for nextcloud. (YunoHost will then actually copy those files to the archive).
Info: Creating a backup archive from the collected files…
Info: The archive will contain about 1.4GB of data.
Success! Backup created: nextcloud-pre-upgrade2
Success! Backup deleted: nextcloud-pre-upgrade1
Info: Updating sources...
Info: Updating system_user...
Info: Updating install_dir...
Info: Updating data_dir...
Info: Updating permissions...
Warning: This permission is currently granted to all users in addition to other groups. You probably want to either remove the 'all_users' permission or remove the other groups it is currently granted to.
Info: Updating apt...
Info: Updating database...
Info: [+++.................] > Ensuring downward compatibility...
Info: [###+++..............] > Upgrading nextcloud...
Info: Upgrading to Nextcloud 30.0.4
Info: [######++++..........] > Reconfiguring nextcloud...
Warning: File /var/www/nextcloud/config/config.php has been manually modified since the installation or last upgrade. So it has been duplicated in /var/cache/yunohost/appconfbackup//var/www/nextcloud/config/config.php.backup.20241221.123845
Error: Could not upgrade nextcloud: An error occurred inside the app upgrade script
Info: The operation 'Upgrade the 'nextcloud' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20241221-113455-app_upgrade-nextcloud' to get help
Warning: Here's an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG - + sudo -u nextcloud env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin php8.3 --define apc.enable_cli=1 occ --no-interaction --no-ansi app:update --all
Info: DEBUG - duplicatefinder new version available: 1.3.0
Info: DEBUG - duplicatefinder updated
Info: DEBUG - files_texteditor new version available: 2.15.1
Info: DEBUG - Error: App "Plain text editor" cannot be installed because the following dependencies are not fulfilled: Server version 27 or lower is required.
Info: DEBUG - files_texteditor couldn't be updated
Info: DEBUG - contacts new version available: 6.1.1
Info: DEBUG - contacts updated
Info: DEBUG - notes new version available: 4.11.0
Info: DEBUG - notes updated
Info: DEBUG - calendar new version available: 5.0.8
Info: DEBUG - calendar updated
Info: DEBUG - bookmarks new version available: 15.0.4
Info: DEBUG - bookmarks updated
Info: DEBUG - tasks new version available: 0.16.1
Info: DEBUG - tasks updated
Info: DEBUG - user_external new version available: 3.4.0
Info: DEBUG - Error: App "External user authentication" cannot be installed because the following dependencies are not fulfilled: Server version 29 or lower is required.
Info: DEBUG - user_external couldn't be updated
Info: DEBUG - + ynh_exit_properly
Warning: Upgrade failed ... attempting to restore the safety backup (Yunohost first need to remove the app for this) ...
Info: Removing nextcloud…
sh: 0: getcwd() failed: No such file or directory
Info: [++++++++++..........] > Removing system configurations related to nextcloud...
Info: '/etc/php/8.3/fpm/pool.d/nextcloud.conf' wasn't deleted because it doesn't exist.
Info: [####################] > Removal of nextcloud completed
Info: Deprovisioning database...
sh: 0: getcwd() failed: No such file or directory
Info: Deprovisioning apt...
sh: 0: getcwd() failed: No such file or directory
Warning: ./deprovision_apt: line 5: ynh_apt_remove_dependencies: command not found
Error: deprovision failed for apt : An error occured inside the script snippet
Info: The operation 'Remove the 'nextcloud' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20241221-113940-app_remove-nextcloud' to get help
Warning: Here's an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG - + database=
Info: DEBUG - + '[' -n '' ']'
Info: DEBUG - + mysql -B ''
Info: DEBUG - + ynh_exit_properly
Info: DEBUG - + [[ deprovision_database =~ ^install$|^upgrade$|^restore$ ]]
Info: INFO - Deprovisioning apt...
Info: DEBUG - Executing command '['sh', '-c', '/bin/bash -x "./deprovision_apt"  7>&1']'
Info: DEBUG - + source /usr/share/yunohost/helpers
Info: DEBUG - ++++ dirname -- /usr/share/yunohost/helpers
Info: DEBUG - +++ cd -- /usr/share/yunohost
Info: DEBUG - +++ pwd
Info: DEBUG - ++ SCRIPT_DIR=/usr/share/yunohost
Info: DEBUG - ++ YNH_HELPERS_VERSION=2
Info: DEBUG - ++ readonly 'XTRACE_ENABLE=set -o xtrace'
Info: DEBUG - ++ XTRACE_ENABLE='set -o xtrace'
Info: DEBUG - + ynh_abort_if_errors
Info: DEBUG - + trap ynh_exit_properly EXIT
Info: DEBUG - + ynh_apt_remove_dependencies
Info: WARNING - ./deprovision_apt: line 5: ynh_apt_remove_dependencies: command not found
Info: DEBUG - + ynh_exit_properly
Warning: Failed to deprovision apt : The operation 'Remove the 'nextcloud' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20241221-113940-app_remove-nextcloud' to get help
Info: Deprovisioning permissions...
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
Info: Deprovisioning data_dir...
Info: Deprovisioning install_dir...
Info: Deprovisioning system_user...
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
Info: Deprovisioning sources...
Error: The operation 'Remove the 'nextcloud' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20241221-113940-app_remove-nextcloud' to get help
Success! nextcloud uninstalled
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
Info: Preparing archive for restoration…
Info: Restoring nextcloud…
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
Error: Could not restore nextcloud: Something unexpected went wrong: 
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/yunohost/backup.py", line 1453, in _restore_app
    _tools_migrations_run_before_app_restore(
  File "/usr/lib/python3/dist-packages/yunohost/tools.py", line 937, in _tools_migrations_run_before_app_restore
    current_version = version.parse(ynh_packages_version()["yunohost"]["version"])
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/packaging/version.py", line 52, in parse
    return Version(version)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/packaging/version.py", line 197, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: '0:'

Info: The operation 'Restore 'nextcloud' from a backup archive' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20241221-114116-backup_restore_app-nextcloud' to get help
Warning: unable to upgrade apps: Could not find nextcloud in the list of installed apps: 
 * keeweb
Error: Some apps could not be upgraded

Nextcloud n’étant plus installé : je vais voir pour le réinstaller via le backup

Comme l’autre problème est résolu : on revient ici

# cat /home/yunohost.app/nextcloud/data/.ncdata > /home/yunohost.app/nextcloud/data/.ocdata
#chown nextcloud:nextcloud /home/yunohost.app/nextcloud/data/.ocdata
root@maison:~# sudo -u nextcloud env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin php8.2 --define apc.enable_cli=1 /var/www/nextcloud/occ setupchecks
	dav:
		✓ DAV system address book: No outstanding DAV system address book sync.
	network:
		✓ WebDAV endpoint: Your web server is properly set up to allow file synchronization over WebDAV.
		✗ Data directory protected: Your data directory and files are probably accessible from the internet. The .htaccess file is not working. It is strongly recommended that you configure your web server so that the data directory is no longer accessible, or move the data directory outside the web server document root.
		⚠ Internet connectivity: This server has no working internet connection: Multiple endpoints could not be reached. This means that some of the features like mounting external storage, notifications about updates or installation of third-party apps will not work. Accessing files remotely and sending of notification emails might not work, either. Establish a connection from this server to the internet to enjoy all features.
		✓ JavaScript source map support
		✓ JavaScript modules support
		✓ OCS provider resolving
		⚠ .well-known URLs: Your web server is not properly set up to resolve `.well-known` URLs, failed on:
`/.well-known/caldav`
		✓ Font file loading
	system:
		⚠ Errors in the log: 48 errors in the logs since December 14, 2024, 7:05:15 PM
		ℹ Brute-force Throttle: Your remote address could not be determined.
		✓ Cron errors: The last cron job ran without errors.
		✗ Cron last run: Last background job execution ran 7 hours ago. Something seems wrong. Check the background job settings.
		✓ Debug mode: Debug mode is disabled.
		✓ File locking
		✓ Maintenance window start: Maintenance window to execute heavy background jobs is between 1:00 UTC and 7:00 UTC
		✓ Memcache: Configured
		⚠ Mimetype migrations available: One or more mimetype migrations are available. Occasionally new mimetypes are added to better handle certain file types. Migrating the mimetypes take a long time on larger instances so this is not done automatically during upgrades. Use the command `occ maintenance:repair --include-expensive` to perform the migrations.
		✓ Architecture: 64-bit
		✓ Temporary space available: Temporary directory is correctly configured:
- 202.6 GiB available in /tmp (PHP temporary directory)
		✓ Push service: Free push service
	notifications:
		✓ Push notifications - Fair use policy
	security:
		✓ App directories owner: App directories have the correct owner "nextcloud"
		✓ Old administration imported certificates
		ℹ Code integrity: Integrity checker has been disabled. Integrity cannot be verified.
		ℹ Forwarded for headers: Your remote address could not be determined.
		✓ HTTPS access and URLs: You are accessing your instance over a secure connection, and your instance is generating secure URLs.
		✓ Old server-side-encryption: Disabled
		✓ PHP version: You are currently running PHP 8.2.26.
		✓ Random generator: Secure
		✓ HTTP headers: Your server is correctly configured to send security headers.
	database:
		✓ Database missing columns: None
		✓ Database missing indices: None
		✓ Database missing primary keys: None
		✓ Database pending bigint migrations: None
		✓ MySQL Unicode support: MySQL is used as database and does support 4-byte characters
		✓ Scheduling objects table size: Scheduling objects table size is within acceptable range.
		✓ Database version: 10.11.6-MariaDB-0+deb12u1
		✓ Database transaction isolation level: Read committed
	config:
		ℹ Default phone region: Your installation has no default phone region set. This is required to validate phone numbers in the profile settings without a country code. To allow numbers without a country code, please add "default_phone_region" with the respective ISO 3166-1 code of the region to your config file.
		✓ Email test: Email test was successfully sent
		✓ Overwrite CLI URL: The "overwrite.cli.url" option in your config.php is set to "https://maison.shnoulle.net/owncloud" which is a correct URL. Suggested URL is "http://localhost".
		✓ Configuration file access rights: Nextcloud configuration file is writable
	php:
		✓ PHP default charset: UTF-8
		✓ PHP set_time_limit: The function is available.
		✓ Freetype: Supported
		✓ PHP getenv
		✓ PHP memory limit: ?
		✓ PHP modules
		✓ PHP opcache: Checking from CLI, OPcache checks have been skipped.
		✓ PHP "output_buffering" option: Disabled
		✓ PHP Imagick module
	ldap:
		✓ Invalid LDAP UUIDs: None found

Et toujours Internal Server Error en web

Je vais vérifier qu eje suis bien en php8.2 pour le web

Je vais vérifier qu eje suis bien en php8.2 pour le web

Je suis en 8.3,

Donc

# sudo -u nextcloud env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin php8.3 --define apc.enable_cli=1 /var/www/nextcloud/occ setupchecks
	dav:
		✓ DAV system address book: No outstanding DAV system address book sync.
	network:
		✓ WebDAV endpoint: Your web server is properly set up to allow file synchronization over WebDAV.
		✗ Data directory protected: Your data directory and files are probably accessible from the internet. The .htaccess file is not working. It is strongly recommended that you configure your web server so that the data directory is no longer accessible, or move the data directory outside the web server document root.
		⚠ Internet connectivity: This server has no working internet connection: Multiple endpoints could not be reached. This means that some of the features like mounting external storage, notifications about updates or installation of third-party apps will not work. Accessing files remotely and sending of notification emails might not work, either. Establish a connection from this server to the internet to enjoy all features.
		✓ JavaScript source map support
		✓ JavaScript modules support
		✓ OCS provider resolving
		⚠ .well-known URLs: Your web server is not properly set up to resolve `.well-known` URLs, failed on:
`/.well-known/caldav`
		✓ Font file loading
	system:
		⚠ Errors in the log: 57 errors in the logs since December 14, 2024, 7:08:52 PM
		ℹ Brute-force Throttle: Your remote address could not be determined.
		✓ Cron errors: The last cron job ran without errors.
		✓ Cron last run: Last background job execution ran 2 minutes ago.
		✓ Debug mode: Debug mode is disabled.
		✓ File locking
		✓ Maintenance window start: Maintenance window to execute heavy background jobs is between 1:00 UTC and 7:00 UTC
		✓ Memcache: Configured
		✓ Mimetype migrations available: None
		✓ Architecture: 64-bit
		✓ Temporary space available: Temporary directory is correctly configured:
- 202.6 GiB available in /tmp (PHP temporary directory)
		✓ Push service: Free push service
	notifications:
		✓ Push notifications - Fair use policy
	security:
		✓ App directories owner: App directories have the correct owner "nextcloud"
		✓ Old administration imported certificates
		ℹ Code integrity: Integrity checker has been disabled. Integrity cannot be verified.
		ℹ Forwarded for headers: Your remote address could not be determined.
		✓ HTTPS access and URLs: You are accessing your instance over a secure connection, and your instance is generating secure URLs.
		✓ Old server-side-encryption: Disabled
		✓ PHP version: You are currently running PHP 8.3.14.
		✓ Random generator: Secure
		✓ HTTP headers: Your server is correctly configured to send security headers.
	database:
		✓ Database missing columns: None
		✓ Database missing indices: None
		✓ Database missing primary keys: None
		✓ Database pending bigint migrations: None
		✓ MySQL Unicode support: MySQL is used as database and does support 4-byte characters
		✓ Scheduling objects table size: Scheduling objects table size is within acceptable range.
		✓ Database version: 10.11.6-MariaDB-0+deb12u1
		✓ Database transaction isolation level: Read committed
	config:
		ℹ Default phone region: Your installation has no default phone region set. This is required to validate phone numbers in the profile settings without a country code. To allow numbers without a country code, please add "default_phone_region" with the respective ISO 3166-1 code of the region to your config file.
		✓ Email test: Email test was successfully sent
		✓ Overwrite CLI URL: The "overwrite.cli.url" option in your config.php is set to "https://maison.shnoulle.net/owncloud" which is a correct URL. Suggested URL is "http://localhost".
		✓ Configuration file access rights: Nextcloud configuration file is writable
	php:
		✓ PHP default charset: UTF-8
		✓ PHP set_time_limit: The function is available.
		✓ Freetype: Supported
		✓ PHP getenv
		✓ PHP memory limit: ?
		✓ PHP modules
		✓ PHP opcache: Checking from CLI, OPcache checks have been skipped.
		✓ PHP "output_buffering" option: Disabled
		✓ PHP Imagick module
	ldap:
		✓ Invalid LDAP UUIDs: None found

C’est revenu ???

Je referai une tentative de mise à jour en janvier …

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.

Thanks for writing down the setupchecks-command! I had to run it with PHP 8.2 while on Nextcloud 27.

I’m using the test-version of the upgradescript from Github,

yunohost app upgrade nextcloud -u https://github.com/YunoHost-Apps/nextcloud_ynh/tree/testing --debug

From my log:

2025-01-08 21:44:14,857: DEBUG - Your data directory is invalid.
2025-01-08 21:44:14,858: DEBUG - Ensure there is a file called ".ocdata" in the root of the data directory.

I hit the missing .ocdata when upgrading from Nextcloud 27 on Debian 11 / Bullseye to Nextcloud 30 after migrating to Debian 12 / Bookworm.

For the next person hitting this: I used

# cd /home/yunohost.app/nextcloud/data/ && touch .ocdata chown nextcloud:nextcloud .ocdata && chmod 750 .ocdata 

Something in the update changes the .ocdata to .ncdata, so after a failed upgrade, the .ocdata-file is missing again (as files are not backed up by default, and thus not restored to the situation before the upgrade)

After that I had an incompatible app (even though it was disabled; should have checked, not only updated the apps…):

2025-01-08 22:06:27,575: DEBUG - Error: App "Plain text editor" cannot be installed because the following dependencies are not fulfilled: Server version 27 or lower is required.

Thinks take much longer now, and there are all kinds of scheme updates to the database, so I let it run while I go to bed :wink:

edit to add:

The next morning the upgrade turned out to have failed. Another app should have been uninstalled (which makes me think: if Nextcloud 30 can find out that an app is not compatible and that the only recourse is to uninstall it, why not give a warning that all incompatible apps will be uninstalled and log which apps got uninstalled? If there was an app that I really needed so hard that I’d like to stay on an old version, I still can revert to the backup from before the upgrade; not a YNH-issue, but might be implemented upstream)

Unfortunately, something left the restored Nextcloud 27 in a broken state. Not only Nextcloud itself is not working, also the Yunohost admin page for Nextcloud is broken (the page hangs in ‘getting info’).

Removing via CLI (yunohost app remove nextcloud) does work though, but after restoring the backup, Nextcloud is still / again in a broken state.

This is on a copy of the actual server, “no harm done”, but for now I’ll leave it at this and retry later with a clean slate.