An error has occurred while opening the file

When I used the spring example on the official website, an error occurred in opening the file:An error has occurred while opening the file

I hope to get some help, thank you.

Hello @caiwei

Do you mean this Java Spring example? If not please elaborate on how you access the application.

Yes, I used the java spring example on the website:

Did you configure it as per guide I’ve mentioned?
What installation type (Windows, Linux, Docker) did you use?

Yes, I have configured it according to the guide. I installed it on windows

Please provide a screenshot of the browser console when this error pops up.
Additionally, share Document Server logs that are located in C:\Program Files\ONLYOFFICE\DocumentServer\Log\ after reproducing the issue for analysis.

This is a screenshot of the browser:

There are two files in the document server log, the error.log is empty, and the contents of out.log are as follows:

[2023-05-23T22:27:50.660] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2023-05-23T22:27:50.664] [WARN] [localhost] [docId] [userId] nodeJS - Failed to subscribe to plugin folder updates. When changing the list of plugins, you must restart the server. https://nodejs.org/docs/latest/api/fs.html#fs_availability
[2023-05-23T22:27:51.041] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-windows mode. Version: 7.3.3. Build: 49
[2023-05-23T23:09:52.414] [WARN] [localhost] [1479193272] [userId] nodeJS - checkJwt error: name = JsonWebTokenError message = jwt must be provided token = undefined
[2023-05-23T23:10:39.809] [ERROR] [localhost] [1479193272] [1] nodeJS - postData error: url = http://localhost:8090//IndexServlet/track?fileName=new+%281%29.docx&userAddress=localhost;data = {"key":"1479193272","status":1,"users":["1"],"actions":[{"type":1,"userid":"1"}],"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiIxNDc5MTkzMjcyIiwic3RhdHVzIjoxLCJ1c2VycyI6WyIxIl0sImFjdGlvbnMiOlt7InR5cGUiOjEsInVzZXJpZCI6IjEifV0sImlhdCI6MTY4NDg1NDYzOSwiZXhwIjoxNjg0ODU0OTM5fQ.lwtMw79TdOA6vRn_BCgNvoGeRdlP7jw_TNO1ftNJF60"} Error: Error response: statusCode:404; headers:{"server":"nginx","date":"Tue, 23 May 2023 15:10:39 GMT","content-type":"text/html; charset=utf-8","transfer-encoding":"chunked","connection":"keep-alive","vary":"Accept-Encoding","content-security-policy":"default-src 'none'","x-content-type-options":"nosniff","content-encoding":"gzip"}; body:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST //IndexServlet/track</pre>
</body>
</html>

    at Request._callback (C:\snapshot\server\build\server\Common\sources\utils.js)
    at Request.callback (C:\snapshot\server\build\server\Common\node_modules\request\request.js:185:22)
    at Request.emit (events.js:400:28)
    at Request.<anonymous> (C:\snapshot\server\build\server\Common\node_modules\request\request.js:1154:10)
    at Request.emit (events.js:400:28)
    at Gunzip.<anonymous> (C:\snapshot\server\build\server\Common\node_modules\request\request.js:1076:12)
    at Object.onceWrapper (events.js:519:28)
    at Gunzip.emit (events.js:400:28)
    at endReadableNT (internal/streams/readable.js:1333:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
[2023-05-23T23:11:04.103] [ERROR] [localhost] [1479193272] [1] nodeJS - postData error: url = http://localhost:8090//IndexServlet/track?fileName=new+%281%29.docx&userAddress=localhost;data = {"key":"1479193272","status":1,"users":["1"],"actions":[{"type":1,"userid":"1"}],"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiIxNDc5MTkzMjcyIiwic3RhdHVzIjoxLCJ1c2VycyI6WyIxIl0sImFjdGlvbnMiOlt7InR5cGUiOjEsInVzZXJpZCI6IjEifV0sImlhdCI6MTY4NDg1NDY2NCwiZXhwIjoxNjg0ODU0OTY0fQ._Up9WGMyI0zIwVdhiYAIM1VsfN79dakf3ZNkmsRwg7w"} Error: Error response: statusCode:404; headers:{"server":"nginx","date":"Tue, 23 May 2023 15:11:04 GMT","content-type":"text/html; charset=utf-8","transfer-encoding":"chunked","connection":"keep-alive","vary":"Accept-Encoding","content-security-policy":"default-src 'none'","x-content-type-options":"nosniff","content-encoding":"gzip"}; body:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST //IndexServlet/track</pre>
</body>
</html>

    at Request._callback (C:\snapshot\server\build\server\Common\sources\utils.js)
    at Request.callback (C:\snapshot\server\build\server\Common\node_modules\request\request.js:185:22)
    at Request.emit (events.js:400:28)
    at Request.<anonymous> (C:\snapshot\server\build\server\Common\node_modules\request\request.js:1154:10)
    at Request.emit (events.js:400:28)
    at Gunzip.<anonymous> (C:\snapshot\server\build\server\Common\node_modules\request\request.js:1076:12)
    at Object.onceWrapper (events.js:519:28)
    at Gunzip.emit (events.js:400:28)
    at endReadableNT (internal/streams/readable.js:1333:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
[2023-05-23T23:11:14.243] [ERROR] [localhost] [1717382863] [1] nodeJS - postData error: url = http://localhost:8090//IndexServlet/track?fileName=new+%282%29.docx&userAddress=localhost;data = {"key":"1717382863","status":1,"users":["1"],"actions":[{"type":1,"userid":"1"}],"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiIxNzE3MzgyODYzIiwic3RhdHVzIjoxLCJ1c2VycyI6WyIxIl0sImFjdGlvbnMiOlt7InR5cGUiOjEsInVzZXJpZCI6IjEifV0sImlhdCI6MTY4NDg1NDY3NCwiZXhwIjoxNjg0ODU0OTc0fQ.67ftwjRFqZ02SruUqHnU88EDePhrfgIKm64CkYaqaHA"} Error: Error response: statusCode:404; headers:{"server":"nginx","date":"Tue, 23 May 2023 15:11:14 GMT","content-type":"text/html; charset=utf-8","transfer-encoding":"chunked","connection":"keep-alive","vary":"Accept-Encoding","content-security-policy":"default-src 'none'","x-content-type-options":"nosniff","content-encoding":"gzip"}; body:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST //IndexServlet/track</pre>
</body>
</html>

    at Request._callback (C:\snapshot\server\build\server\Common\sources\utils.js)
    at Request.callback (C:\snapshot\server\build\server\Common\node_modules\request\request.js:185:22)
    at Request.emit (events.js:400:28)
    at Request.<anonymous> (C:\snapshot\server\build\server\Common\node_modules\request\request.js:1154:10)
    at Request.emit (events.js:400:28)
    at Gunzip.<anonymous> (C:\snapshot\server\build\server\Common\node_modules\request\request.js:1076:12)
    at Object.onceWrapper (events.js:519:28)
    at Gunzip.emit (events.js:400:28)
    at endReadableNT (internal/streams/readable.js:1333:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
[2023-05-23T23:14:10.684] [ERROR] [localhost] [1712082450] [1] nodeJS - postData error: url = http://192.168.43.224:8090//IndexServlet/track?fileName=new.docx&userAddress=192.168.43.224;data = {"key":"1712082450","status":1,"users":["1"],"actions":[{"type":1,"userid":"1"}],"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiIxNzEyMDgyNDUwIiwic3RhdHVzIjoxLCJ1c2VycyI6WyIxIl0sImFjdGlvbnMiOlt7InR5cGUiOjEsInVzZXJpZCI6IjEifV0sImlhdCI6MTY4NDg1NDg1MCwiZXhwIjoxNjg0ODU1MTUwfQ.aVsHIeNY7Z4W8JlhJkfGfEl22QSMuv6BIXvf-67KCOM"} Error: Error response: statusCode:404; headers:{"server":"nginx","date":"Tue, 23 May 2023 15:14:10 GMT","content-type":"text/html; charset=utf-8","transfer-encoding":"chunked","connection":"keep-alive","vary":"Accept-Encoding","content-security-policy":"default-src 'none'","x-content-type-options":"nosniff","content-encoding":"gzip"}; body:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST //IndexServlet/track</pre>
</body>
</html>

    at Request._callback (C:\snapshot\server\build\server\Common\sources\utils.js)
    at Request.callback (C:\snapshot\server\build\server\Common\node_modules\request\request.js:185:22)
    at Request.emit (events.js:400:28)
    at Request.<anonymous> (C:\snapshot\server\build\server\Common\node_modules\request\request.js:1154:10)
    at Request.emit (events.js:400:28)
    at Gunzip.<anonymous> (C:\snapshot\server\build\server\Common\node_modules\request\request.js:1076:12)
    at Object.onceWrapper (events.js:519:28)
    at Gunzip.emit (events.js:400:28)
    at endReadableNT (internal/streams/readable.js:1333:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
[2023-05-23T23:15:44.516] [ERROR] [localhost] [-364621041] [1] nodeJS - postData error: url = http://192.168.43.224:8090//IndexServlet/track?fileName=new.xlsx&userAddress=192.168.43.224;data = {"key":"-364621041","status":1,"users":["1"],"actions":[{"type":1,"userid":"1"}],"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiItMzY0NjIxMDQxIiwic3RhdHVzIjoxLCJ1c2VycyI6WyIxIl0sImFjdGlvbnMiOlt7InR5cGUiOjEsInVzZXJpZCI6IjEifV0sImlhdCI6MTY4NDg1NDk0NCwiZXhwIjoxNjg0ODU1MjQ0fQ._CNCDRmi8FWGvhZ2e6FoIgYJ9LkoBS0__ShRHq_Zz2w"} Error: Error response: statusCode:404; headers:{"server":"nginx","date":"Tue, 23 May 2023 15:15:44 GMT","content-type":"text/html; charset=utf-8","transfer-encoding":"chunked","connection":"keep-alive","vary":"Accept-Encoding","content-security-policy":"default-src 'none'","x-content-type-options":"nosniff","content-encoding":"gzip"}; body:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST //IndexServlet/track</pre>
</body>
</html>

    at Request._callback (C:\snapshot\server\build\server\Common\sources\utils.js)
    at Request.callback (C:\snapshot\server\build\server\Common\node_modules\request\request.js:185:22)
    at Request.emit (events.js:400:28)
    at Request.<anonymous> (C:\snapshot\server\build\server\Common\node_modules\request\request.js:1154:10)
    at Request.emit (events.js:400:28)
    at Gunzip.<anonymous> (C:\snapshot\server\build\server\Common\node_modules\request\request.js:1076:12)
    at Object.onceWrapper (events.js:519:28)
    at Gunzip.emit (events.js:400:28)
    at endReadableNT (internal/streams/readable.js:1333:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
[2023-05-23T23:15:46.842] [ERROR] [localhost] [1740597091] [1] nodeJS - postData error: url = http://192.168.43.224:8090//IndexServlet/track?fileName=new.docx&userAddress=192.168.43.224;data = {"key":"1740597091","status":1,"users":["1"],"actions":[{"type":1,"userid":"1"}],"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiIxNzQwNTk3MDkxIiwic3RhdHVzIjoxLCJ1c2VycyI6WyIxIl0sImFjdGlvbnMiOlt7InR5cGUiOjEsInVzZXJpZCI6IjEifV0sImlhdCI6MTY4NDg1NDk0NiwiZXhwIjoxNjg0ODU1MjQ2fQ.9KXBm_CxiyLw5X6xKvfw4VCMIsJ-yuD-cAAq76OYIMo"} Error: Error response: statusCode:404; headers:{"server":"nginx","date":"Tue, 23 May 2023 15:15:46 GMT","content-type":"text/html; charset=utf-8","transfer-encoding":"chunked","connection":"keep-alive","vary":"Accept-Encoding","content-security-policy":"default-src 'none'","x-content-type-options":"nosniff","content-encoding":"gzip"}; body:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST //IndexServlet/track</pre>
</body>
</html>

    at Request._callback (C:\snapshot\server\build\server\Common\sources\utils.js)
    at Request.callback (C:\snapshot\server\build\server\Common\node_modules\request\request.js:185:22)
    at Request.emit (events.js:400:28)
    at Request.<anonymous> (C:\snapshot\server\build\server\Common\node_modules\request\request.js:1154:10)
    at Request.emit (events.js:400:28)
    at Gunzip.<anonymous> (C:\snapshot\server\build\server\Common\node_modules\request\request.js:1076:12)
    at Object.onceWrapper (events.js:519:28)
    at Gunzip.emit (events.js:400:28)
    at endReadableNT (internal/streams/readable.js:1333:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)

微信截图_20230524082447

I also found a warning in idea:

Did you try to create a file on the example page or did you try to upload your already existing file? If it was existing file, please specify its extension.

no, I run the java spring example of the official website

Please provide logs of Document Server. You can find them in C:\Program Files\ONLYOFFICE\DocumentServer\Log\ for Windows. You can archive them, upload to any cloud storage and send me a link to the archive (do it via PM in terms of safety).
Also, please provide \src\main\resources\application.properties config from Java Spring Example folder too.

I encountered the same problem。
I use onlyoffice-documentserver.exe7.5.1 + otp_win64_24.2.exe +postgresql-12.17-1-windows-x64.exe +rabbitmq-server-3.9.12.exe+windows server 2012 R2.

no error log in the logs directory.

The example can create or upload a file , but can not edit or view 。

Hello @MiKingWang

Please check browser console for any error entries when reproducing the issue and share screenshots of those. Additionally, after reproducing the issue, please archive all logs to also share with me for analysis.