NC 29/30 + OO ONLYOFFICE cannot be reached. Please contact admin

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 29.0.5): 30.0.0 rc2
Operating system and version (eg, Ubuntu 24.04): Ubuntu 22.04
Apache or nginx version (eg, Apache 2.4.25): Nginx 1.18
PHP version (eg, 8.3): 8.1

The issue you are facing:

Using OnlyOffice on a separate server OR the demo server yields the error"

ONLYOFFICE cannot be reached. Please contact admin

Is this the first time you’ve seen this error? (Y/N): Ever since the upgrade to v29

Browser debug shows:

Refused to load the script ‘https://cloud.blah.com/web-apps/apps/api/documents/api.js’ because it violates the following Content Security Policy directive: “script-src-elem ‘strict-dynamic’ ‘nonce-xa4VtxyEIMizfL01VcnzUkDISwPzSkebcBJufe4Ng9U=’ blob: https://oo.blah.com/”. Note that ‘strict-dynamic’ is present, so host-based allowlisting is disabled.

hi @agit8or you are missing the required support template. Please fill this form out and edit into your post. This will give us the technical info and logs needed to help you in case the machine in question in spitting out errors! Since you’ve provided zero technical details it is impossible to help you as-is. Thanks.

Please use the search - lot of issues have been discussed already

If there are specific issues or error please describe what you tried so far and which problems you hit!

Please review Collabora integration guide and provide the test results

Do you bother to read before replying?

I searched. Nothing resolves the issue im having

The details are in the post.

I CLEARLY specified OnlyOffice, NOT Collabra.

If you bother to read the post you will understand the WOPI protocol is the same for all office products…

Yep. Ive read it. Now do you have any thing to contribute or just canned responses?

Also Collabra works fine. OnlyOffice is the only one not working.

Workaround → add to the .htaccess:
Header always set Content-Security-Policy "frame-ancestors https://cloud.blah.com"
This works for me, with NextCloud 30.0.0 rc3.

Didn’t work for me, unless I’m misunderstanding.

I added it to the .htaccess of the NC server. Tried first using its fqdn, restarted, then tried using the fqdn of the OO server. Neither worked, same outcome.

In fact, I added the following lines, just before the line with Header onsuccess unset X-Robots-Tag:

    Header onsuccess unset Content-Security-Policy
    Header always set Content-Security-Policy "frame-ancestors https://cloud.blah.com”
    RequestHeader set X-Forwarded-Proto https
    Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"

Can you try it?

Updated htaccess, no luck.

I also specified a great value for the leeway setting (for the clock difference between the OO server and the Cloud server):
In my config.php:

  'onlyoffice' => 
  array (
    'DocumentServerUrl' => 'https://oo.blah.com/',
    'verify_peer_off' => true,
    'jwt_secret' => '**********',
    'jwt_header' => 'Authorization',
    'jwt_leeway' => 2500,
  ),

Edit: updated successfully to NC 30.0.0 RC4

If you’re truly only using Nginx (i.e. as both your reverse proxy and web server) then .htaccess is ignored since it’s only for Apache).

Nextcloud version (eg, 29.0.5): 30.0.0 rc2

I see you’re running a pre-release version of Nextcloud. Maybe you can give us some context about when this situation started for you? Was this functioning on v29?

Thank you very much @alchiweb
I just upgraded to NC 30.0.0 stable, and got the same OP error. Added to .htaccess the suggested line and then ONLYOFFICE works again. Thank you!

Getting the same errors, but using only Nginx, so this fix doesn’t seem to work for us.

We just upgraded to NC 30 last night to fix the .md file error, and now OnlyOffice connector says it’s incompatible – is that the issue?

I opened a ticket with OnlyOffice, and they said:

Connector version that supports Nextcloud 30 is not yet released. We are working on it at the moment.

1 Like

Thank you, saved me day!
.htaccess trick worked!

No, it broke on v29 also.

but indeed for the NC 30 spoken there are many AddOns not ready!!

here a list

ONLYOFFICE is one of them, …

For all NGinx users a “.htaccess” change is ignored so will have no effect …

For NGinx users there must be another solution (concerning NC 29.x)