Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nextcloud Can't Integration with OnlyOffice #1033

Open
egirizaki opened this issue Oct 22, 2024 · 4 comments
Open

Nextcloud Can't Integration with OnlyOffice #1033

egirizaki opened this issue Oct 22, 2024 · 4 comments

Comments

@egirizaki
Copy link

hi,

I have installed Nextcloud and Onlyoffice, both on separate servers. Nextcloud version is Nextcloud 30.0.1, Onlyoffice Connector version is 9.4.0.

Onlyoffice uses a manual installation method not using a docket.

When I want to integrate Nextcloud with Onlyoffice an error appears “Error when trying to connect (Error occurred in the document service: Error while downloading the document file to be converted.) (version 8.2.0.143)”

In the onlyoffice log the following error appears ”[2024-10-22T13:51:56.259] [ERROR] [localhost] [check_922743533] [userId] nodeJS - error downloadFile:url=https://mynexcloud.domain.com/index.php/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.vgRuc5e-a2hTt8OhsAaQlPcLVQu63DP49d0gID815Xw;attempt=3;code:null;connect:null Error: Error response: statusCode:403; headers:{"date":"Tue, 22 Oct 2024 06:48:14 GMT","server":"Apache/2.4.52 (Ubuntu)","referrer-policy":"no-referrer","x-content-type-options":"nosniff","x-frame-options":"SAMEORIGIN","x-permitted-cross-domain-policies":"none","x-xss-protection":"1; mode=block","x-request-id":"jHJQjUqbPxkr31g0NfyJ","cache-control":"no-cache, no-store, must-revalidate","content-security-policy":"default-src 'none';base-uri 'none';manifest-src 'self';frame-ancestors 'none'","feature-policy":"autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'","x-robots-tag":"noindex, nofollow","set-cookie":["oc_sessionPassphrase=O3LoJ0DG73DLKsvOxCJiWoquGPjp5qwvjbxPPDNts6vZ4Dxf%2FVwboK%2FwAHYKDqUse7rW5de%2F7MPiGTfI54QNfAu0A3XsUfXq4wfzqvvL9T53%2BzzNKJA68N8rcMheCN2S; 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","ochrsv6ohrf2=fjddt0s3qv9a4hg7m4n62mfgcq; path=/; secure; HttpOnly; SameSite=Lax"],"access-control-allow-origin":"https://mynexcloud.domain.com","access-control-allow-methods":"POST, GET, OPTIONS, DELETE","access-control-allow-headers":"Authorization,Content-Type","access-control-allow-credentials":"true","keep-alive":"timeout=5, max=100","connection":"Keep-Alive","transfer-encoding":"chunked","content-type":"application/json; charset=utf-8"};

I hope that someone can help me here.

Thank you!

@SergeyKorneyev
Copy link

Hello,
You could try the following:

  1. Disable JWT for Docs by setting the three parameters from the services.CoAuthoring.token.enable section to "false": https://helpcenter.onlyoffice.com/installation/docs-configure-jwt.aspx
  2. Delete the secret key from the connector's settings in Nextcloud and save the settings
  3. Check if the integration works with this configuration. If everything seems fine, enable JWT again but change the header in services.CoAuthoring.token.inbox.header and services.CoAuthoring.token.outbox.header from "Authorization" to a custom one (for example, "AuthorizationJwt"). Specify the secret key and the modified header into the connector settings and save them. The header field can be found in the Advanced server settings section.

@egirizaki
Copy link
Author

Hi @SergeyKorneyev ,

Thank you for your reply.

With disable JWT my nextcloud and onlyoffice can connected right now. But, when i enable the JWT again with new header in services.CoAuthoring.token.inbox.header and services.CoAuthoring.token.outbox.header nextcloud and onlyoffice cannot connect.

This is my configuration:
"token": { "enable": { "request": { "inbox": false, "outbox": false }, "browser": false }, "inbox": { "header": "AuthorizationJwt" }, "outbox": { "header": "AuthorizationJwt" } },

Is there wrong configuration?

@SergeyKorneyev
Copy link

This is my configuration:
"token": { "enable": { "request": { "inbox": false, "outbox": false }, "browser": false }, "inbox": { "header": "AuthorizationJwt" }, "outbox": { "header": "AuthorizationJwt" } },

JWT is disabled in this particular config. In order to enable it, you need to change the value of all three parameters from "false" to "true" and restart the Document Server services with systemctl restart ds-*

@egirizaki
Copy link
Author

Sorry @SergeyKorneyev i copy the wrong configuration. I have changed those configuration like this :

"token": { "enable": { "request": { "inbox": false, "outbox": false }, "browser": false }, "inbox": { "header": "AuthorizationJwt" }, "outbox": { "header": "AuthorizationJwt" } },

After that, i restart all services ds with the systemctl restart ds-* but the error still exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants