NC21 php8 Collabora Online not open file

Hi,

This is m first time of the forum.
I have install Nextcloud 21 on a Centos8 server and php8.
So far, everything is working perfectly except Collabora Online. When I open the ‘Welcome to Nextcloud Hub.docx’ I get a white page with a spinning plate. After a while, the screen returns to the Documents directory and nothing get open.
When I run tail tail -f data/nextcloud.log I get this:

{"reqId":"YE86vvna7YFi6gsU5M6x9AAAABA","level":4,"time":"2021-03-15T10:45:18+00:00","remoteAddr":"87.68.114.xxx","user":"ncadmin","app":"no app in context","method":"GET","url":"/index.php/apps/files/ajax/getstoragestats.php?dir=%2FDocuments","message":{"Exception":"Error","Message":"Call to undefined method OC\\AllConfig::isGlobalScaleEnabled()","Code":0,"Trace":[{"file":"/home/trinicloud/web/live/public_html/apps/richdocuments/lib/AppInfo/Application.php","line":154,"function":"updateCSP","class":"OCA\\Richdocuments\\AppInfo\\Application","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/trinicloud/web/live/public_html/lib/private/AppFramework/Bootstrap/FunctionInjector.php","line":68,"function":"OCA\\Richdocuments\\AppInfo\\{closure}","class":"OCA\\Richdocuments\\AppInfo\\Application","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/trinicloud/web/live/public_html/lib/private/AppFramework/Bootstrap/BootContext.php","line":52,"function":"injectFn","class":"OC\\AppFramework\\Bootstrap\\FunctionInjector","type":"->","args":[{"__class__":"Closure"}]},{"file":"/home/trinicloud/web/live/public_html/apps/richdocuments/lib/AppInfo/Application.php","line":156,"function":"injectFn","class":"OC\\AppFramework\\Bootstrap\\BootContext","type":"->","args":[{"__class__":"Closure"}]},{"file":"/home/trinicloud/web/live/public_html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":176,"function":"boot","class":"OCA\\Richdocuments\\AppInfo\\Application","type":"->","args":[{"__class__":"OC\\AppFramework\\Bootstrap\\BootContext"}]},{"file":"/home/trinicloud/web/live/public_html/lib/private/legacy/OC_App.php","line":197,"function":"bootApp","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->","args":["richdocuments"]},{"file":"/home/trinicloud/web/live/public_html/lib/private/legacy/OC_App.php","line":137,"function":"loadApp","class":"OC_App","type":"::","args":["richdocuments"]},{"file":"/home/trinicloud/web/live/public_html/apps/dav/lib/AppInfo/Application.php","line":124,"function":"loadApps","class":"OC_App","type":"::","args":[["dav"]]},{"file":"/home/trinicloud/web/live/public_html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":176,"function":"boot","class":"OCA\\DAV\\AppInfo\\Application","type":"->","args":[{"__class__":"OC\\AppFramework\\Bootstrap\\BootContext"}]},{"file":"/home/trinicloud/web/live/public_html/lib/private/legacy/OC_App.php","line":197,"function":"bootApp","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->","args":["dav"]},{"file":"/home/trinicloud/web/live/public_html/lib/private/legacy/OC_App.php","line":137,"function":"loadApp","class":"OC_App","type":"::","args":["dav"]},{"file":"/home/trinicloud/web/live/public_html/lib/base.php","line":979,"function":"loadApps","class":"OC_App","type":"::","args":[]},{"file":"/home/trinicloud/web/live/public_html/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/home/trinicloud/web/live/public_html/apps/richdocuments/lib/AppInfo/Application.php","Line":225,"CustomMessage":"Could not boot richdocumentsCall to undefined method OC\\AllConfig::isGlobalScaleEnabled()"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.86 Safari/537.36","version":"21.0.0.18"}

Also get :
Failed to load Collabora Online - please try again later

Could anyone please provide some assistance?

Thank you,

Anyone please?

Same Problem over here…

Let’s hope someone here can help us both.
I’m stuck for idea as to how to troubleshoot it.

This happens to me when my nextcloud instance is behind a https reverse proxy. But when I access my nextcloud instance via http directly, I can open documents without issues. I am using containers via podman. Maybe we need extra configurations for the CODE container.

Https is needed for Talk. But Collabora online does not work when nextcloud is accessed via https. :frowning:

Hi,

Thank you for your feedback. I have 2 other Nextcloud 20 on the same server behind the same HA proxy and they both load collabora with no problem.

Do you think the issue is specific to collabora in version 21?

I have the same issue, current setup is LB infront of nextcloud v21.0.0.18

Finaly got my set-up working! I’m using podman for the database, nextcloud, and CODE :

podman run --detach \
  --env MYSQL_DATABASE=nextcloud \
  --env MYSQL_USER=nextcloud \
  --env MYSQL_PASSWORD=DB_USER_PASSWORD \
  --env MYSQL_ROOT_PASSWORD=DB_ROOT_PASSWORD \
  -v "$DB_VOLUME:/var/lib/mysql:z" \
  --network nextcloud-net \
  --restart on-failure \
  --name nextcloud-db \
  docker.io/library/mariadb

podman run --detach \
  --env MYSQL_HOST=nextcloud-db.dns.podman \
  --env MYSQL_DATABASE=nextcloud \
  --env MYSQL_USER=nextcloud \
  --env MYSQL_PASSWORD=DB_USER_PASSWORD \
  --env NEXTCLOUD_ADMIN_USER=NC_ADMIN \
  --env NEXTCLOUD_ADMIN_PASSWORD=NC_PASSWORD \
  --env NEXTCLOUD_TRUSTED_DOMAINS="localhost 192.169.101.193" \
  --env TRUSTED_PROXIES="localhost 192.169.101.193" \
  -v "$APP_VOLUME:/var/www/html:z" \
  -v "$DATA_VOLUME:/var/www/html/data:z" \
  -v "$LOG_VOLUME:/var/log:z" \
  --network nextcloud-net \
  --restart on-failure \
  --name nextcloud \
  --publish 8080:80 \
  docker.io/library/nextcloud

podman run --detach \
  --publish 9980:9980 \
  --network nextcloud-net \
  --name code \
  --privileged \
  -e "extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:net.post_allow.host[0]=.+ --o:storage.wopi.host[0]=.+" \
  docker.io/collabora/code

I have self-signed certificates which are used for my https reverse proxy:

/etc/pki/certs/code.csr
/etc/pki/certs/crt.csr

I then appended code.csr to the bundled certificate inside nextcloud container:

cat /etc/pki/certs/code.csr >> $APP_VOLUME/resources/config/ca-bundle.crt

Below are the configurations for the reverse proxy:

# /etc/nginx/conf.d/code.conf
server {
    listen       444 ssl;
    server_name  _;

    ssl_certificate "/etc/pki/certs/code.crt";
    ssl_certificate_key "/etc/pki/certs/code.key";

    error_log /var/log/nginx/code.error;
    
    location / {
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass http://192.169.101.193:9980;
    }
    
    # static files
    location ^~ /loleaflet {
        proxy_pass http://192.169.101.193:9980;
        proxy_set_header Host $http_host;
    }

    # WOPI discovery URL
    location ^~ /hosting/discovery {
        proxy_pass http://192.169.101.193:9980;
        proxy_set_header Host $http_host;
    }

    # Capabilities
    location ^~ /hosting/capabilities {
        proxy_pass http://192.169.101.193:9980;
        proxy_set_header Host $http_host;
    }

    # main websocket
    location ~ ^/lool/(.*)/ws$ {
        proxy_pass http://192.169.101.193:9980;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $http_host;
        proxy_read_timeout 36000s;
    }

    # download, presentation and image upload
    location ~ ^/lool {
        proxy_pass http://192.169.101.193:9980;
        proxy_set_header Host $http_host;
    }

    # Admin Console websocket
    location ^~ /lool/adminws {
        proxy_pass http://192.169.101.193:9980;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $http_host;
        proxy_read_timeout 36000s;
    }
}
# /etc/nginx/conf.d/nextcloud.conf

server {
    listen       442 ssl;
    server_name  _;

    ssl_certificate "/etc/pki/certs/nextcloud.crt";
    ssl_certificate_key "/etc/pki/certs/nextcloud.key";
    
    error_log /var/log/nginx/nextcloud.error;

    location / {
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass http://192.169.101.193:8080;
    }
    
    location /.well-known/carddav {
        return 301 http://192.169.101.193:8080/remote.php/dav;
    }

    location /.well-known/caldav {
        return 301 http://192.169.101.193:8080/remote.php/dav;
    }

}

Since I have self-signed certificates, the browser will complain. But if I accept the risk of self-signed certificates in http://192.169.101.193:444 and http://192.169.101.193:442 first, I can now use Collabora Online.

Hi,

In my case, I have no issue with SSL. I simply cannot open the .docx or any other document

Are you able to access the OK page of collabora online?

Umm good question, How do I get to the ok page?

You just go to hyperlink of your collabora online instance using your web browser. If your collabora online set up has no issues, you should see “OK”. In my setup it is http://192.169.101.193:9980 and https://192.169.101.193:444

When I access my domain via the port you provide, https://cloud.mydomain.co.uk:444 or https://cloud.mydomain.co.uk:9980 I get
This site can’t be reached

Of course because my set-up is different from yours. Those are the ports I assigned in the nginx reverse proxy and this can be seen in the config file I posted above.

Hi basilrabi,

Can you help me. I am out of options to troubleshoot. I also us nginx reverse proxy for nextcloud and collabora.

When I’m accessing true web browser all is working fine. Internal network and external network.

However when I am using the nextcloud android app I can login an see al files. Also open videos and stuff. But I can not open office files. It just keeps loading.

Is the phone client working for you?