ONLYOFFICE / DocumentServer

ONLYOFFICE Docs is a free collaborative online office suite comprising viewers and editors for texts, spreadsheets and presentations, forms and PDF, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
https://www.onlyoffice.com
GNU Affero General Public License v3.0
4.76k stars 1.08k forks source link

opening xls does not offer a toolbar, but loads viewer #1659

Closed ant0nwax closed 2 years ago

ant0nwax commented 2 years ago

Bug report

What is the current behavior?

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

What is the expected behavior?

Did this work in previous versions of DocumentServer? I dont know, I am new to OnlyOffice and Nextcloud

DocumentServer version: 7.0.0.132 Community Edition

Operating System: CentOS 8

Browser version: Chrome 98

ShockwaveNN commented 2 years ago

I think it's some kind problem on integration side

Could you enable integrated example via http://docserverurl/welcome page and check that this file is correctly opened in editor

If so - problem on side of Nextcloud integration

ant0nwax commented 2 years ago

Thank you

I think i report bugs when I report bugs :)

no worries here the proof

ps, it is a xls export from a webpage, a table of different fields, names and numbers, the data is confidential, i cannot share that, sorry

I reactivated the /welcome page (was already deactivated) i started the ds:example in supervisorctl i went to Upload file i chose the xls image

ShockwaveNN commented 2 years ago

Is this error happens for any xls file or just for specific one which confidential?

Also that are errors in /var/log/onlyoffice/documentserver/converter log file?

ant0nwax commented 2 years ago

Hi @ShockwaveNN

i did some tests and i found out that you are right integration issue, i just do not know how to handle it and later i could test if xls is really an issue the console says: sockjs.min.js:2 WebSocket connection to 'wss://onlyoffice.domain.tld/7.0.0-132/doc/192.168.1.14https___onlyoffice.domain.tld_files_192.168.1.14_test.xlsx1646029978059/c/745/iinfn2mb/websocket' failed:

image

my setup: webserver: centos 7 with apache (httpd) i forward https to http at the moment with reverse proxy onlyoffice: centos 8 with nginx runs on http nextcloud: centos 8 with httpd runs on http

nginx is configured as http and i think i MUST configure https

the issue is that i do not know where to find an explanation how to integrate only office correctly for https on nginx behind a httpd reverse proxy, the documentation only has an nginx description

https://test-helpcenter.onlyoffice.com/installation/docs-nextcloud-proxy.aspx

ShockwaveNN commented 2 years ago

I think you can try to search for issues in this repo and see maybe someone used httpd

If you didn't find any useful info - we need detailed instruction how to repdouce your setup so maybe we can track problem in our code or in your configuration file, but I'm not sure that we got enough free time for this

ant0nwax commented 2 years ago

@ShockwaveNN i just would like to make a side note here, too

xls and ods cannot be opened in editor, they both open in viewer xlsx can be opened in editor...

ShockwaveNN commented 2 years ago

I think problem in those files that they require converting to be opened, we cannot open xls or ods directly without converting in to xlsx

But still don't know that the root reason of that, maybe in logs there is some failures

ant0nwax commented 2 years ago

Thank you for the information, i would have guessed that xlsx also will be converted to ods

ps, i upgraded to 7.0.1 today

ShockwaveNN commented 2 years ago

i would have guessed that xlsx also will be converted to ods

No, we don't use ods in our editor, it's option to be converted in and out, but our base formats is ooxml-based

ant0nwax commented 2 years ago

Thank you

actually now i could edit ods and xls so editor might work and converter also but if i edit something and i would like to save it, i get an error, it seems to be something like a timeout, because the error appears a little bit later, its actually a Warning in the above screenshot

i can easily repoduce, just add some information in a cell, and press File/Save again

"An error occured while saving the file. Please use the Download as option to save the file to your computer hard drive or try again later."

errors i find are only a warning like the Window Title:

image

/var/log/onlyoffice/documentserver/docservice/out.log

[2022-03-01T20:20:25.061] [WARN] nodeJS - sendServerRequest returned an error: docId = 2377519283; data = {"error":1} [2022-03-01T20:20:25.065] [WARN] nodeJS - storeForgotten: docId = 2377519283 [2022-03-01T20:20:51.126] [WARN] nodeJS - sendServerRequest returned an error: docId = 2377519283; data = {"error":1} [2022-03-01T20:25:39.181] [WARN] nodeJS - sendServerRequest returned an error: docId = 2377519283; data = {"error":1}

ps i also needed to already generate 3 selinux modules for different things, are those explained somewhere? this is not too userfriendly yet :)

ShockwaveNN commented 2 years ago

I still don't htink we able to help without proper and detailed instruction for us how to reproduce this setup

I'm almost sure problem somehow in your rather difficult configuration including both nginx and apache and seems something somewhere is missing, maybe nginx-apache logs will show you somehow

ghost commented 2 years ago

i am writing on behalf of ant0nwax

please advise: how to enable NodeJS debug logs for onlyoffice i would like to understand this warning, you see in that line there is an error

ShockwaveNN commented 2 years ago

how to enable NodeJS debug logs for onlyoffice

sed -i 's/WARN/ALL/g' /etc/onlyoffice/documentserver/log4js/production.json

i would like to understand this warning, you see in that line there is an error

If you mean this error:

[2022-03-01T20:20:25.061] [WARN] nodeJS - sendServerRequest returned an error: docId = 2377519283; data = {"error":1}

It comes from DMS, if you opened this file via Nextcloud - seems it's returning this code by some reason

I think that you should do - simplify your complicated infrastructure and add services only by one and see when it breaks

ghost commented 2 years ago

complicated infrastructure? a webserver(A) terminating https an own server for nextcloud runs internnaly on http (B) and an own server for onlyoffice (C) runs internally on https now? where is the complicated part here?

It comes from DMS ? what does DMS mean in this context Document Management System ? might be because the /data storage at nextcloud (B) runs on a TrueNAS NFS share? on a fourth server (D)?

i still think not that this is complicated :) PS (A/B/C/D) are all virtualized running on a proxmox environment

ShockwaveNN commented 2 years ago

It comes from DMS ?

In your case it's Nextcloud

PS (A/B/C/D) are all virtualized running on a proxmox environment

And I think it is complicated, it's 4 server instead of usual 2 (DMS and DocumentServer)

I'm sorry I've no idea how to help you If you able - better contact support@onlyoffice.com And I leave this issue opened, maybe someone will help

ant0nwax commented 2 years ago

Hi @ShockwaveNN

with every clew you also help me, thank you again

it seems normal to you that the warn/error of NodeJS is from Nextcloud that was not totally clear to me until now, and i just had time to answer and not to continue looking at the logs on nextcloud i will do that tomorrow if i find some time... thank you for the offer that i could write to your support, very kind, at the moment i try to keep it public :) it will help other enthusiasts...

lets see maybe someone finds this thread later...

ant0nwax commented 2 years ago

By editing an xlsx and chosing File Save the following happens on DMS Nextcloud CentOS machine

/var/log/messages

nothing happens here

/var/log/httpd/access.log 192.168.1.14 - - [03/Mar/2022:07:14:38 +0100] "POST /nextcloud/index.php/apps/onlyoffice/track?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiJhbnQwbiIsImZpbGVJZCI6NTA4MzEsImZpbGVQYXRoIjoiXC9Eb2N1bWVudHNcLyFGSU5BTlpFTiAoY29weSkueGxzeCIsInNoYXJlVG9rZW4iOm51bGwsImFjdGlvbiI6InRyYWNrIn0.RQhJD1908mg4rAT89MmmOtM_vrvGJIEbBrd9PDKxFB8 HTTP/1.1" 200 31 "-" "Node.js/6.13"

/var/log/httpd/error.log

nothing happens here

i guess now i found something: /var/www/html/nextcloud/data/nextcloud.log

{"reqId":"YiBds1Dkis15@MeyBNl3FwAAAMw","level":3,"time":"2022-03-03T06:18:27+00:00","remoteAddr":"192.168.1.14","user":"USERNAMEREPLACED","app":"onlyoffice","method":"POST","url":"/nextcloud/index.php/apps/onlyoffice/track?doc=eyJ0eXAiOiJKV1Q
iLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiJhbnQwbiIsImZpbGVJZCI6NTA4MzEsImZpbGVQYXRoIjoiXC9Eb2N1bWVudHNcLyFGSU5BTlpFTiAoY29weSkueGxzeCIsInNoYXJlVG9rZW4iOm51bGwsImFjdGlvbiI6InRyYWNrIn0.RQhJD1908mg4rAT89MmmOtM_vrvGJIEbBrd9PDKxFB8","message":"Track: 50831 status 2 error","userAgent":"Node.js/6.13","version":"23.0.0.10","exception":{"Exception":"OCP\\Http\\Client\\LocalServerException","Message":"Host violates local access rules","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/private/Http/Client/DnsPinMiddleware.php","line":136,"function":"ThrowIfLocalIp","class":"OC\\Http\\Client\\LocalAddressChecker","type":"->","args":["192.168.1.29"]},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php","line":35,"function":"OC\\Http\\Client\\{closure}","class":"OC\\Http\\Client\\DnsPinMiddleware","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":31,"function":"__invoke","class":"GuzzleHttp\\PrepareBodyMiddleware","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php","line":71,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":63,"function":"__invoke","class":"GuzzleHttp\\RedirectMiddleware","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php","line":75,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":331,"function":"__invoke","class":"GuzzleHttp\\HandlerStack","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":168,"function":"transfer","class":"GuzzleHttp\\Client","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":187,"function":"requestAsync","class":"GuzzleHttp\\Client","type":"->","args":["get",{"__class__":"GuzzleHttp\\Psr7\\Uri"},{"verify":"/var/www/html/nextcloud/resources/config/ca-bundle.crt","timeout":60,"allow_redirects":{"on_redirect":{"__class__":"Closure"}},"nextcloud":{"allow_local_address":false},"synchronous":true,"0":"And 6 more entries, set log level to debug to see all entries"}]},{"file":"/var/www/html/nextcloud/lib/private/Http/Client/Client.php","line":223,"function":"request","class":"GuzzleHttp\\Client","type":"->","args":["get","https://onlyoffice.DOMAINREPLACED.TLD/cache/files/465943287_3418/output.xlsx/output.xlsx?md5=YnCQbWPQyaJfTGxIz7IR7A&expires=1646289208&filename=output.xlsx",{"verify":"/var/www/html/nextcloud/resources/config/ca-bundle.crt","timeout":60,"allow_redirects":{"on_redirect":{"__class__":"Closure"}},"nextcloud":{"allow_local_address":false},"headers":{"User-Agent":"Nextcloud Server Crawler","Accept-Encoding":"gzip"},"0":"And 1 more entries, set log level to debug to see all entries"}]},{"file":"/var/www/html/nextcloud/apps/onlyoffice/lib/documentservice.php","line":364,"function":"get","class":"OC\\Http\\Client\\Client","type":"->","args":["https://onlyoffice.DOMAINREPLACED.TLD/cache/files/465943287_3418/output.xlsx/output.xlsx?md5=YnCQbWPQyaJfTGxIz7IR7A&expires=1646289208&filename=output.xlsx",{"timeout":60}]},{"file":"/var/www/html/nextcloud/apps/onlyoffice/controller/callbackcontroller.php","line":513,"function":"Request","class":"OCA\\Onlyoffice\\DocumentService","type":"->","args":["https://onlyoffice.DOMAINREPLACED.TLD/cache/files/465943287_3418/output.xlsx/output.xlsx?md5=YnCQbWPQyaJfTGxIz7IR7A&expires=1646289208&filename=output.xlsx"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"track","class":"OCA\\Onlyoffice\\Controller\\CallbackController","type":"->","args":["eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiJhbnQwbiIsImZpbGVJZCI6NTA4MzEsImZpbGVQYXRoIjoiXC9Eb2N1bWVudHNcLyFGSU5BTlpFTiAoY29weSkueGxzeCIsInNoYXJlVG9rZW4iOm51bGwsImFjdGlvbiI6InRyYWNrIn0.RQhJD1908mg4rAT89MmmOtM_vrvGJIEbBrd9PDKxFB8",["oc8wm0d8cdqs_USERNAMEREPLACED"],"465943287",2,"https://onlyoffice.DOMAINREPLACED.TLD/cache/files/465943287_3418/output.xlsx/output.xlsx?md5=YnCQbWPQyaJfTGxIz7IR7A&expires=1646289208&filename=output.xlsx",null,[],null,null,[{"type":0,"userid":"oc8wm0d8cdqs_USERNAMEREPLACED"}]]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Onlyoffice\\Controller\\CallbackController"},"track"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Onlyoffice\\Controller\\CallbackController"},"track"]},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Onlyoffice\\Controller\\CallbackController","track",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"onlyoffice.callback.track"}]},{"file":"/var/www/html/nextcloud/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/onlyoffice/track"]},{"file":"/var/www/html/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/nextcloud/lib/private/Http/Client/LocalAddressChecker.php","Line":42,"CustomMessage":"Track: 50831 status 2 error"}}
ShockwaveNN commented 2 years ago

"Message":"Host violates local access rules"

You can try search for similar issues (and I see that you got one, but I think there is may be more)

I think it's some setting on the Nextcloud side, cant help you, Nextcloud knowledge is out of job responsibilities

ant0nwax commented 2 years ago

Hi @ShockwaveNN

thanks for your help i made it because you helped me 👍

read further here, i will close this case right away https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues/293

wish you a beautiful weekend

ant0nwax commented 2 years ago

ps, the original xls still opens in viewer :) i care about that because we should be able to edit xls especially ods with editor on community i guess it is a feature, and in the converter out.log there is nothing else than

[2022-03-04T03:24:03.953] [WARN] nodeJS - update cluster with 1 workers [2022-03-04T03:24:03.972] [WARN] nodeJS - worker 173263 started. [2022-03-04T03:24:03.979] [WARN] nodeJS - update cluster with 1 workers

ant0nwax commented 2 years ago

reopened

ant0nwax commented 2 years ago

i decided to make a new clean error report