Cannot open Nextcloud Office Docs (Internal CODE server) (NC29 Hub8) ...Loading.... forever

Support intro


Nextcloud version (eg, 20.0.5): 29 Hub 8
Operating system and version (eg, Ubuntu 20.04): Ubuntu Server 24.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.58
PHP version (eg, 7.4): 8.3.6

Installed on Ubuntu 24.04 on HyperV, directly behind firewall with 80\443, with open, with LetsEncrypt HTTPS, (no proxy, no docker, no nonsense). Firewall does not seem to be blocking any traffic

The issue you are facing:
Opening a new CODE\Collabora doc just spins and says loading.

Is this the first time you’ve seen this error? (Y/N): yes, (new server install, never worked, no errors in security screen, CODE server page looks green)

Steps to replicate it:

  1. Open or create a collabora doc
  2. Just says Loading and never opens
  3. Blank document is created but never opens.

The output of your Nextcloud log in Admin > Logging:
These error lines appear repeatedly in the NC error log when attempting to open the doc:

```
Nextcloud Log Complete:

Errors showing when opening CODE doc are :
Trying to access array offset on null at /var/www/html/nextcloud/apps/richdocuments/lib/Service/DiscoveryService.php#152

Trying to access array offset on null at /var/www/html/nextcloud/apps/richdocuments/lib/Service/DiscoveryService.php#151

Trying to access array offset on null at /var/www/html/nextcloud/apps/richdocuments/lib/Service/DiscoveryService.php#150

CONFIG.PHP

<?php
$CONFIG = array (
  'instanceid' => 'XXXXX',
  'passwordsalt' => 'XXXXXXXXXX',
  'secret' => 'XXXXXXXXXXX',
  'trusted_domains' => 
  array (
    0 => '192.168.1.66',
    1 => 'nextcloud.souXXXXX',
  ),
  'datadirectory' => '/var/nextcloud_data',
  'dbtype' => 'mysql',
  'version' => '29.0.0.19',
  'overwrite.cli.url' => 'http://nextcloud.souXXXXXXX',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud-user',
  'dbpassword' => 'XXXXXXXXX',
  'installed' => true,
  'default_phone_region' => 'US',
  'maintenance_window_start' => 1,
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'southeastern.biz',
  'mail_smtphost' => '192.168.1.1',
  'mail_smtpport' => '25',
  'mail_smtpdebug' => 'true',
  'logtimezone' => 'America/New_York',
  'app.mail.transport' => 'php-mail',
  'maintenance' => false,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\OC\Memcache\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'redis' => array (
    'host' => 'localhost',
    'port' => 6379,
    'timeout' => 0.0,
    'password' => 'XXXXX',
  ),
);

Apache Error Log:
https://pastebin.com/ABRsJhUw



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.


Nextcloud Log Errors Only:
https://pastebin.com/wFUS9BqQ

Thanks Everyone, really appreciate the help
Shane

your log is full of redis errors

[Thu May 02 17:18:49.831346 2024] [php:error] [pid 17148] [client 10.0.3.240:53240] PHP Fatal error:  Uncaught OCP\\HintException: [0]: Memcache OC\\Memcache\\Redis not available for distributed cache (Is the matching PHP module installed and enabled?)\n\n  thrown in /var/www/html/nextcloud/lib/private/Memcache/Factory.php on line 97

and it looks FUSE is not available

[Thu May 02 20:44:05.400937 2024] [core:notice] [pid 5618] AH00094: Command line: '/usr/sbin/apache2'
dlopen(): error loading libfuse.so.2
 AppImages require FUSE to run. 

I would

Thank you! I’ll give that a shot! That’s helpful as I didn’t notice the fuse bit…
-Shane

OK this is a good start…

-I definitely didn’t have FUSE. So that installed some packages.
-Next, I needed to do this step:

adopt to your system e.g. add sudo, www user etc…

occ config:app:set richdocuments wopi_url --value ${CODE_URL}
occ richdocuments:activate-config

I was able to view XML and config files at:
https://nextcloud.souXXXXX/apps/richdocumentscode/proxy.php?req=/hosting/discovery

and

https://nextcloud.souxxxxxxx/apps/richdocumentscode/proxy.php?req=/hosting/capabilities

But the problem remains. I am seeing the following in the browser

and this in the nextcloud log

This is my nextcloud office page, does this seem right? it only points to my TLD?

Collabora Online server is reachable.

Collabora Online Development Edition 24.04.1.3 89a7742

URL used by the browser: https://nextcloud.souXXXXX.biz
Nextcloud URL used by Collabora: https://nextcloud.souXXXXXX.biz (Determined from the browser URL)

not quite sure where to go from here, and haven’t gotten to addressing REDIS errors yet…

Thanks again y’all.

your Nextcloud server can not access /hosting/capabilities endpoint.

This could be due to DNS, firewall or other reasons… review the output of the curl command recommended in the above guide

maybe this helps:
http://nextcloud.souXXXXX.biz/status.php - :ok:
https://nextcloud.souXXXXX.biz/status.php - :ok:
http://nextcloud.soutXXXX.biz/nextcloud/apps/richdocuments/proxy.php?req=/hosting/capabilities - :no_entry:
https://nextcloud.soutXXXX.biz/nextcloud/apps/richdocuments/proxy.php?req=/hosting/capabilities - :no_entry:
http://nextcloud.soutXXXX.biz/nextcloud/apps/richdocuments/proxy.php?req=/hosting/discovery - :no_entry:
https://nextcloud.soutXXXX.biz/nextcloud/apps/richdocuments/proxy.php?req=/hosting/discovery - :no_entry:

Noting the above error was only a typo as the “http” naturally errored out… But… here’s the curl from the server and from a workstation.

1 Like

you don’t need any API key to access /hosting/capabilites and hosting/discovery both are anonymous endpoints allowing to detect capabilities of the WOPI host…

Really appreciate your help @wwe. Thanks for your generosity.
I ended up rebuilding the server this morning on another VM, going through the directions step by step and now Office is working properly. I can’t say I did anything different, but clearly something was. Thanks again. Wish I had the solution for the thread, but sometimes… you how how it is.

Thanks!

1 Like

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