Error while downloading the document file to be converted (Cannot GET /apps/onlyoffice/empty)

Issues during installation, usage and configuring
Alexandre
Posts: 329
Joined: Thu Dec 12, 2019 11:08 am

Re: Error while downloading the document file to be converted (Cannot GET /apps/onlyoffice/empty)

Post by Alexandre » Tue Jul 14, 2020 7:40 am

Hello sisim.

I apologize for the delay in response, as I have been testing various scenarios.

Probably, we found a working solution.

I attached docker-compose.yml and nginx config file to this post.

The steps I did are as follows:
1. Clean Ubuntu 18.04. Installation of Docker and docker-compose.
2. Create folder /nginx/certificates. Inside folder “certificates” create folders cloud.yourdomain.com and office.yourdomain.com. You should place fullchain1.pem and privkey1.pem files inside each folder. In our test we used self-signed certs, but I would strongly recommend to use CA-signed certificates.
3. Check nginx-vhost.conf. You should place it here: /nginx/nginx-vhost.conf . Edit it, change youdomain.com to your domain address in all the lines.
4. Go to your DNS settings. Make sure that you created subdomain office and cloud (or any other name you like). In my test I used office for ONLYOFFICE and cloud for Nextcloud.
5. Place docker-compose.yml to the root folder and execute docker-compose up -d
6. Wait a few minutes and go to yourdomain.com. It will direct you to NextCloud page which defaults to configuration page. Create a user.
7. If you are using self-signed certificates, go to Document Server container and open /etc/onlyoffice/documentserver/default.json. Find line "rejectUnauthorized": true . Change it to false. After that execute supervisorctl restart all to restart all Document Server services.
8. Now check /etc/onlyoffice/documentserver/local.json. Make sure that you see this section:

Code: Select all

 },
      "token": {
        "enable": {
          "request": {
            "inbox": false,
            "outbox": false
          },
          "browser": false
If it is set to true, change it to false.

During the implementation I encountered CSP errors, the following steps describe the way I solved CSP problem:

9. Go to Nextcloud container. We changed 2 files:
a) etc/apache2/sites-enabled/000-default.conf
We added this section for resolve CSP errors in Nextcloud:

Code: Select all

<IfModule headers_module>

    RequestHeader set X-HTTPS 1

Header set Content-Security-Policy "default-src * 'unsafe-inline' 'unsafe-eval'; script-src * 'unsafe-inline' 'unsafe-eval'; connect-src * 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src *; style-src * 'unsafe-inline';"

</IfModule>
b) config.php
We added this lines to config:

Code: Select all

'allow_local_remote_servers' => true,
  'onlyoffice' =>
  array (
    'verify_peer_off' => true,
Also check this line
'trusted_domains' =>
array (
0 =>

and add here all your domains. For example:
'trusted_domains' =>
array (
0 => 'yourdomain.com', 'cloud.yourdomain.com','office.yourdomain.com',
),
10. Now go back to your browser and try to get access via cloud.yourdomain.com. You should get access to Nextcloud. Install ONLYOFFICE connector and set on connector’s page next addresses:
Document Editing Service address: https://office.yourdomain.com/
Secret key (leave blank to disable): leave this line empty.
Document Editing Service address for internal requests from the server: https://office.yourdomain.com/
Server address for internal requests from the Document Editing Service: https://cloud.yourdomain.com/

Now try to create a document and edit it.

Please note that I used a third-party article as an installation guide and can't guarantee that it will work stable: https://www.pterippi.fi/?featured=5d52e ... e=projects

There is also another option from our GitHub branch. This guide is working and stable, but there is no configuration of https: https://github.com/ONLYOFFICE/docker-on ... -nextcloud

I hope this solution will help you, or at least tell you the direction of further research.
Attachments
docker-compose and nginx.zip
(1.11 KiB) Downloaded 116 times

sisim
Posts: 28
Joined: Thu Apr 09, 2020 6:09 pm

Re: Error while downloading the document file to be converted (Cannot GET /apps/onlyoffice/empty)

Post by sisim » Thu Jul 16, 2020 7:37 am

Thanks Alexandre for your reply, but I'm not sure to understand. I'm using Apache, not Nginx. And my nextcloud is already installed and in production: I can't do a fresh install. Am I supposed to create the container with OO?

In step 2, 3, 4, is it within the container?

9. I have no Nextcloud container, it's installed directly within Debian. And what is a CSP error? Does it correspond to the errors I get in the log, posted in my messages above?

Thanks for your support

Alexandre
Posts: 329
Joined: Thu Dec 12, 2019 11:08 am

Re: Error while downloading the document file to be converted (Cannot GET /apps/onlyoffice/empty)

Post by Alexandre » Thu Jul 30, 2020 1:26 pm

Hello sisim.
Sorry for late reply.
In step 2, 3, 4, is it within the container?
No, steps 2 and 3 are done on the host. Step 4 is related to your DNS settings.
And what is a CSP error? Does it correspond to the errors I get in the log, posted in my messages above?
I don’t think so. CSP is the Content-Security-Policy. Most likely, I faced this errors due to missing headers in my test installation.

Sisim, unfortunately we don’t have ready-to-go solution for your installation. The options I suggested above assume a clean installation.
Please accept my sincere apologies.

sisim
Posts: 28
Joined: Thu Apr 09, 2020 6:09 pm

Re: Error while downloading the document file to be converted (Cannot GET /apps/onlyoffice/empty)

Post by sisim » Fri May 21, 2021 7:21 pm

Hello @Carl and @Alexandre,

I finally succeeded in installing OnlyOffice together with Nextcloud and made this documentation: https://github.com/biva/documentation/b ... ration.rst

Does it look correct for you? Please don't hesitate to modify it / give advice

Thanks!

Alexandre
Posts: 329
Joined: Thu Dec 12, 2019 11:08 am

Re: Error while downloading the document file to be converted (Cannot GET /apps/onlyoffice/empty)

Post by Alexandre » Mon May 24, 2021 2:45 pm

Hello sisim.
WOW! You did a great job! I was very surprised to see that this branch came to life again. Let me thank you for your hard work. I think your instructions can help users who are in a similar situation and do not want to do a clean installation.
By the way, we were working on this case as well.
We have prepared instructions for deployed Document Server and Nextcloud (https enabled) on the same machine: https://github.com/ONLYOFFICE/docker-on ... eature/ssl
The difference is our instruction requires a clean installation.

sisim
Posts: 28
Joined: Thu Apr 09, 2020 6:09 pm

Re: Error while downloading the document file to be converted (Cannot GET /apps/onlyoffice/empty)

Post by sisim » Tue Jun 29, 2021 1:17 pm

Thanks for your encouragement Alexandre! Do you see any mistakes in my documentation? Would you do some improvement? Optimisation? Where should it be published? (feel free to use it on your own website / documentation) I think it can be indeed useful because a lot of existing Nextcloud users cannot do a fresh install.

Alexandre
Posts: 329
Joined: Thu Dec 12, 2019 11:08 am

Re: Error while downloading the document file to be converted (Cannot GET /apps/onlyoffice/empty)

Post by Alexandre » Mon Jul 05, 2021 3:04 pm

Hello sisim.
Your example of solution stays here (on the forum).
In case we encounter a similar situation with another user, we will provide a link to this forum as a way to resolve the situation.
Your case is not standard. I mean, we usually don't recommend installing Document server on the same server as the storage is. But if necessary, then a clean installation is the preferred option (as docker installation from my last example).
Once again, we want to say thank you for your work and we are glad that the community is actively participating in the development of the product.

Post Reply