Blank page when displaying a file with Onlyoffice

Hi there,
I post here because my last tests was with Onlyoffice, but I have the same problem with Collabora.
On a CentOS 7.2 server, with Seafile 6.1.1 (upgraded without error from 5.1.3), I installed Onlyoffice as described on https://manual.seafile.com/deploy/only_office.html. I tried as a subdomain or in a subfolder, same thing :
when I choose a doc (odt, ods, xls,… No difference) I get a totally blank page.
Onlyoffice seems to work well (“Document Server is running” when accessing on url (or on Seafile url/folder when it was configured as subfolder).
As I said, I tried first with Collabora and… That was strickly the same problem ! :rage:

Actually seahub_settings.py is configured with

Enable Only Office

ENABLE_ONLYOFFICE = True
VERIFY_ONLYOFFICE_CERTIFICATE = False
ONLYOFFICE_APIJS_URL = ‘http://127.0.0.1:88/web-apps/apps/api/documents/api.js
ONLYOFFICE_FILE_EXTENSION = (‘doc’, ‘docx’, ‘ppt’, ‘pptx’, ‘xls’, ‘xlsx’, ‘odt’, ‘fodt’, ‘odp’, ‘fodp’, ‘ods’, ‘fods’)
ONLYOFFICE_EDIT_FILE_EXTENSION = (‘docx’, ‘pptx’, ‘xlsx’)

On the blank page with Onlyoffice, if I display the source, I have this (I’ve change url and file name) :

</head>
<title>Tesfile.xls</title>
<link rel="icon" href="/media/img/favicon.ico" />

<div id="placeholder"></div>

<script type="text/javascript" src="http://127.0.0.1:88/web-apps/apps/api/documents/api.js"></script>
<script type="text/javascript">

var config = {
"document": {
"fileType": "xls",
"key": "e87f276b595158b10b38",
"title": "Testfile.xls",
"url": "https://seafile.mydomain.com/seafhttp/files/f84b5de9-c0de-43e5-a23b-7b45abe7dba7/Testfile.xls",
"permissions": {
"download": true,
"edit": true,
"print": true,
"review": true
},
},
"documentType": "spreadsheet", // 'text' | 'spreadsheet' | 'presentation',
"editorConfig": {
"callbackUrl": "https://seafile.mydomain.com/onlyoffice/editor-callback/",
"lang": "fr",
"mode": "edit",
"user": {
"name": "myusername"
}
},
};
var docEditor = new DocsAPI.DocEditor("placeholder", config);
</script>

I see no error on seahub log. I tried also to configure a nginx vhost with a proxy to the docker port 88, same problem, and no error in nginx log (all requests have a 200 return code).
Tried on a Mint desktop with Firefox and Chrome.

What can I try to debug this ???
Thanks for suggestions !

That won’t work. Clients from EXTERNAL need to access this URL. Please read the manual carefully as it explains what you have to do.

Thanks,
unfortunatly, the config I paste here was the last one, but I have tried with an url. Onlyoffice is accessible from external (this how I see “Document Server is running”) with an url like “onlyoffice.mydomain.com”, by a proxy under nginx.
Putting this url in place of “127.0.0.1:88” display the same blank page, just “onlyoffice.mydomain.com” in place of “127.0.0.1:88” in the source html.

I had tried it (127.0.0.1 or public url) with Collabora, that was the same.

Do not put the port in the Seafile config file unless you really want to run the DocumentServer under this port.
Seafile needs to know the URL to the DServer as you access it from external.

Read the manual again, it works 100%. Several people have tried and it works. :slight_smile:

Yes thanks,
I’ve read and re-read the doc, but as I say above : I replaced “127.0.0.1:88” by the url, “onlyoffice.mydomain.com”.

ENABLE_ONLYOFFICE = True
VERIFY_ONLYOFFICE_CERTIFICATE = True
ONLYOFFICE_APIJS_URL = 'http://onlyoffice.mydomain.com/web-apps/apps/api/documents/api.js'
ONLYOFFICE_FILE_EXTENSION = ('doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'odt', 'fodt', 'odp', 'fodp', 'ods', 'fods')
ONLYOFFICE_EDIT_FILE_EXTENSION = ('docx', 'pptx', 'xlsx')

But the result is strictly the same : blank page, with just this code in source :

<head>
<title>document.doc</title>
<link rel="icon" href="/media/img/favicon.ico" />
</head>


<div id="placeholder"></div>



<script type="text/javascript" src="http://onlyoffice.mydomain.com/web-apps/apps/api/documents/api.js"></script>
<script type="text/javascript">

var config = {
    "document": {
        "fileType": "doc",
        "key": "ab5d8b7808eb0dbc77eb",
        "title": "document.doc",
        "url": "https://seafile.mydomain.com/seafhttp/files/cbb7754b-5a30-4ce0-8563-3ffcc00bf60f/document.doc",
        "permissions": {
            "download": true,
            "edit": true,
            "print": true,
            "review": true
        },        
    },
    "documentType": "text", // 'text' | 'spreadsheet' | 'presentation',
    "editorConfig": {
        "callbackUrl": "https://seafile.mydomain.com/onlyoffice/editor-callback/",
        "lang": "fr",
        "mode": "edit",
        "user": {
            "name": "myuser"
        }
    },
}; 
var docEditor = new DocsAPI.DocEditor("placeholder", config);
</script>

So ?..
Can it be an nginx/proxy/reverse proxy problem ? Can somebody post an example of such an nginx config ? Mine is :

server {
    listen       <server_ip_addr>:80;
    server_name  onlyoffice.mydomain.com;
    access_log  /var/log/nginx/onlyoffice.log main;
    location / {
        proxy_pass  http://127.0.0.1:88;
   }
}

As also said above, “http://onlyoffice.mydomain.com” is accessible and returns “Document Server is running”

There is an example in the manual? Did you actually read the manually regarding onlyoffice completely?

No, and yes.

No, there is no example in the manual, in the chapter “Deployment of DocumentServer via SUBDOMAIN” which is the configuration I finally choosed, for the result : blank page. The example is given for “Deployment of DocumentServer via SUBFOLDER”, but be reassured : I tested also this second method via seafile url subfolder, copying the configurations for Seafile and nginx from documentation, for the result : blank page.

And yes, I read, re-read, and re-re-read all the documentations, with result : blank page. As I said before, I’ve even read the documentation for Collabora, tested for it all the method and configuration examples given, for the result : blank page.
When I finally posted here the configuration with “127.0.0.1:88”, that was a last try (before posting on the forum) taken here : https://forum.seafile.com/t/how-to-deploy-onlyoffice-in-seafile-servers-subdomain-subfolder-ce-6-1/2972/10 after all other tries. So yes : I’ve read ALL the documentations AND also ALL the alternative documentations.
For result : blank page.

So after all this documentations and too much test days with result ; blank page, I decided to post this problem on the forum. My question initially was just : starting with the operation described in the Collabora doc, but I suppose that this is the same with OnlyOffice :

  1. (seahub->browser) Seahub will generate a page containing an iframe and send it to the browser
  2. (browser->LibreOffice Online) With the iframe, the browser will try to load the file preview page from the LibreOffice Online
  3. (LibreOffice Online->seahub) LibreOffice Online receives the request and sends a request to Seahub to get the file content
  4. (LibreOffice Online->browser) LibreOffice Online sends the file preview page to the browser.

how can I debug each step, when I have no error in logs ?

Bump,
no one has some ideas to debug this ?

Hi, are you using chrome? One of my guess is the onlyoffice server not using a valid certificate. Check if there is a small icon at the right side of your URL bar saying that “the page is trying to load scripts from unauthenticated sources”.

It seems to me that the problem occurs at the second step. Can the api.js be accessed if you try to open http://onlyoffice.mydomain.com/web-apps/apps/api/documents/api.js that is generated by the frame?

Hi 1111,
I have tried with Firefox linux, firefox windows, and chrome linux, but got exactly the same result. As you can see in the last config I posted, actually in this “test install” onlyoffice is joined in http (by url and by seafile). I supposed that this avoided some certificates errors, but I can try to pass it in https, with L’E today it’s no more a problem. However, I’ll be surprised if this work better… As I said, I tried with the subfolder method, and the Seafile URL is in https : but that does not work, same blank page. When I tried with Collabora, this was in https, but blank page too :cry:
The api is correctly accessible, in a browser I have the js beginning with “* Copyright © Ascensio System SIA 2013…”.
I am really disappointed by this problem, whatever I try or test. Thanks for your help and suggestions.

Thanks for writing so many details.

For me it is still not clear why it’s not working on your site. Something is not right in your setup and we need to see all related config files to help furthermore if we can. Please post your current configuration files content (black out whatever is not supposed to be seen here). It works for us, so should it for you.

BTW:
I switched from my working subfolder setup to a subdomain on a different node, to take the load for the docker container away from my Seafile server. It still works without any errors.

Well. Back from holidays, I test again this installs. And… it suddenly works :open_mouth:
What I’ve just done is to copy my config files nginx+seafile regarding Collabora. No modifications, just copy it : and it works ! So I copy back my config files for OnlyOffice, without any modification and… it’s also working :astonished:
I have absolutly no idea why !!! No changes on server, no updates, nothing. I’m just not very confident about this integration after that…

I have now another problem when using OnlyOffice but (I think) not relating to this. I post somewhere else.

1 Like

Any idea what changed? Are you running OnlyOffice via Docker or standalone Linux installations? Do you have just the Document Server and/or Community Server and Mail Server too?

I’m running into the same problem with a 6.2.3 Seafile CE under Ubuntu 16.04.3 and Nginx and an OnlyOffice CE server (current release at the time of this post; Community+Document Servers) running under Docker in a separate subdomain.

Both servers work fine separately but I cannot get Seafile to open a document on the OO server. All I get are white/blank pages. I can go from OO to Seafile and open documents in the editor fine via WebDAV.

This document is suggestive of a solution but so far I am still getting white pages when I open Office documents.

@mercury please ask in single topic or ask with link to first question. We cannot handle same question in multiple topics and it’s make harder for people with same problem to look for solution in future :slight_smile:

1 Like