Nextcloud-Office: non stop circling `loading yxz.docx ...`

I’m not an real admin, even I host nextcloud by myself at my hoster. I’m a user.

I run nextcloud over a couple of years, coming from owncloud.

I have installed several attempt getting collaborate document working. Maybe that “several installation” face the problem?

| Nextcloud version (eg, 26.0.1): | 27.1.2 |
| Operating system and version (eg, Ubuntu 22.04): | CentOS Linux release 7.9.2009 |
| Apache or nginx version (eg, Apache 2.4.25): | Apache/2.4.57 |
| PHP version (eg, 8.1): | 8.2 |
| Database (sqlite or MariaDB or Postgres) | MariaDB 15.1 |
| Docker (compose) | n/a |
| Snap | n/a |
| Is this the first time you’ve seen this error? | no
How to install Collabora Online |

The issue you are facing:

  1. I have installed Collabora Online - Built-in CODE Server 23.5.502
  2. At the moment also Nextcloud Office 8.2.1

The Problem is, that I get after clicking any document a non stop circling loading yxz.docx ...

I tried installing different apps to get document working in collaboaration.

It can be, there is a configuration issue from the past, facing this issue. I don’t know how to fix it.

Steps to replicate it:

Every time I access an document.

The output of your Nextcloud log in Admin > Logging:


{"reqId":"ZTvoiGyv6_ysPiInUZyktQAAARc","level":3,"time":"2023-10-27T16:43:18+00:00","remoteAddr":"2003:eb:6f16:4200:1459:5679:158e:f877","user":"ADMIN","app":"internet_connection_check","method":"GET","url":"/NEXTCLOUD/index.php/settings/ajax/checksetup","message":"Cannot connect to: www.nextcloud.com","userAgent":"Mozilla/5.0 (Android 12; Mobile; rv:109.0) Gecko/119.0 Firefox/119.0","version":"27.1.2.1","exception":{"Exception":"GuzzleHttp\\Exception\\ConnectException","Message":"cURL error 28: Operation timed out after 30001 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://www.nextcloud.com/","Code":0,"Trace":[{"file":"/var/www/virtual/USER/html/NEXTCLOUD/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":158,"function":"createRejection","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":110,"function":"finishError","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::","args":[["GuzzleHttp\\Handler\\CurlHandler"],"*** sensitive parameters replaced ***",["GuzzleHttp\\Handler\\CurlFactory"]]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php","line":47,"function":"finish","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::","args":[["GuzzleHttp\\Handler\\CurlHandler"],"*** sensitive parameters replaced ***",["GuzzleHttp\\Handler\\CurlFactory"]]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":137,"function":"__invoke","class":"GuzzleHttp\\Handler\\CurlHandler","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/lib/private/Http/Client/DnsPinMiddleware.php","line":114,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php","line":35,"function":"OC\\Http\\Client\\{closure}","class":"OC\\Http\\Client\\DnsPinMiddleware","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":31,"function":"__invoke","class":"GuzzleHttp\\PrepareBodyMiddleware","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php","line":71,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":63,"function":"__invoke","class":"GuzzleHttp\\RedirectMiddleware","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php","line":75,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/3rdparty/guzzlehttp/guzzle/src/Client.php","line":331,"function":"__invoke","class":"GuzzleHttp\\HandlerStack","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/3rdparty/guzzlehttp/guzzle/src/Client.php","line":168,"function":"transfer","class":"GuzzleHttp\\Client","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/3rdparty/guzzlehttp/guzzle/src/Client.php","line":187,"function":"requestAsync","class":"GuzzleHttp\\Client","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/lib/private/Http/Client/Client.php","line":230,"function":"request","class":"GuzzleHttp\\Client","type":"->","args":["*** sensitive parameters replaced ***","http://www.nextcloud.com/",["/var/www/virtual/USER/NEXTCLOUD_data/files_external/rootcerts.crt",30,[true],["Nextcloud Server Crawler","gzip"],true]]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/apps/settings/lib/Controller/CheckSetupController.php","line":224,"function":"get","class":"OC\\Http\\Client\\Client","type":"->","args":["http://www.nextcloud.com/"]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/apps/settings/lib/Controller/CheckSetupController.php","line":206,"function":"isSiteReachable","class":"OCA\\Settings\\Controller\\CheckSetupController","type":"->","args":["www.nextcloud.com"]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/apps/settings/lib/Controller/CheckSetupController.php","line":921,"function":"hasInternetConnectivityProblems","class":"OCA\\Settings\\Controller\\CheckSetupController","type":"->","args":[]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"check","class":"OCA\\Settings\\Controller\\CheckSetupController","type":"->","args":[]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Settings\\Controller\\CheckSetupController"],"check"]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Settings\\Controller\\CheckSetupController"],"check"]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\CheckSetupController","check",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["settings.CheckSetup.check"]]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/lib/base.php","line":1068,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/ajax/checksetup"]},{"file":"/var/www/virtual/USER/html/NEXTCLOUD/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/virtual/USER/html/NEXTCLOUD/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","Line":210,"message":"Cannot connect to: www.nextcloud.com","exception":{},"CustomMessage":"Cannot connect to: www.nextcloud.com"}}

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


<?php
$CONFIG = array (
  'instanceid' => 'ocx000000000000',
  'passwordsalt' => 'abc123abc123abc123abc123',
  'secret' => 'SECRET123secret123',
  'trusted_domains' => 
  array (
    0 => 'DOMAIN.de',
  ),
  'datadirectory' => '/var/www/virtual/USER/NEXTCLOUD_data',
  'dbtype' => 'mysql',
  'version' => '27.1.2.1',
  'overwrite.cli.url' => 'https://DOMAIN.de/NEXTCLOUD',
  'dbname' => 'USER_NEXTCLOUD',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'USER',
  'dbpassword' => 'SECRETsecret',
  'default_phone_region' => 'DE',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'theme' => '',
  'loglevel' => 2,
  'allow_local_remote_servers' => true,
  'maintenance' => false,
  'mail_from_address' => 'USER',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'DOMAIN.de',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'HOST.DOMAIN.de',
  'mail_smtpport' => '587',
  'mail_smtpname' => 'USER',
  'mail_smtppassword' => 'USER',
  'app_install_overwrite' => 
  array (
    0 => 'files_external',
    1 => 'files_texteditor',
    2 => 'audioplayer_sonos',
    3 => 'calendar_resource_management',
    4 => 'documentserver_community',
  ),
  'data-fingerprint' => 'abcd12345ABCD123456666',
  'encryption.legacy_format_support' => false,
  'encryption.key_storage_migrated' => false,
  'has_rebuilt_cache' => true,
);

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.

is empty ...

Has nobody any idea to help?

I think I have a similar problem. Have you checked if the problem persists in Chrome/Chromium?

For me the problem is only in firefox 123, not in chromium 121.0.6167.160
with Nextcloud Office / Collabora Office 23.05.9.1

If I open a file in Firefox, the document loading is stuck at 0% and then I see the error (German) “Fehler beim Laden des Dokuments. Dieses Dokument ist entweder fehlerhaft oder beansprucht mehr Ressourcen als zulässig. bitte wenden Sie sich an den Administrator”. We contacted our hoster, they said there is nothing they can do.

I Just re-installed CODE Server and Nextcloude Office.
I did not do anything with WHOPI.

I installed chromium

Further I get the “loading …docx” -circle

your collabora-built-in should be recheable from outside (the client) and serrver system at in case you are using collabora-built-in it is hosted at ${server}/apps/richdocumentscode/proxy.php?req=/hosting/discovery
When you access this URL with browser (client) and curl (on the server) you should see an XML document describing CODE capabilities

review the contents of this document - it must reflect the right server address and right URI scheme (https://). Further it must be the same as Nextcloud URI scheme.

As you have overwrite* parameters in you config.php you likely you a reverseproxy it is crucial for to enable reverse proxy to send X-FORWARDED-* http headers otherwise collabora-built-in doesn’t know it location and doesn’t work.

May be my problem is at deeper side.

If I understand it correct I have to use the URL at https://MyDomain/MyNextcloud/apps/richdocumentscode/proxy.php?req=/hosting/discovery

Here I get on 504 Gateway Timeout :frowning_face:

In my configuration I have done:

  • Collabora Online - Built-in CODE Server
    You have the Collabora Online app enabled. For further information and configuration, please check: Administration settings > Nextcloud Office

  • Nextcloud Office
    Collabora Online server is reachable.
    Use the built-in CODE - Colllabora Online Development Edition

    • Advanced settings
      Allow list for WOPI requests
      xxx.xxx.xxx.xxx, yyyy:yyyy:yyy:y:yyyy:yyyy:yyyy:yyyy I got from my Provider.

I don’t know what I have to look for.

yes you understand it right and you must solve the 504 problem.

Yeah, I got the access done now.

<wopi-discovery>
<net-zone name="external-http">
<!-- Writer documents -->
<app favIconUrl="https://MyDomain/Nextcloud/apps/richdocumentscode/proxy.php?req=/browser/89a7742/images/x-office-document.svg" name="writer">
<action default="true" ext="sxw" name="view" urlsrc="https://MyDomain/Nextcloud/apps/richdocumentscode/proxy.php?req=/browser/89a7742/cool.html?"/>
<action default="true" ext="odt" name="edit" urlsrc="https://MyDomain/Nextcloud/apps/richdocumentscode/proxy.php?req=/browser/89a7742/cool.html?"/>
<action default="true" ext="fodt" name="edit" urlsrc="https://MyDomain/Nextcloud/apps/richdocumentscode/proxy.php?req=/browser/89a7742/cool.html?"/>
<!-- Text template documents -->
<action default="true" ext="stw" name="view" urlsrc="https://MyDomain/Nextcloud/apps/richdocumentscode/proxy.php?req=/browser/89a7742/cool.html?"/>
<action default="true" ext="ott" name="view" urlsrc="https://MyDomain/Nextcloud/apps/richdocumentscode/proxy.php?req=/browser/89a7742/cool.html?"/>
<!-- MS Word -->
<action default="true" ext="doc" name="edit" urlsrc="https://MyDomain/Nextcloud/apps/richdocumentscode/proxy.php?req=/browser/89a7742/cool.html?"/>
<action default="true" ext="dot" name="view" urlsrc="https://MyDomain/Nextcloud/apps/richdocumentscode/proxy.php?req=/browser/89a7742/cool.html?"/>
<!-- OOXML wordprocessing -->
:
:

But the dokuments get further in trouble loading.
After a time cycling I get the error

“loading of dokument failed
Nextcloud Office could not get loaded - Please try again later”

Any further idea?

after you got the networking right I would recommend restart Nextcloud and collect new logs from the server and client (F12 tools)

ups, how should I restart Nextcloud ?
I just searched and had a look to OCC commands but can’t find a command
. As the cloud run at my hoste, I’m not able to restart the server itself.

likely dis-/enable richdocuments app would refresh it as well. nobody can help you - you are the admin and it is your job to maintain your system.

Yes, you are right :grimacing:
I have to learn an deeper dive into …