I believe I might have the same issue as this, when trying to connect a new Nextcloud server running 23.0.4, I have all the correct settings and then when I click Save on the page with the ONLYOFFICE settings in Nextcloud I get:
Error when trying to connect (Error occurred in the document service: Error while downloading the document file to be converted.) (version 7.0.1.37)
@Dmitry when you have asked:
Do you mean the Nextcloud /settings/admin/onlyoffice
page?