Nextcloud - Onlyoffice - The document could not be saved

Hello guys,
I ran into a problem with the OnlyOffice integration with Nextcloud.

I have successfully installed OnlyOffice on a separate server in docker. I installed a self signed certificate for https.

Next i changed the fields in default.json into:

"rejectUnauthorized": false

When I try OnlyOffice through a browser on its IPv4 address, I can create a text document and edit it.

Now the integration with Nextcloud.
Nextcloud runs on a separate server in snap. It’s hidden behind cloudflare Zero Trust and I use a Google account to log in.

I added to config.php at the end:

'onlyoffice' => array(
    'verify_peer_off' => true
),

and

added the IPv4 address of OnlyOffice into

'trusted_domains' =>
  array (
    5 => 'x.x.x',
  ),

Now finally to the problem.
When I create or want to edit a document, OnlyOffice opens and displayed an error:

The document could not be saved. Please check connection settings or contact your administrator. When you click the “Okay” button, you will be prompted to download the document.

error

The versions of the software:

  • Nextcloud: 26.0.3
  • ONLYOFFICE document server: 7.4.0

Would anyone know how to help me?
I can provide other necessary information.

With Best Regard,
Thank you

Martin

1 Like

hey @marma

Could you send us a screenshot of your OnlyOffice connector settings in Nextcloud and of any errors you get when you press “Save” on that page?

Also, please attach the Document Server’s logs to your reply
(docker: /app/onlyoffice/DocumentServer/logs/documentserver/).

Hi, I am having the same issue… my local /example/ site works fine. I can also create a document in NextCloud using OnlyOffice plugin and start editing it. But immediately, when it autosaves, it locks me out. This is the error in the log from my OO server:

[2023-08-21T14:38:59.155] [ERROR] [localhost] [1423143543] [ocgbosgljwgj_jstrickland1] nodeJS - clientLog: changesError: Error: SecurityError: Permission denied to access property “dispatchEvent” on cross-origin object
Script: moz-extension://c51ddfeb-787b-ea48-afc5-99eadbb540db/js/inject.js
Line: 49:0
userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/117.0
platform: MacIntel
isLoadFullApi: true
isDocumentLoadComplete: true
DocumentInfo:
Selection: false
StackTrace: onKeyDownMouseDownToushStart@moz-extension://c51ddfeb-787b-ea48-afc5-99eadbb540db/js/inject.js:49:7

Hey @jstrickland :wave: :
So let me get this straight.

  1. Specify the version of the document server.
  2. Type of installation: docker - windows - deb/rpm
  3. Version of the ONLYOFFICE Connector App

Did the error occur after the update or during the first installation?

Hi Thanks for the help in advance…

OK. here ya go.

  1. the version of the document server is: 7.4.1. Build: 36
  2. I am using rpm on centos 8 (I used the docs-install.sh script)
  3. Version of the ONLYOFFICE connector is the latest: 8.2.0

Also, the NextCloud version is: 27.0.2

It’s just the first installation.

My JSON config looks like this:

{
“services”: {
“CoAuthoring”: {
“sql”: {
“dbHost”: “localhost”,
“dbName”: “onlyoffice”,
“dbUser”: “onlyoffice”,
“dbPass”: “xxxxxxx”,
“type”: “postgres”,
“dbPort”: “5432”
},
“token”: {
“enable”: {
“request”: {
“inbox”: true,
“outbox”: true
},
“browser”: true
},
“inbox”: {
“header”: “AuthorizationJwt”
},
“outbox”: {
“header”: “AuthorizationJwt”
}
},
“secret”: {
“inbox”: {
“string”: “xxxxxxxx”
},
},
“outbox”: {
“string”: “xxxxxxxx”
},
“session”: {
“string”: “xxxxxxxx”
}
}
}
},
“queue”: {
“type”: “rabbitmq”
},
“rabbitmq”: {
“url”: “amqp://guest:guest@localhost”
},
“storage”: {
“fs”: {
“secretString”: “yyyyyyyyy”
}
}
}

–J

@jstrickland

  1. Does the issue always occur when opening any document?
  2. Please go to connector settings page and make a screenshot of it. Then click on the Save button and make a new screenshot if there is any error. Send both screenshots to me.
  3. Open the browser console (Console tab) and try to reproduce the issue with file opening. Make screenshots of any errors in the console. Then do the same with the Network tab of the console.
  4. Can you send me Document Server logs (in private messages)

(package)
/var/log/onlyoffice/documentserver/

(docker)
/app/onlyoffice/DocumentServer/logs/documentserver/

  1. Check the accessibility of NS and DS to each other
    run wget https://document-server-address on the Nextcloud machine
    run wget https://nextcloud-address from inside the Document Server container

Hi,

did you already check https://helpdesk.onlyoffice.com/hc/en-us/requests/42811 ?

Solution for me was:
Document Server rejects local IP addresses by default. You can change this parameter to true in /etc/onlyoffice/documentserver/default.json to avoid the issue.
{
“services”: {
“CoAuthoring”: {
“request-filtering-agent”: {
"allowPrivateIPAddress": true,
“allowMetaIPAddress”: true
},
After that please restart all Document server services inside the container with supervisorctl restart all command.

Cheers Dirk

ok,

  1. Yes it happens every time with a new or previously created doc.

  2. here is the screenshot of the settings


    No error after save.
    Screenshot 2023-08-24 at 10.29.15 AM

  3. here are the console errors… not much help there.


  4. I will send logs in private message

  5. both wgets succeeded pulling index.html files each way

Also, thanks dirschmi39, That didn’t appear to solve the problem. But thanks for the suggestion.

Also, I get this if I try and click into the document.
Screenshot 2023-08-24 at 10.35.14 AM

And a little more info, if I change “AuthorizationJwt” to “Authorization” as suggested in some guides, nothing works and I get this error on save.

@jstrickland

Unfortunately, I didn’t find it (logs) in my private message

Hmm, try opening the editor in another browser

One more thing on this… I was able to get it to happen with a fresh install of OnlyOffice taking NextCloud out of the equation.

  1. I followed the install build CentOS instructions to a tee to build a fresh server instance (Installing ONLYOFFICE Docs for CentOS and derivatives - ONLYOFFICE)
  2. Run the ds-example from the welcome page
  3. delete all documents so that the screen just shows the information related to the 4 sample users
  4. create a new document and presto! Same behavior (See Attached screenshots).

I am just going to give up on this and use NextCloud Office. It works.

@jstrickland
I requested the necessary information in PM.

When installing on a clean machine, there should be no issues with the functioning of the document server and the example.

Did you indeed install the document server on a clean machine?


I would advise you to create a new topic with the issue. After all, it’s possible that information regarding the system and installation may have changed.