App-external fails integrity check

Nextcloud version (eg, 20.0.5): 29.0.1
Operating system and version (eg, Ubuntu 20.04): Debian GNU/Linux 12 (bookworm)
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.59
PHP version (eg, 7.4): php-fpm8.2

The issue you are facing:

All files in apps-external did not pass the integrity check. The expected values in the report are empty.

I already tried to reinstall the apps and rescan.
occ integrity:check-app <appname> does not return any errors.

Report file:

Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results
=======
- core
	- EXTRA_FILE
		- apps-external/integration_mastodon/vendor/composer/autoload_psr4.php
		- apps-external/integration_mastodon/vendor/composer/autoload_classmap.php
...


...
Raw output
==========
Array
(
    [core] => Array
        (
            [EXTRA_FILE] => Array
                (
                    [apps-external/integration_mastodon/vendor/composer/autoload_psr4.php] => Array
                        (
                            [expected] => 
                            [current] => 6aa0db15e02960ef6a93983f8755425cf46ff2f6d5a3f75657fff71a81495e2a400b8f75164998ff7ec6d2a6181d4851f6def6512384b2cd49a95c85a10a782d
                        )

                    [apps-external/integration_mastodon/vendor/composer/autoload_classmap.php] => Array
                        (
                            [expected] => 
                            [current] => 2b71ed5f7f403a83eed8870c8663e5b26526db7c7649a8279e8d8d7368d0cc1b04abe27c21004fd9a1f61d56ec5b7150d8e31b7755a41083d77f84ac585f8326
                        )
...

Complete file:

https://eichler-bg.de/integrity.txt

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

I am not sure, if it is related, but I recently moved my nextcloud folder from /var/www/nextcloud to a different harddrive and created a symlink to the new location.

The error appeared on the first upgrade after this change the first time.

The output of your Nextcloud log in Admin > Logging:

empty

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'XXXX',
  'passwordsalt' => 'XXXX',
  'secret' => 'XXXX',
  'allow_local_remote_servers' => true,
  'default_phone_region' => 'DE',
  'trusted_domains' => 
  array (
    0 => 'XXXX',
  ),
  'datadirectory' => '/media/data/nextcloud/data/',
  'overwrite.cli.url' => 'XXXX',
  'overwriteprotocol' => 'https',
  'trusted_proxies' => 
  array (
    0 => 'XXXX',
  ),
  'dbtype' => 'pgsql',
  'version' => '29.0.1.1',
  'dbname' => 'XXXX',
  'dbhost' => '127.0.0.1',
  'dbtableprefix' => 'oc_',
  'logtimezone' => 'UTC',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/nextcloud/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/nextcloud/apps-external',
      'url' => '/apps-external',
      'writable' => true,
    ),
  ),
  'installed' => true,
  'mysql.utf8mb4' => true,
  'maintenance' => false,
  'dbuser' => 'XXXX',
  'dbpassword' => 'XXXX',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
    'timeout' => 0.0,
    'password' => 'XXXX',
    'dbindex' => 0,
  ),
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'mail_domain' => 'XXXX',
  'mail_from_address' => 'owncloud',
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'XXXX',
  'mail_smtpname' => 'XXXX',
  'mail_smtppassword' => 'XXXX',
  'mail_smtpport' => '465',
  'mail_smtpsecure' => 'ssl',
  'loglevel' => 2,
  'theme' => '',
  'mail_sendmailmode' => 'smtp',
  'app_install_overwrite' => 
  array (
    0 => 'previewgenerator',
    1 => 'bruteforcesettings',
    2 => 'suspicious_login',
    3 => 'news',
    4 => 'social',
    5 => 'camerarawpreviews',
    6 => 'groupfolders',
    7 => 'bookmarks',
  ),
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'maintenance_window_start' => 22,
  'bulkupload.enabled' => false,
  'enable_previews' => true,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\Movie',
    1 => 'OC\\Preview\\PNG',
    2 => 'OC\\Preview\\JPEG',
    3 => 'OC\\Preview\\GIF',
    4 => 'OC\\Preview\\BMP',
    5 => 'OC\\Preview\\XBitmap',
    6 => 'OC\\Preview\\MP3',
    7 => 'OC\\Preview\\MP4',
    8 => 'OC\\Preview\\TXT',
    9 => 'OC\\Preview\\MarkDown',
    10 => 'OC\\Preview\\PDF',
  ),
  'music.lastfm_api_key' => 'XXXX',
);

The output of your Apache/nginx/system log in /var/log/____:

empty

Tested a few things and it really seems to be caused by the symlink.

Changing 'path' => '/var/www/nextcloud/apps-external' to 'path' => '/symlink-source/nextcloud/apps-external' fixed the problem after rescanning.