Only Office files went blank

Is there a reason my .xls and .docx files which had content a few days ago are empty now?
I’ve moved some files around between foldes in Nextcloud web UI
The only non-standard change I have made is editing /apps/onlyoffice/assets/en/new.docx to change default language.

It looks like all files except one have lost all their data. The file which didn’t lose data has gone back to a previous version.
There’s no file versions
No update activity.

I think I realise what is wrong. OnlyOffice is having an SSL problem and not reporting the error. So nothing is being saved to the file even though it looks like it works because when you reopen the file in OnlyOffice the contents is still there, but file on server is not changed.

This is strange because I’m sure it was working a while ago.

SSL is working on the /welcome page properly, using Let’s Encrypt. I’m not sure what else could be done.

OnlyOffice docker log.

[2017-09-14 05:48:53.769] [ERROR] nodeJS - sendServerRequest error: docId = 15210931505365372;url = https://xxx/apps/onlyoffice/track?doc=OWl4dXduckI4Q3RVaENaK3dpR0M5Z2NPbzdLdmFnWHRuNFVUcW1nUSs5cz0/eyJmaWxlSWQiOjE1MjEwOTMsIm93bmVySWQiOiJ0ZXJyeXQiLCJhY3Rpb24iOiJ0cmFjayJ9;data = {"key":"15210931505365372","status":2,"url":"https://onlyxxx:9981/cache/files/15210931505365372_8946/output.docx/output.docx?md5=cy3yJ_zCIhDC-jCnJYOBKA==&expires=1507960134&disposition=attachment&ooname=output.docx","changesurl":"https://onlyxxx:9981/cache/files/15210931505365372_8946/changes.zip/changes.zip?md5=kU1zq6Y0wD9jJD5xERAC9Q==&expires=1507960134&disposition=attachment&ooname=output.zip","history":{"serverVersion":"4.4.1","changes":[{"created":"2017-09-14 05:03:04","user":{"id":"xxxx","name":"xxxx"}}]},"users":["xxxx"],"actions":[{"type":0,"userid":"xxxx"}],"lastsave":"2017-09-14T05:48:36.355Z","notmodified":false} Error: Error response: statusCode:400 ;body: {"error":1} at Request._callback (/var/www/onlyoffice/documentserver/server/Common/sources/utils.js:269:18) at Request.self.callback (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:188:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:1171:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at IncomingMessage.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:1091:12) at IncomingMessage.g (events.js:292:16) at emitNone (events.js:91:20)

Nextcloud error log

`Error onlyoffice CommandRequest on check error: Bad Request or timeout error 2017-09-14T16:31:13+1000

Error PHP file_get_contents(https://onlyxxx:9981/coauthoring/CommandService.ashx): failed to open stream: operation failed at /home/office/public_html/apps/onlyoffice/lib/documentservice.php#351 2017-09-14T16:31:13+1000

Error PHP file_get_contents(): Failed to enable crypto at /home/office/public_html/apps/onlyoffice/lib/documentservice.php#351 2017-09-14T16:31:13+1000

Error PHP file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed at /home/office/public_html/apps/onlyoffice/lib/documentservice.php#351`

I have both OnlyOffice and Nextcloud on the same machine, different domain, HTTPS working on the domains. But when Nextcloud connects to OnlyOffice via the URL it fails SSL check. Rather than mess with certs you can do this to fix it.

edit file /nextcloud/config/config.php, following line.

'onlyoffice' => ['verify_peer_off' => TRUE],