Can't connect nextcloud to onlyoffice afer update document server from 7.2 to 7.4

Document Server version: 7.4.0.163
Connector version: 8.1.0 (nextcloud 27)
server: apache 2.4.37-47, php-fpm 8.1.13
OS: CentOS Stream release 8
Browser version: chrome 114.0.5735.198 and firefox 102.12.0esr

all was working fine until I upgraded the document server from 7.2 to 7.4, when I try to connect nextcloud to the document server I get this error

Error al intentar establecer la conexión (Se ha producido un error en el servicio de documentos: Error while downloading the document file to be converted.) (versión 7.4.0.163)

my nextcloud config.php:

'onlyoffice' =>
array (
'verify_peer_off' => true,
'jwt_secret' => 'feBL4yIIvoDfqVa7dNMQ',
'jwt_header' => 'AuthorizationJwt',
),

my document server /etc/onlyoffice/documentserver/local.json

{
  "services": {
    "CoAuthoring": {
      "sql": {
        "type": "postgres",
        "dbHost": "localhost",
        "dbPort": "5432",
        "dbName": "onlyoffice",
        "dbUser": "onlyoffice",
        "dbPass": "onlyoffice"
      },
      "token": {
        "enable": {
          "request": {
            "inbox": true,
            "outbox": true
          },
          "browser": true
        },
        "inbox": {
          "header": "AuthorizationJwt",
          "inBody": false
        },
        "outbox": {
          "header": "AuthorizationJwt",
          "inBody": false
        }
      },
      "secret": {
        "inbox": {
          "string": "feBL4yIIvoDfqVa7dNMQ"
        },
        "outbox": {
          "string": "feBL4yIIvoDfqVa7dNMQ"
        },
        "session": {
          "string": "feBL4yIIvoDfqVa7dNMQ"
        }
      }
    }
  },
  "rabbitmq": {
    "url": "amqp://guest:guest@localhost"
  }
}

the nextcloud log when I hit the save button :

{"reqId":"ZLGizs1WSHd@2LNFgaMEfwAAAEY","level":3,"time":"2023-07-14T19:32:30+00:00","remoteAddr":"192.168.1.214","user":"--","app":"onlyoffice","method":"GET","url":"/index.php/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.94tNApPAztd31eIfGR90HyQrX9uOHSjplctHVeJvxlo","message":"Download empty with invalid jwt","userAgent":"Node.js/6.13","version":"27.0.0.8","exception":{"Exception":"Firebase\\JWT\\ExpiredException","Message":"Expired token","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/onlyoffice/lib/Controller/CallbackController.php","line":360,"function":"decode","class":"Firebase\\JWT\\JWT","type":"::"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"emptyfile","class":"OCA\\Onlyoffice\\Controller\\CallbackController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1064,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/onlyoffice/3rdparty/jwt/JWT.php","Line":131,"message":"Download empty with invalid jwt","CustomMessage":"Download empty with invalid jwt"}}

I went back to the document server 7.2 with jwt disabled and it worked without problem.

any help will be very appreciated!.

greetings!.

hey @froman

“exception”:{“Exception”:“Firebase\JWT\ExpiredException”,“Message”:“Expired token”

  • it looks like a discrepancy between your Nextcloud server and the server where DS is installed. Please check the time settings on both servers
  • Does the problem repeat when disabling JWT on 7.4 version?
  • nextcloud and onlyoffice are hosted on the same server?

Hi Nikolas!

no, nextcloud and onlyoffice are in different servers.

and no, the problem persist when I try to disable JWT on 7.4

I never check the hour because all my servers has ntp configured, but guess what, the onlyoffice server has the time wrong by 2 hours.
already fix that, I’ll try the update again and let you know.

thank you very much.

1 Like

It was the time. I fixed the ntp client on both servers to sync the date and it worked like a charm!

thank you @Nikolas

2 Likes