Blank Screen on web interface - backend working

Nextcloud version (eg, 20.0.5): 28.3.2
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.59
PHP version (eg, 7.4): 8.1.27

The issue you are facing:
I am getting a blank, white screen on the web interface - no source.
Running php ooc in the CLI gives:

PHP Fatal error: Cannot declare class OCA\HassIntegration\AppInfo\Application, because the name is already in use in /var/www/nextcloud/apps/integration_homeassistant/lib/AppInfo/Application.php on line 14

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

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

I cannot get into the web admin

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

<?php
$CONFIG = array (
  'passwordsalt' => SECURED,
  'secret' => SECURED,
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'nc.kaddu.dk',
    2 => '192.168.2.25',
  ),
  'datadirectory' => '/var/www/nextcloud-data',
  'dbtype' => 'mysql',
  'version' => '28.0.3.2',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => SECURED,
  'installed' => true,
  'instanceid' => 'd664425d1d8cb',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,```
 ),
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 0,
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'kaddu.dk',
  'mail_smtphost' => 'smtp.simply.com',
  'mail_smtpport' => '587',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'nextcloud@kaddu.dk',
  'mail_smtppassword' => 'YTqLwEyumDqo7Z',
  'app_install_overwrite' =>
  array (
    0 => 'occweb',
    1 => 'ncdownloader',
  'allow_local_remote_servers' => true,
  ),
);

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

[Mon Apr 22 15:05:51.575136 2024] [php:error] [pid 272] [client 37.96.126.211:2016] PHP Fatal error:  Cannot declare class OCA\\HassIntegration\\AppInfo\\Application, because the name is already in use in /var/www/nextcloud/apps/integration_homeassistant/lib/AppInfo/Application.php on line 14
[Mon Apr 22 15:06:00.685747 2024] [php:error] [pid 1006] [client 192.168.2.1:59098] PHP Fatal error:  Cannot declare class OCA\\HassIntegration\\AppInfo\\Application, because the name is already in use in /var/www/nextcloud/apps/integration_homeassistant/lib/AppInfo/Application.php on line 14
[Mon Apr 22 15:06:16.370389 2024] [php:error] [pid 1662] [client 192.168.2.209:43946] PHP Fatal error:  Cannot declare class OCA\\HassIntegration\\AppInfo\\Application, because the name is already in use in /var/www/nextcloud/apps/integration_homeassistant/lib/AppInfo/Application.php on line 14
[Mon Apr 22 15:06:25.154996 2024] [php:error] [pid 275] [client 192.168.2.1:36842] PHP Fatal error:  Cannot declare class OCA\\HassIntegration\\AppInfo\\Application, because the name is already in use in /var/www/nextcloud/apps/integration_homeassistant/lib/AppInfo/Application.php on line 14
[Mon Apr 22 15:06:31.166488 2024] [php:error] [pid 272] [client 192.168.2.1:53802] PHP Fatal error:  Cannot declare class OCA\\HassIntegration\\AppInfo\\Application, because the name is already in use in /var/www/nextcloud/apps/integration_homeassistant/lib/AppInfo/Application.php on line 14
[Mon Apr 22 15:06:50.551952 2024] [php:error] [pid 644] [client 37.96.126.211:2025] PHP Fatal error:  Cannot declare class OCA\\HassIntegration\\AppInfo\\Application, because the name is already in use in /var/www/nextcloud/apps/integration_homeassistant/lib/AppInfo/Application.php on line 14
[Mon Apr 22 15:07:02.144890 2024] [php:error] [pid 275] [client 192.168.2.1:43886] PHP Fatal error:  Cannot declare class OCA\\HassIntegration\\AppInfo\\Application, because the name is already in use in /var/www/nextcloud/apps/integration_homeassistant/lib/AppInfo/Application.php on line 14
[Mon Apr 22 15:07:16.034352 2024] [php:error] [pid 272] [client 192.168.2.209:46728] PHP Fatal error:  Cannot declare class OCA\\HassIntegration\\AppInfo\\Application, because the name is already in use in /var/www/nextcloud/apps/integration_homeassistant/lib/AppInfo/Application.php on line 14
[Mon Apr 22 15:07:32.149599 2024] [php:error] [pid 1005] [client 192.168.2.1:34366] PHP Fatal error:  Cannot declare class OCA\\HassIntegration\\AppInfo\\Application, because the name is already in use in /var/www/nextcloud/apps/integration_homeassistant/lib/AppInfo/Application.php on line 14

It seems to be related to the Home Assistant integration, but if I remember correctly, HA got install well prior to this error.

As I cannot deactivate this integration neither through php occ app:disable nor through the web interface - how can I resolve this situation?

I believe you can temporarily rename the integration_homeassistant folder within your apps folder then restart your web server to not load the problematic app/class.

Before (or after) you do so it might be informative to do something like a grep -r Hass . from your Nextcloud installation folder to see what other files/apps declare that class. Perhaps you have two apps folders configured and ended up an overlap somewhere?

1 Like

You are absolutely right!

This solved the problem. I have started upgrading the apps through the command line. Upgrading NC via the command line stated that it is already the latest version. But maybe this is due to some apps needing updating first…

After having updated all apps through occ occ upgrade still says:

´´´

sudo -u www-data php occ upgrade

Nextcloud is already latest version
´´´

but on the web interface an upgrade from 28.0.3 to 28.0.4 is available. Not sure why?

occ upgrade is not used for updating Nextcloud Server from the command line.

You use the updater.phar for that.

occ upgrade is used to trigger the db and app upgrades afterwards.

Please see the Maintenance section of the Admin Manual: https://docs.nextcloud.com for proper Updating procedures.

OK Thanks :slight_smile:

I did the 28.0.3 to .4 update through the web updater, but it won’t go further than that. Having changed to the Beta channel I can upgrade to 28.0.5 RC1 but not to 29. I have yet to try the cli updater as described in the manual. It is currently upgrading to the .5 RC1 - when that is done I will try to run the background jobs a few times and then move back to the stable channel and try the CLI based updater.

Thanks again!

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