[userId] nodeJS - wopi error checkFileInfo:Error: Error response: statusCode:401;

Do you want to: Ask a how-to question
Document Server version: Document server 7.
Type of installation of the Document Server (docker, deb/rpm, exe): Docker
OS: CentOS
Browser version: Google Chrome 119.0.6045.200

Hi,
I have integrated OnlyOffice with my application using the WOPI. I have already resolved some problems, but I stuck on the one. When my application had sent a WOIPsrc I recieved the error “Sorry, editor could not be loaded. Please contact your administrator.” and in the OO log I recieved this message as well:

[2023-12-05T13:25:40.083] [ERROR] [localhost] [DES!DES!F0A3348C-0000-C713-9AC7-C3DC700BFE91!p8?desktop=DES] [userId] nodeJS - wopi error checkFileInfo:Error: Error response: statusCode:401; headers:{"x-powered-by":"Servlet/3.1","content-language":"en-US","content-length":"0","date":"Tue, 05 Dec 2023 13:27:22 GMT"};
    at Request.fResponse (/snapshot/server/build/server/Common/sources/utils.js)
    at Request.emit (events.js:400:28)
    at Request.onRequestResponse (/snapshot/server/build/server/Common/node_modules/request/request.js:1059:10)
    at ClientRequest.emit (events.js:400:28)
    at HTTPParser.parserOnIncomingClient (_http_client.js:647:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:127:17)
    at Socket.socketOnData (_http_client.js:515:22)
    at Socket.emit (events.js:400:28)
    at addChunk (internal/streams/readable.js:293:12)
    at readableAddChunk (internal/streams/readable.js:267:9)
    at Socket.Readable.push (internal/streams/readable.js:206:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
[2023-12-05T13:25:49.985] [ERROR] [localhost] [DES!DES!F0A3348C-0000-C713-9AC7-C3DC700BFE91!p8?desktop=DES] [userId] nodeJS - wopi error checkFileInfo:Error: Error response: statusCode:401; headers:{"x-powered-by":"Servlet/3.1","content-language":"en-US","content-length":"0","date":"Tue, 05 Dec 2023 13:27:32 GMT"};
    at Request.fResponse (/snapshot/server/build/server/Common/sources/utils.js)
    at Request.emit (events.js:400:28)
    at Request.onRequestResponse (/snapshot/server/build/server/Common/node_modules/request/request.js:1059:10)
    at ClientRequest.emit (events.js:400:28)
    at HTTPParser.parserOnIncomingClient (_http_client.js:647:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:127:17)
    at Socket.socketOnData (_http_client.js:515:22)
    at Socket.emit (events.js:400:28)
    at addChunk (internal/streams/readable.js:293:12)
    at readableAddChunk (internal/streams/readable.js:267:9)
    at Socket.Readable.push (internal/streams/readable.js:206:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:188:23)

I have been supsicoius the problem can be JWT, but when I disabled it, the problem still exists.

Hello @Achilles541

As it comes from the issue, error 401 occurs. When integrating Document Server via WOPI, 401 occurs when invalid access token was provided:
https://api.onlyoffice.com/editors/wopi/restapi

Since error also states on which operation it happens, please make sure that you are providing correct data for CheckFileInfo operation:
https://api.onlyoffice.com/editors/wopi/restapi/checkfileinfo