Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't open this document: "Can't open this document. This file isn't available offline" #11975

Open
4 tasks done
w9hdg opened this issue Sep 17, 2023 · 39 comments
Open
4 tasks done

Comments

@w9hdg
Copy link

w9hdg commented Sep 17, 2023

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

Ensure that your android phone is updated with both the current OS (Android 13 in my case) and current NextCloud app (3.26.0). Attempt to open any file with a .docx, .xlsx, etc. An error screen will pop up saying

"Can't open this document
This file isn't available offline. Make
file "Available offline" in the file's options menu."

My phone is on the same network as my NextCloud server and collabora works as expected in my browser on my computer and via firefox on my phone.

Expected behaviour

The app previously would load collabora and open the document

Actual behaviour

Receive an error message saying:

"Can't open this document
This file isn't available offline. Make
file "Available offline" in the file's options menu."

Android version

13

Device brand and model

Google Pixel 7

Stock or custom OS?

Stock

Nextcloud android app version

3.26.0

Nextcloud server version

27.1.0

Using a reverse proxy?

Yes

Android logs

No response

Server error logs

No response

Additional information

No response

@w9hdg w9hdg added the bug label Sep 17, 2023
@mnheia
Copy link

mnheia commented Sep 18, 2023

I can confirm the same issue.

Device brand and model

  • Google Pixel 6
  • OnePlus

Stock or custom OS?

  • Stock

Nextcloud android app version

  • 3.26.0

Nextcloud server version

  • 27.0.2.

@cryologic
Copy link

Also confirming the same issue.

Device brand and model
Google Pixel 7a

Stock or custom OS?
Stock

Nextcloud android app version
3.26.0

Nextcloud server version
27.0.2

@mnheia
Copy link

mnheia commented Sep 19, 2023

@w9hdg, @cryologic

I was playing around and it appears to me that the issue is in the fact that config is not set properly.
This seems to resolve the issue for me. Can you give it a try?

sudo -u www-data php -f /opt/nextcloud/occ config:app:set richdocuments mobile_editing --value="yes"

Obviously change 'www-data' with your 'web' user and the path '/opt/nextcloud/occ' according to your setup.

@cryologic
Copy link

cryologic commented Sep 19, 2023

Can you give it a try?
sudo -u www-data php -f /opt/nextcloud/occ config:app:set richdocuments mobile_editing --value="yes"

I'm not running the richdocuments app, I'm running a standalone CODE server. Not sure where to allow mobile editing?
(I did try the above anyway with understandably no success)

@lckarssen
Copy link

I run the Nextcloud Office app (with CODE on the same machine as Nextcloud) and adding that setting (it didn't exist before) didn't work for me.

@mr-bolle
Copy link

mr-bolle commented Sep 21, 2023

sudo -u www-data php -f /opt/nextcloud/occ config:app:set richdocuments mobile_editing --value="yes"

@mnheia thanks for this hind 👍

with the Nextcloud integration Collabora Server, i can now edit Office Documents.
I try with follow Nextcloud Android App v3.26.0 and DEV v20230921

@zpackrat
Copy link

Can confirm setting the flag to yes works..odd how 3.25 didn't honor that setting, but 3.26 does. Thanks for posting the fix.

@ralfi
Copy link

ralfi commented Oct 3, 2023

Confirm with android 3.26 and NC Docker 27.1.1
Thanks a lot!

@joshtrichards
Copy link
Member

If occ config:app:set richdocuments mobile_editing --value="yes" fixes the matter for you then you have #11979 which has since been fixed (it was a richdocuments app bug: nextcloud/richdocuments#3184).

@w9hdg Are you still experiencing this either after applying that fix or upgrading the richdocuments app? THis is your issue so I'll leave it open for now just in case it's not that matter.

@cryologic Did this work previously but stop working for you after updating the Android client... or are you simply unable to open documents?

@lckarssen Did this work previously but stop working for you after updating the Android client... or are you simply unable to open documents?

@joshtrichards joshtrichards added the needs info Waiting for info from user(s). Issues with this label will auto-stale. label Oct 15, 2023
@lckarssen
Copy link

@joshtrichards I just tested again (see also #12039 (comment)), with these versions:

  • richdocuments: 8.2.0
  • richdocumentscode: 23.5.403

Editing on mobile used to work, before I chimed in on this topic. However, as I don't use this feature often, I can't say for sure when it stopped working.

After I found this issue I tried setting mobile_editing to yes, but that didn't work, so I removed the setting again. Tonight, after seeing your update I tried again, but still no luck.

@lckarssen
Copy link

lckarssen commented Oct 15, 2023

OK, I just tried to edit on another device, a Lenovo Tab P11 Gen2 I bought recently, and there the remote editing (by directly "clicking" on the file) works fine (my main device is a Samsung S22 phone) 😕. Both devices run version 3.26.0 of the Nextcloud app. As (just) noted/edited in #12039 (comment), using "Edit" in the ... menu for the file does open the (remote) editor.

[Edit]

I tested on two other devices, an older Samsung S2 tablet and an S20FE phone (different user account), and those worked fine too. All devices are connected to the same Nextcloud server.

Back on my S22 I have now also tested opening/editing a file on a different Nextcloud server. That didn't work either.

@cryologic
Copy link

@cryologic Did this work previously but stop working for you after updating the Android client... or are you simply unable to open documents?

Yes, previous to Android client upgrade, it was working.

@lckarssen
Copy link

Another data point: I just tested two other Nextcloud servers with my S22. Neither opened the remote editor when "clicking" on the test .odt file. Both servers run Nextcloud 27.1.2, one runs Nextcloud Office app 8.2.0, the other runs version 8.2.1. of the app. Both have CODE running on a separate VM.

@joshtrichards joshtrichards removed the needs info Waiting for info from user(s). Issues with this label will auto-stale. label Nov 6, 2023
@mhzawadi

This comment was marked as resolved.

@joshtrichards

This comment was marked as resolved.

@mhzawadi

This comment was marked as resolved.

@joshtrichards
Copy link
Member

Ensure that your android phone is updated with both the current OS (Android 13 in my case) and current NextCloud app (3.26.0). Attempt to open any file with a .docx, .xlsx, etc. An error screen will pop up saying

"Can't open this document
This file isn't available offline. Make
file "Available offline" in the file's options menu."

My phone is on the same network as my NextCloud server and collabora works as expected in my browser on my computer and via firefox on my phone.

The original report (I can't speak to the other commenters because they may or may not be the same situation) indicates three things:

  1. Nextcloud Office is not being detected as available by the Android client app server-side (i.e. via the capabilities check) [this would be the specific bug covered in this Issue]
  2. Since there's no server-side editor detected, the Android client is passing the file off to the OS to load it with whatever app(s) have registered themselves locally to open that file [this is expected behavior when there's no server-side editor detected]
  3. The local app(s) are having a problem opening our provided link to the file [this is the cause of the "Can't open this document. This file isn't available offline" dialog, which is from the OS and not the client but we may still be contributing to the cause of - it's likely Can't open MS Office files with external apps #11216]

Focusing on item one since that's the original reporter's matter (and items two and three shouldn't even be getting triggered if the goal is to use the server-side editor), here's how we can help debug this to find out if it's something that needs to be fixed in the client or on the server:

  • Run a cURL query against the server's the client is exhibiting this behavior with:

curl -u USERNAME:PASSWORD -X GET 'https://cloud.domain.com/ocs/v1.php/cloud/capabilities' -H "OCS-APIRequest: true"

Look for a section in the XML entitled <richdocuments>. If it's not there, that's a server-side matter. If it's there, share it here so we can try to figure out why the client isn't detecting or trying to use the remote editor.

@ralfi

This comment has been minimized.

@pwyde

This comment has been minimized.

@joshtrichards
Copy link
Member

joshtrichards commented Jan 25, 2024

I also have the issue. Unable to open office documents in Android app (*.ods, *.odt files). After selecting "edit" on a document the mobile app does not open the document and the "spinner" just spins.

@pwyde - This report is specific to the below error message received in v3.26. Your situation sounds more like #11975 (comment)

"Can't open this document
This file isn't available offline. Make
 file "Available offline" in the file's options menu." 

Hi, can not find any richdocuments sections in the XML output. But - as described - this behavior also at me is only if i tried to open a document from my Android phone with Nextcloud Client.
( Server 28.0.1, Client 3.27.0 )

@ralfi You might have two problems. Since you're using v3.27.0, you would encounter #12338. Except if your server is saying it doesn't offer the capability to open Office documents then you're not even getting far enough to trigger that bug. If there truly is no richdocuments section in the XML, can you confirm on your server that you can open Office documents alright? Does the menu Administration settings->Nextcloud Office show green in your Nextcloud Server's admin account?

@joshtrichards joshtrichards changed the title Can't open this document Can't open this document: "Can't open this document. This file isn't available offline" Jan 25, 2024
@pwyde

This comment has been minimized.

@ralfi

This comment has been minimized.

@joshtrichards

This comment has been minimized.

@ralfi

This comment has been minimized.

@joshtrichards

This comment has been minimized.

@ralfi

This comment has been minimized.

@joshtrichards

This comment has been minimized.

@ralfi
Copy link

ralfi commented Jan 26, 2024

@joshtrichards Thank you, i wait until 3.27.1 is released and check it again.

@ghost
Copy link

ghost commented Feb 18, 2024

Hey @joshtrichards is this the same issue as I'm having in thr below screenshot ? Just wanted to confirm before I create another issue.

I'm unable to open any documents via android client only I'm using collabora server just get the spininh circle

Screenshot_20240218_110336_Nextcloud.jpg

@ralfi
Copy link

ralfi commented Feb 19, 2024

Okay, solved with latest android app from today. Thanks a lot!

@ghost

This comment was marked as resolved.

@mr-bolle
Copy link

Hi, i have the same behavior. After the current update to v3.28.0 the issue are gone.

@overflow-ITA
Copy link

Update to 3.28 resolve for me too

@joshtrichards
Copy link
Member

@AndyXheli Yours looks like #12338, but it's the same matter that has come up in this issue several times. That's fixed in, well, now the just released v3.28.0.

@ghost
Copy link

ghost commented Feb 20, 2024

@AndyXheli Yours looks like #12338, but it's the same matter that has come up in this issue several times. That's fixed in, well, now the just released v3.28.0.

Thank you very much 🙂

@Sommerwiesel
Copy link

Sommerwiesel commented Mar 18, 2024

Hello,
still happening for me even after update to v3.28.0:

Device
Google Pixel 4

Stock or custom OS?
Stock

Nextcloud android app version
3.28.0

Nextcloud server version
27.1.7

Using a reverse proxy?
Yes, nginx

Other info
No server-side editor is installed.
The files are all .doc, trying to open with Google Docs

Update:
It's only broken with apps that try to "edit" the file.
If I try using "Librera Reader" which only shows the file contents read-only, it works.

info.jpg
error.jpg

@Sommerwiesel
Copy link

Sommerwiesel commented Mar 20, 2024

Update:

The problem was an old installation of richdocuments (collabora), which upon uninstallation half a year ago, had some leftovers, that caused all these issues with editable documents.

I just tried reinstalling richdocuments (with a self-hosted collabora) and ran into a plethora of problems upon installation, all due to left-over invalid values, most of them in the database.
After wiping these left-overs, everything suddenly worked (with or without richdocuments).

The problem (problematic leftovers) is already known on the github of nextcloud/richdocuments so I'm not gonna open another issue.

FYI for anyone having similar problems even after 3.28.0: Clean your system of any richdocuments left-overs and/or cleanly reinstall it.

@felixschndr
Copy link

The problem (problematic leftovers) is already known on the github of nextcloud/richdocuments so I'm not gonna open another issue.

Can you please provide a link to this, I am facing the same issue

@felixschndr
Copy link

felixschndr commented Apr 2, 2024

I am running into the same issue but only sometimes:

  • I (user a) can open files
  • Another user cannot open files and gets this error. This seems to be per user as the mobile device of the user changed and the error occurred with the old phone and the new one.

Does somebody face the same behaviour?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests