NS8 Nextcloud - Onlyoffice error

Hi,
I’ve followed the instructions in github.

When I press save in the settings of the Onlyoffice app I get the following message:

Error when trying to connect (Error occurred in the document service: Error while downloading the document file to be converted.) (version 8.1.1.26)

What could it be?
Thanks.

Hi @Tiago,

please check the system log page for more details about the error.

Do you use valid certificates like Letsencrypt for Nextcloud and Onlyoffice?

Which distro do you use for NS8? Rocky?

Onlyoffice:

2024-11-25T22:40:30Z [1:onlyoffice1:onlyoffice-app]     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
2024-11-25T22:40:31Z [1:onlyoffice1:onlyoffice-app] [2024-11-25T22:40:31.249] [ERROR] [localhost] [check_1553712917] [userId] nodeJS - error downloadFile:url=https://nextcloud.xxxxxxxxxxx/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.W_5YRYRWPrsYT9vdxwJx1pqjmJ0EyZuJcLvC3UA_two;attempt=2;code:ECONNREFUSED;connect:null Error: connect ECONNREFUSED 192.168.yyy.yyy:443
2024-11-25T22:40:31Z [1:onlyoffice1:onlyoffice-app]     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
2024-11-25T22:40:32Z [1:onlyoffice1:onlyoffice-app] [2024-11-25T22:40:32.255] [ERROR] [localhost] [check_1553712917] [userId] nodeJS - error downloadFile:url=https://nextcloud..xxxxxxxxxxx/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.W_5YRYRWPrsYT9vdxwJx1pqjmJ0EyZuJcLvC3UA_two;attempt=3;code:ECONNREFUSED;connect:null Error: connect ECONNREFUSED 192.168.yyy.yyy:443
2024-11-25T22:40:32Z [1:onlyoffice1:onlyoffice-app]     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)

Nextcloud:

2024-11-25T22:40:34Z [1:nextcloud2:nextcloud-app] NOTICE: PHP message: [nextcloud][onlyoffice][3] {"reqId":"cP4Exgi1IwR4GIDQlH0F","level":3,"time":"2024-11-25T22:40:34+00:00","remoteAddr":"192.168.zzz.zzz","user":"admin","app":"onlyoffice","method":"PUT","url":"/apps/onlyoffice/ajax/settings/address","message":"{\"Exception\":\"Exception\",\"Message\":\"Error occurred in the document service: Error while downloading the document file to be converted.\",\"Code\":0,\"Trace\":[{\"file\":\"/var/www/html/custom_apps/onlyoffice/lib/DocumentService.php\",\"line\":104,\"function\":\"processConvServResponceError\",\"class\":\"OCA\\\\Onlyoffice\\\\DocumentService\",\"type\":\"->\",\"args\":[\"-4\"]},{\"file\":\"/var/www/html/custom_apps/onlyoffice/lib/DocumentService.php\",\"line\":452,\"function\":\"getConvertedUri\",\"class\":\"OCA\\\\Onlyoffice\\\\DocumentService\",\"type\":\"->\",\"args\":[\"https://nextcloud..xxxxxxxxxxx/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.W_5YRYRWPrsYT9vdxwJx1pqjmJ0EyZuJcLvC3UA_two\",\"docx\",\"docx\",\"check_1553712917\"]},{\"file\":\"/var/www/html/custom_apps/onlyoffice/lib/Controller/SettingsController.php\",\"line\":192,\"function\":\"checkDocServiceUrl\",\"class\":\"OCA\\\\Onlyoffice\\\\DocumentService\",\"type\":\"->\",\"args\":[[\"OC\\\\URLGenerator\",[\"OC\\\\User\\\\Session\"]],[\"OCA\\\\Onlyoffice\\\\Crypt\"]]},{\"file\":\"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php\",\"line\":230,\"function\":\"saveAddress\",\"class\":\"OCA\\\\Onlyoffice\\\\Controller\\\\SettingsController\",\"type\":\"->\",\"args\":[\"https://onlyoffice..xxxxxxxxxxx/\",\"\",\"\",true,\"6bhd4ndPQEk1fVrYzzFUlReAUU2XUo4S\",\"\",false]},{\"file\":\"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php\",\"line\":137,\"function\":\"executeController\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\",\"args\":[[\"OCA\\\\Onlyoffice\\\\Controller\\\\SettingsController\"],\"saveAddress\"]},{\"file\":\"/var/www/html/lib/private/AppFramework/App.php\",\"line\":184,\"function\":\"dispatch\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\",\"args\":[[\"OCA\\\\Onlyoffice\\\\Controller\\\\SettingsController\"],\"saveAddress\"]},{\"file\":\"/var/www/html/lib/private/Route/Router.php\",\"line\":315,\"function\":\"main\",\"class\":\"OC\\\\AppFramework\\\\App\",\"type\":\"::\",\"args\":[\"SettingsController\",\"saveAddress\",[\"OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer\"],[\"onlyoffice.settings.save_address\"]]},{\"file\":\"/var/www/html/lib/base.php\",\"line\":1069,\"function\":\"match\",\"class\":\"OC\\\\Route\\\\Router\",\"type\":\"->\",\"args\":[\"/apps/onlyoffice/ajax/settings/address\"]},{\"file\":\"/var/www/html/index.php\",\"line\":39,\"function\":\"handleRequest\",\"class\":\"OC\",\"type\":\"::\",\"args\":[]}],\"File\":\"/var/www/html/custom_apps/onlyoffice/lib/DocumentService.php\",\"Line\":257,\"message\":\"getConvertedUri on check error\",\"CustomMessage\":\"getConvertedUri on check error\"}","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36","version":"28.0.9.1"}
2024-11-25T22:40:34Z [1:nextcloud2:nextcloud-app] 127.0.0.1 -  25/Nov/2024:22:40:29 +0000 "PUT /index.php" 200
2024-11-25T22:40:34Z [1:nextcloud2:nextcloud-app] 127.0.0.1 -  25/Nov/2024:22:40:34 +0000 "PUT /ocs/v2.php" 200
2024-11-25T22:41:13Z [1:nextcloud2:nextcloud-app] 127.0.0.1 -  25/Nov/2024:22:41:13 +0000 "GET /ocs/v2.php" 304
2024-11-25T22:41:44Z [1:nextcloud2:nextcloud-app] 127.0.0.1 -  25/Nov/2024:22:41:43 +0000 "PUT /ocs/v2.php" 200

When I reported the error the certificate of Onlyoffice was self signed, now both have an Letsencrypt.

Rocky.

1 Like

Thanks for your feedback, I could reproduce the issue.

I also tried a newer Onlyoffice version but It seems that LAN IPs aren’t allowed anymore.
Onlyoffice still works on a VPS but doesn’t work in LAN environments.
There’s an option to allow it but it didn’t work in my tests.

I’m working on a fix and hope to release it soon.

EDIT:

An issue was already opened:

2 Likes