onlyoffice-nextcloud icon indicating copy to clipboard operation
onlyoffice-nextcloud copied to clipboard

Nextcloud is returning HTTP 400 for all document requests

Open SysEngDan opened this issue 3 years ago • 5 comments

I'm running both Nextcloud and the OnlyOffice Docserver in containers with Docker Swarm.

The admin screen is configured in a way that produces a green validation banner that Nextcloud successfully connects with OnlyOffice Docserver.

When I go to open a document, I get this: image

When I check the OnlyOffice logs, I see this output:

[email protected]    | [2022-06-14T14:55:06.363] [ERROR] nodeJS - error downloadFile:url=http://files_example_org_php/apps/onlyoffice/download?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJkb3dubG9hZCIsImZpbGVJZCI6MTAzNjcsInVzZXJJZCI6ImRhbiJ9.h8N56RcKuMF6KQA9C2bAp4NXzQ7Fyu5c_VsviChIgWo;attempt=3;code:undefined;connect:undefined;(id=3728538145)
[email protected]    | Error: Error response: statusCode:400; headers:{"date":"Tue, 14 Jun 2022 14:55:05 GMT","server":"Apache/2.4.53 (Debian)","referrer-policy":"no-referrer","x-content-type-options":"nosniff","x-frame-options":"SAMEORIGIN","x-permitted-cross-domain-policies":"none","x-robots-tag":"none","x-xss-protection":"1; mode=block","x-powered-by":"PHP/8.0.20","set-cookie":["octdhlbd6gna=5f690bac6028cbd10a4b8ec7cce35f38; path=/; secure; HttpOnly; SameSite=Lax","oc_sessionPassphrase=wpm2LsEVq2HziNQjobym%2FGa2PbLCP7gPcBqKAX9OgJUjZPVqJA4sLcyOASBy3LA%2BK6bFmEu53HL6DvCxpaGLmRN4NmSmZ902YXjhLIIF%2F3XzLwRp1jGOWYwLU%2BHdYAX7; path=/; secure; HttpOnly; SameSite=Lax","octdhlbd6gna=40c338f6f5c64c6222b3acadeef2bb79; path=/; secure; HttpOnly; SameSite=Lax","__Host-nc_sameSiteCookielax=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax","__Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict"],"expires":"Thu, 19 Nov 1981 08:52:00 GMT","cache-control":"no-cache, no-store, must-revalidate","pragma":"no-cache","content-security-policy":"default-src 'none';base-uri 'none';manifest-src 'self';frame-ancestors 'none'","x-request-id":"XM4U2ontfHPL8eUEnurA","content-disposition":"attachment; filename=\"JoshMintonBiography.docx\"","feature-policy":"autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'","content-length":"0","connection":"close","content-type":"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};
[email protected]    |     at Request.fResponse (/snapshot/server/build/server/Common/sources/utils.js)
[email protected]    |     at Request.emit (events.js:400:28)
[email protected]    |     at Request.onRequestResponse (/snapshot/server/build/server/Common/node_modules/request/request.js:1059:10)
[email protected]    |     at ClientRequest.emit (events.js:400:28)
[email protected]    |     at HTTPParser.parserOnIncomingClient (_http_client.js:647:27)
[email protected]    |     at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
[email protected]    |     at Socket.socketOnData (_http_client.js:515:22)
[email protected]    |     at Socket.emit (events.js:400:28)
[email protected]    |     at addChunk (internal/streams/readable.js:290:12)
[email protected]    |     at readableAddChunk (internal/streams/readable.js:265:9)
[email protected]    |     at Socket.Readable.push (internal/streams/readable.js:204:10)
[email protected]    |     at TCP.onStreamRead (internal/stream_base_commons.js:188:23)

SysEngDan avatar Jun 14 '22 14:06 SysEngDan

I hope someone can please help. I really want to use and endorse this integration but I can't seem to get it working reliably anymore.

SysEngDan avatar Jun 17 '22 11:06 SysEngDan

Which version on onlyoffice are you using?

red-avtovo avatar Jul 07 '22 21:07 red-avtovo

Which version on onlyoffice are you using?

(facepalm) sorry. 7.1.1.23 https://hub.docker.com/layers/documentserver/onlyoffice/documentserver/7.1.1.23/images/sha256-8a1edcc13f9d9dd61f3e77bcb172b0f32d0788aa2c63bb5a1206a7633e3dd2f8?context=explore

SysEngDan avatar Jul 11 '22 17:07 SysEngDan

Hi @SysEngDa, The issue might be with the addresses you specified in the configuration. Could you check if http://files_example_org_php is accessible from inside the Document Server container?

SergeyKorneyev avatar Jul 21 '22 14:07 SergeyKorneyev

same issue here with document server 7.3.0-184 except I have only few documents with this issue. 1- most I am able to open them , 2- few I am never able to open them as they show message "Loading" without percentage 3- and fewer I have this message related with sockjs.min.js:2 (xhr) 400 Bad Request strict-origin-when-cross-origin GET | https://onlyoffice.mydomain.com/doc/1282869996/c/info?t=1675914979694

all of them I can use collaboraoffice/nextcloudoffice

in case of cleaning browser cache completly I get from case 3 to 2.

unnilennium avatar Feb 09 '23 04:02 unnilennium