Can't view or update apps

Nextcloud version (eg, 29.0.5): Nextcloud Hub 9 (30.0.0)
Operating system and version (eg, Ubuntu 24.04): TrueNAS Scale Dragonfish-24.04.2
Apache or nginx version (eg, Apache 2.4.25): Debian 12 bookworm
PHP version (eg, 8.3): 8.2.24

The issue I am facing:
I get no apps in the NextCloud app library, except the ones installed before problem started. I have used NC for about one and a half years and have upgraded it a few times. I can’t tell exactly when the problem started and thankfully most of the activated apps has continued to work even if I can’t find and install new ones. However, now some apps are so old that they need to be updated to work properly, Notes for example.

Nextcloud is installed on TrueNAS from the TrueNAS catalog (Chart Version: 2.0.17) and is reached from a domain name connected to CloudFlare/cloudflared.

Everything except the app library works fine. Under Administration I have no current errors in the list.

I hope you can help me solve this problem.

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

Steps to replicate it:

  1. Log in as admin
  2. Click user butten in top right corner and select Apps
  3. See under header Best rated apps to see placeholders or select f ex Files in menu and see blank list.

The output of your Nextcloud log in Admin > Logging:
I have only log posts from 9 mars 2024 here

If I select nextcloud logs from TrueNAS apps page I get better log results. I have attached the log where I have deleted all rows for other users than admin. I have also deleted most of the certificate info and masked part of IP-addresses. The most interesting log posts are maybe these:

2024-09-28T13:48:02.390224477+02:00 172.16.7.40 - - [28/Sep/2024:11:48:02 +0000] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 500 849 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0"

2024-09-28T13:48:39.556295450+02:00 172.16.7.40 - admin [28/Sep/2024:11:48:39 +0000] "GET /ocs/v2.php/apps/notifications/api/v2/notifications?format=json HTTP/1.1" 500 794 "-" "Mozilla/5.0 (Windows) mirall/3.14.0stable-Win64 (build 20240914) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)"

2024-09-28T13:48:39.554911723+02:00 [Sat Sep 28 11:48:39.554839 2024] [php:notice] [pid 1671:tid 1671] [client 172.16.7.40:39152] {"reqId":"HlIS7Vke17uJcqndwgMG","level":3,"time":"2024-09-28T11:48:39+00:00","remoteAddr":"172.16.7.40","user":"admin","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications?format=json","message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/var/www/html","userAgent":"Mozilla/5.0 (Windows) mirall/3.14.0stable-Win64 (build 20240914) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"30.0.0.14","exception":{"Exception":"RuntimeException","Message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/var/www/html","Code":0,"Trace":[{"file":"/var/www/html/apps/firstrunwizard/lib/Notification/Notifier.php","line":205,"function":"imagePath","class":"OC\\\\URLGenerator","type":"->","args":["firstrunwizard","apps/whiteboard.svg"]},{"file":"/var/www/html/apps/firstrunwizard/lib/Notification/Notifier.php","line":105,"function":"setAppHintDetails","class":"OCA\\\\FirstRunWizard\\\\Notification\\\\Notifier","type":"->","args":[["OC\\\\Notification\\\\Notification"],"sv","whiteboard"]},{"file":"/var/www/html/lib/private/Notification/Manager.php","line":337,"function":"prepare","class":"OCA\\\\FirstRunWizard\\\\Notification\\\\Notifier","type":"->","args":[["OC\\\\Notification\\\\Notification"],"sv"]},{"file":"/var/www/html/apps/notifications/lib/Controller/EndpointController.php","line":103,"function":"prepare","class":"OC\\\\Notification\\\\Manager","type":"->","args":[["OC\\\\Notification\\\\Notification"],"sv"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"listNotifications","class":"OCA\\\\Notifications\\\\Controller\\\\EndpointController","type":"->","args":["v2"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\\\AppFramework\\\\Http\\\\Dispatcher","type":"->","args":[["OCA\\\\Notifications\\\\Controller\\\\EndpointController"],"listNotifications"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\\\AppFramework\\\\Http\\\\Dispatcher","type":"->","args":[["OCA\\\\Notifications\\\\Controller\\\\EndpointController"],"listNotifications"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\\\AppFramework\\\\App","type":"::","args":["OCA\\\\Notifications\\\\Controller\\\\EndpointController","listNotifications",["OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer"],["v2","ocs.notifications.endpoint.listnotifications"]]},{"file":"/var/www/html/ocs/v1.php","line":43,"function":"match","class":"OC\\\\Route\\\\Router","type":"->","args":["/ocsapp/apps/notifications/api/v2/notifications"]},{"file":"/var/www/html/ocs/v2.php","line":7,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/URLGenerator.php","Line":242,"message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/var/www/html","exception":{},"CustomMessage":"image not found: image:apps/whiteboard.svg webroot: serverroot:/var/www/html"}}

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

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'upgrade.disable-web' => true,
  'passwordsalt' => 'xxxxx',
  'secret' => 'xxx/xxx+xxx/xxx',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '192.168.xxx.xxx',
    2 => 'nextcloud.xxxxx.de',
  ),
  'trusted_proxies' => 
  array (
    0 => '10.42.0.0/16',
    1 => '103.21.244.0/22',
    2 => '103.22.200.0/22',
    3 => '103.31.4.0/22',
    4 => '104.16.0.0/12',
    5 => '108.162.192.0/18',
    6 => '131.0.72.0/22',
    7 => '141.101.64.0/18',
    8 => '162.158.0.0/15',
    9 => '172.64.0.0/13',
    10 => '173.245.48.0/20',
    11 => '188.114.96.0/20',
    12 => '190.93.240.0/20',
    13 => '197.234.240.0/22',
    14 => '198.41.128.0/17',
  ),
  'forwarded_for_headers' => 
  array (
    0 => 'HTTP_CF_CONNECTING_IP',
  ),
  'overwriteprotocol' => 'https',
  'datadirectory' => '/var/www/html/data',
  'default_phone_region' => 'SE',
  'default_language' => 'sv',
  'dbtype' => 'pgsql',
  'version' => '30.0.0.14',
  'overwrite.cli.url' => 'nextcloud.xxxxxx.de',
  'dbname' => 'nextcloud',
  'dbhost' => 'nextcloud-postgres:5432',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'installed' => true,
  'instanceid' => 'oc4ko8u82cqc',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'nextcloud',
  'mail_domain' => 'xxx.se',
  'mail_smtphost' => 'mail.xxx.eu',
  'mail_smtpport' => '465',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'nextcloud@xxx.se',
  'mail_smtppassword' => 'xxx',
  'maintenance' => false,
  'loglevel' => 0,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'nextcloud-redis',
    'password' => 'xxx',
    'port' => xxxx,
  ),
  'app_install_overwrite' => 
  array (
    0 => 'spreed',
    1 => 'files_antivirus',
  ),
  'overwritehost' => 'nextcloud.xxxxx.de',
);

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

None

I found old posts in this forum having the same issue. I tried the following solutions:

  1. Delete the DST Root CA X3 section from /resources/config/ca-bundle.crt. Not present in my ca-bundle file
  2. I searched for the DST certificate files in /etc/ssl/certs but didn’t find any DST-certs to delete
  3. Delete 'appstoreurl' => 'https://api.nextcloud.com/v1' from config.php. Not present in my config.php-file so couldn’t delete

I have no real idea. But maybe you can check your installed apps in occ:

sudo -u www-data php occ app:list

Thanks for your attempt to help. :grinning: I can get a list of the installed enabled/disabled apps and their versions from occ, but unfortunately it doesn’t help much. I can see the same list in nextcloud GUI. Or is there a fancy way to update apps with occ when it’s not working to update them in GUI?

I have found a temporary solution which made it possible to update the apps.

What I did:

  1. I downloaded the json-files https://apps.nextcloud.com/api/v1/platforms.json, /apps.json, /categories.json and /discover.json
  2. I placed the four files on a web server in my network
  3. I added these in config.php: ‘appstoreenabled’ => true,
    ‘appstoreurl’ => ‘http://192.168.1.243/api/nc_apps’,
  4. I removed all browser cache for nextcloud

After this all apps whent back and it was also possible to upgrade the apps. However, this is a temporary solution; it’s better to use the official app store so the apps list always are up to date. But it works to solve the main problem and should not be too hard to write a script that downloads new file versions once a day.

Something is not right since according to your provided config your nextcloud.log should not only be in /var/www/html/data/nextcloud.log but you also have debug level logging enabled at the moment.

The app store matter sounds like a connectivity matter from the container, but… to be determined.

  1. The image you’re using places apps in two spots within /var/www/html. Shipped apps end up in apps/ and apps you install from the app store end up in custom_apps/. Can you confirm those folders are there and have apps that fall into those two categories?
  2. Can you provide your real config. The image uses multiple config files so you have to use occ config:list system to see the merged active config.
  3. Can you do some curl tests from inside the container to confirm you have outbound connectivity/DNS/etc to https://apps.nextcloud.com?

Thanks for your help.

  1. The folders are there and they have their apps in the folders.

{
“system”: {
“htaccess.RewriteBase”: “/”,
“memcache.local”: “\OC\Memcache\APCu”,
“apps_paths”: [
{
“path”: “/var/www/html/apps”,
“url”: “/apps”,
“writable”: false
},
{
“path”: “/var/www/html/custom_apps”,
“url”: “/custom_apps”,
“writable”: true
}
],
“upgrade.disable-web”: true,
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: [
“localhost”,
“192.168.1.242”,
“nextcloud.REMOVED SENSITIVE VALUE.de”
],
“allow_local_remote_servers”: true,
“trusted_proxies”: “REMOVED SENSITIVE VALUE”,
“forwarded_for_headers”: [
“HTTP_CF_CONNECTING_IP”
],
“overwriteprotocol”: “https”,
“datadirectory”: “REMOVED SENSITIVE VALUE”,
“default_phone_region”: “SE”,
“default_language”: “sv”,
“dbtype”: “pgsql”,
“version”: “30.0.0.14”,
“overwrite.cli.url”: “nextcloud.REMOVED SENSITIVE VALUE.de”,
“dbname”: “REMOVED SENSITIVE VALUE”,
“dbhost”: “REMOVED SENSITIVE VALUE”,
“dbport”: “”,
“dbtableprefix”: “oc_”,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“installed”: true,
“instanceid”: “REMOVED SENSITIVE VALUE”,
“mail_smtpmode”: “smtp”,
“mail_smtpsecure”: “ssl”,
“mail_sendmailmode”: “smtp”,
“mail_from_address”: “REMOVED SENSITIVE VALUE”,
“mail_domain”: “REMOVED SENSITIVE VALUE”,
“mail_smtphost”: “REMOVED SENSITIVE VALUE”,
“mail_smtpport”: “465”,
“mail_smtpauth”: 1,
“mail_smtpname”: “REMOVED SENSITIVE VALUE”,
“mail_smtppassword”: “REMOVED SENSITIVE VALUE”,
“maintenance”: false,
“loglevel”: 0,
“memcache.distributed”: “\OC\Memcache\Redis”,
“memcache.locking”: “\OC\Memcache\Redis”,
“redis”: {
“host”: “REMOVED SENSITIVE VALUE”,
“password”: “REMOVED SENSITIVE VALUE”,
“port”: 6379
},
“app_install_overwrite”: [
“spreed”,
“files_antivirus”,
“notes”,
“tasks”,
“calendar”
],
“overwritehost”: “nextcloud.REMOVED SENSITIVE VALUE.de”,
“maintenance_window_start”: 2,
“appstoreenabled”: true,
“appstoreurl”: “http://192.168.1.243/api/nc_apps”
}
}
3. curl to https://apps.nextcloud.com returnes the html code for that page.