NC 25.0.x Error while downloading the document file to be converted

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 25.0.3
Operating system and version (eg, Ubuntu 20.04): ubuntu-serer 22.04.1
Apache or nginx version (eg, Apache 2.4.25): NGinx
PHP version (eg, 7.4): 8.1

The issue you are facing:
Using external storage in Nextcloud and uploading PDF files to a folder in that external storage delivers log errors as here described

Is this the first time you’ve seen this error? (Y/N):N (error occurs since 24.0.x → 25.0.x … as well)

Steps to replicate it:

  1. use a nfs-kernel server as fileserver for your external storage
  2. export a share for the IP of your Nextcloud server
  3. go to the /etc/fstab file of your NC server and mount the nfs share as “local” folder
  4. go to the admin pages in your NC → external storage and include the “local” mountpoint as external storage
  5. be sure that the folder rights match to your webserver user (e.g. www-data) or make user “www-data” member of the “users” group so that file permissions fit as read/write
  6. allow users to use the external storage as space
  7. let one user upload a pdf file to that storage and see what happened in the error log of your nextcloud

The output of your Nextcloud log in Admin > Logging:

Fehler	onlyoffice	Exception: Im Dokumentenservice ist ein Fehler aufgetreten: Error while downloading the document file to be converted.		vor 2 Stunden
Fatal	onlyoffice	Download without access right		vor 2 Stunden
Fatal	onlyoffice	Download without access right		vor 2 Stunden
Fatal	onlyoffice	Download without access right		vor 2 Stunden

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

see bug report on github

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.

[onlyoffice] Fatal: Download without access right

GET /apps/onlyoffice/download?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJkb3dubG9hZCIsImZpbGVJZCI6NjcwNzEwMywidXNlcklkIjoiY2hyaXN0aWFuIn0.B2Piiw3-M0pMpdb79AMXRUKo9PTb5Oik_7f5rPP-U9g
from 172.17.0.2 by username at 2023-01-20T09:15:57+01:00

AND

[onlyoffice] Fehler: Exception: Im Dokumentenservice ist ein Fehler aufgetreten: Error while downloading the document file to be converted. at <>

  1. /var/www/nextcloud/apps/onlyoffice/lib/documentservice.php line 95
    OCA\Onlyoffice\DocumentService->ProcessConvServResponceError()
  2. /var/www/nextcloud/apps/onlyoffice/lib/preview.php line 269
    OCA\Onlyoffice\DocumentService->GetConvertedUri()
  3. /var/www/nextcloud/lib/private/Preview/ProviderV1Adapter.php line 53
    OCA\Onlyoffice\Preview->getThumbnail()
  4. /var/www/nextcloud/lib/private/Preview/GeneratorHelper.php line 65
    OC\Preview\ProviderV1Adapter->getThumbnail()
  5. /var/www/nextcloud/lib/private/Preview/Generator.php line 343
    OC\Preview\GeneratorHelper->getThumbnail()
  6. /var/www/nextcloud/lib/private/Preview/Generator.php line 162
    OC\Preview\Generator->getMaxPreview()
  7. /var/www/nextcloud/lib/private/Preview/Generator.php line 114
    OC\Preview\Generator->generatePreviews()
  8. /var/www/nextcloud/lib/private/PreviewManager.php line 185
    OC\Preview\Generator->getPreview()
  9. /var/www/nextcloud/core/Controller/PreviewController.php line 144
    OC\PreviewManager->getPreview()
  10. /var/www/nextcloud/core/Controller/PreviewController.php line 113
    OC\Core\Controller\PreviewController->fetchPreview()
  11. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 225
    OC\Core\Controller\PreviewController->getPreviewByFileId()
  12. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 133
    OC\AppFramework\Http\Dispatcher->executeController()
  13. /var/www/nextcloud/lib/private/AppFramework/App.php line 172
    OC\AppFramework\Http\Dispatcher->dispatch()
  14. /var/www/nextcloud/lib/private/Route/Router.php line 298
    OC\AppFramework\App::main()
  15. /var/www/nextcloud/lib/base.php line 1047
    OC\Route\Router->match()
  16. /var/www/nextcloud/index.php line 36
    OC::handleRequest()

GET /core/preview?fileId=6707103&c=5fabc72973248646fb402d7965c67d99&x=250&y=250&forceIcon=0&a=0
from IP by username at 2023-01-20T09:16:01+01:00



Update 25.01.2023:

I uploaded a pdf file via webdav under linux with double commander.
After finishing the upload the error does not occur!

BUT the errors / fatals occur directly when first time opening the uploaded pdf file with pdf viewer in the webui of the nextcloud. Never the less the pdf file opens in foreground (for the user) without any errors or restrictions. So only the onlyoffice errorlog shows what happens (in background) on the server.

For the moment i only can reproduce those onlyoffice errors /fatals with pdf files and in combination with external storage.

Why the webdav upload does not affect onlyoffice to log errors / fatals is not clear.

Question at the admins here,

can anyone tell me what this tag (see image) is good for? Where does this cause access action on the storage?

Because when deactivating this tag, the errors during upload of *.pdf *.docx *.xlsx (Office files) does not occur!

Otherwhise opening pdf files that has been uploaded via WebDAV first time via WebUI does also not cause errors in the log of nextcloud as well.

What is still not working with or without setting this tag is to open, edit document files IN an external storage!
Example
I create a new doc (*.xlsx) → OO opens and timed out after a few seconds (“…error occur…”)
NC log says “Download without access right”
Checking the file access rights on the server i have owner:group = www-data:www-data
i have linux access rights 644

I move over this file from external to local storage and i can open and edit this file.
Moving this file (for me) means deleting it on the external storage what is only possible with write access, well?

Why ONLYOFFICE tells me that there is insufficient file access?

My external storage is connected with NFSv4 so Domain, Usernames as well are used on both sides.
The nfs-kernel-server is ubuntu server 22.04.2 as well (same like NC server) so uid,gid are on both sides 33.

Ok folks i am some steps further with my investigations about these errors.

In fact that i am using the app File access control and block access from outer LAN to some folders (the external storage folders as well!!) the onlyoffice app is not able to edit files in that storages.

Wondering why it is possible for Onlyoffice to store a blabla.docx / xlsx file first but after that not being able to get access with the editor.

The folders are ćollaborative tagged and my filter is checking these tags as well as the access IP.

Adding a filter for IP 172.17.0.2 didn’t help. Following the NC logfiles this is the IP the GET command comes from.

Now my question to all here: do someone know a rule that enables file access to my Onlyoffice Docker also to these folders that are collaborative tagged and so blocked for users who are not in LAN or accessing files via a special VPN IP?

Can others please test this scenario → using file access control app in combination with Onlyoffice (docker) access.
→ create new files (docx, xlsx) in a folder that is hit by file access control app (workflow → filters)

Thanks to all!

P.S.: I am aware that with NC 25.0.4 there is also a bug using tag editor in file access rules because of this bug
Collaborative tags cannot be found · Issue #300 · nextcloud/files_accesscontrol · GitHub

In NC 25.0.5 they will fix this if i’m right…