Mobile App no longer opening Collabora Office (Android)

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • NextCloud 34.0.0
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu Server 24.04 LTS
  • Web server and version (e.g, Apache 2.4.25):
    • Apache 2.4.58
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Nginx 1.30.2 (Arch Linux)
  • PHP version (e.g, 8.3):
    • 8.4
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • After Collabora CODE Docker Update
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • HassonIT VM Script
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • Yes, Cloudflare (Not applicable though).

Summary of the issue you are facing:

After a recent update to the Collabora CODE Docker, the official NextCloud app no longer opens up any files for local editing on the phone app. It works flawlessly on the web browser version, even on the phone, but not on the App Version.

I am running NextCloud Office Collabora Edition version 11.0.0
Collabora CODE version 26.04.1.4 (git hash: 7d478de54b)

Don’t know if this is relevant, but I’m also seeing a spam of this error in the logs of NextCloud:


Exception
fclose(): supplied resource is not a valid stream resource in file ‘/var/www/nextcloud/apps/richdocuments/lib/Service/RemoteService.php’ line 73
((Edit: This bug seems unrelated to the issue at hand. There’s an open Issue to resolve this bug, but there’s a proposed fix, which I have implemented.))

Also, if this helps, here’s my Reverse Proxy settings, the ones that would be relevant:

# Large file support
client_max_body_size 0;

# Static files
location ^~ /browser {
    proxy_pass http://Server-IP:9980;
    proxy_set_header Host $host;
}

# WOPI discovery
location ^~ /hosting/discovery {
    proxy_pass http://Server-IP:9980;
    proxy_set_header Host $host;
}

# Capabilities
location ^~ /hosting/capabilities {
    proxy_pass http://Server-IP:9980;
    proxy_set_header Host $host;
}

# Document websocket
location ~ ^/cool/ws$ {
    proxy_pass http://Server-IP:9980;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
    proxy_read_timeout 36000s;
}

# General cool/lool paths
location ~ ^/(c|l)ool {
    proxy_pass http://Server-IP:9980;
    proxy_set_header Host $host;
}

# Admin websocket - internal only
location ^~ /cool/adminws {
    (Redacted allowed IPs)
    deny all;

    proxy_pass http://Server-IP:9980;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
}

# Admin console UI - internal only
location ^~ /browser/dist/admin {
    (Redacted allowed IPs)
    deny all;

    proxy_pass http://Server-IP:9980;
    proxy_set_header Host $host;
}

I am having the same issue. Collabora is loading just fine in the browser, but since upgrading to Nextcloud 34.0.0 it no longer works in the app. It will just load indefinitely. Also seeing the same error: Exception: fclose(): supplied resource is not a valid stream resource in file '/config/www/nextcloud/apps/richdocuments/lib/Service/RemoteService.php' line 73

Heya,

Thanks for confirming I’m not the only one who’s experiencing this problem.

Seems the error in the logs we’re both getting is a PHP 8.X error with the way Nextcloud does its HTTP Client for the Richdocument.

In that file we both linked, there’s this at lines 72 to 76:
} finally {
fclose($stream);
}

Apparently, the quick fix is to replace that with this:
} finally {
// fclose($stream);
if (is_resource($stream)) {
fclose($stream);
}
}

And it should help to stop that error.

It doesn’t help the no loading from the app, but at least that log error can be fixed!

I’d like to add to this a bit more also.

Collabora CODE Docker admin panel sees that the request to open the file is there, and is opening and rendering the document. However, the Android App just keeps indefinitely loading. It seems the disconnect may be from the Android App not being able to load the embedded link.

I second that error. The same behavior - cannot open Office files AND PDF. Browser version on the phone works seamlessly. Collabora Server is rendering the documeent without errors.

Collabora Online Server: 26.04.1.4
Nextcloud Server: 34.0.0
PHP 8.5.4

Same here with code 25.04., nc server 34.0.1 and nc android 34.0.1 - works on browser like a charm incl from android device.

Playing around with different setups it seems to me android nextcloud client have issues with the template folder or template files if you open a existing od* file. Curious, i can create a new table or presentation from the android client but if i change this in the web interface no more load on android devices is available. And again from browser interface always works everything, from notebook and from android device.

It’s a known bug since Nextcloud 34:

It’s fixed with “Nextcloud Office (Collabora)” app version 11.0.1 (nextcloud/richdocuments)