Can install apps from app store, but none work properly

Running 20.0.10 on CentOS 7.8 with PHP 7.3.

I originally posted my issue in the specific TOTP section but have since determined that the issue is more general than that. I’ve never really utilized apps on my server as it’s been used primarily for file storage. However, trying to get 2FA working has highlighted this issue. As such, I don’t know how long this has been an issue for or exactly what the cause is - It’s probably something stupid.

I have two apps_paths configured in my config. The relevant part of my config looks like this:-

$CONFIG = array (
‘log_type’ => ‘owncloud’,
‘logfile’ => ‘/var/log/nextcloud.log’,
‘loglevel’ => 2,
‘datadirectory’ => ‘/var/lib/nextcloud/data’,
‘updatechecker’ => false,
‘check_for_working_htaccess’ => false,
‘asset-pipeline.enabled’ => false,
‘assetdirectory’ => ‘/var/lib/nextcloud’,
‘preview_libreoffice_path’ => ‘/usr/bin/libreoffice’,
‘apps_paths’ =>
array (
0 =>
array (
‘path’ => ‘/usr/share/nextcloud/apps’,
‘url’ => ‘/apps’,
‘writable’ => false,
1 =>
array (
‘path’ => ‘/var/lib/nextcloud/apps’,
‘url’ => ‘/apps-appstore’,
‘writable’ => true,

If I log in as admin and install an app, it installs in /var/lib/nextcloud/apps/ and I can see all the files there. However, these apps don’t appear to work correctly and my apache logs show a bunch of 404 errors for anything in /apps-appstore/, even though the relevant files are all there. For example, after installing the calendar app, my main screen after logging in now shows an “Upcoming Events” window but I just get a spinning wheel and at the same time, I get the 404 errors in the apache log.
I see similar 404 errors for existing files with TOTP when I try to go to that section to enable, and I don’t have any ability to enable TOTP for users as it’s just missing.

No idea where to look from here.

Not sure if it’s the correct solution but I’ve managed to get things working by adding a symlink to /var/lib/nextcloud/apps at /usr/share/nextcloud/apps-appstore. Calendar and TOTP now working.