This error entry means that the JWT Token is improperly configured on the Java example side. After changing the secret did you recompile your Java example with new configuration?
Also, just as a side note, we recommend using custom JWT Headers, for example, AuthorizationJWT.
After reconfirmation, I recompiled my Java sample and confirmed that the configuration information was consistent with local.json. It is still the error of “The document security token is not correctly formed. Please contact your document server administrator”. I also tried to modify the request header, and it didn’t have any effect.
Just to clarify: by recompile I mean to re-built the package and reupload WAR file to Tomcat.
In test purposes you can try disabling JWT Token on Document Server side either by rerunning Docker container with variable -e JWT_ENABLED=false or by changing local.json:
Find section "token" and change "inbox", "outbox" and "browser" strings to false like that:
Of course, I repackage it to Tomcat every time. I tried to disable JWT on the server side. This time, “The document security token is not correctly formed. Please contact your document server administrator” did not appear, but a new problem occurred.
I was able to reproduce the issue with enabled JWT Token. We are checking the situation with this behavior. I will update the thread once I get any news.
Hi @Constantine
I found some issues,here are some of my situations:
1、I used docker to install onlyoffice/documentserver:7.2
2、I used two java demo for the onlyoffice website, when i use the secret which is the server generated. The version of java spring demo can open the file normal,but the version of java demo can not open file, the error just the same for the issue.
3、Because i copy the version of java demo, j just change some parameters, and when i open the files ,another error occurred, the error is : You are trying to perform an action you do not hava rights for.Please contact your Document Server administrator. And the server error is : fillDataFromJwt token has modified permissions
4、when i use docker start, if i disabled jwt ,i can open the file normal。
7.2 is an outdated version of Document Server. Please update your instance and check the situation again.
If the issue is still reproducible after the update, please provide next information:
version of the Java Example (you can find version in src/main/resources/settings.properties);
type of installation of Java Example (Windows, Linux, Docker);
logs of Document Server after attempting to edit the file via Java Example.
Logs are located in /var/log/onlyoffice/documentserver/ for Linux (same path inside Docker container) or in C:\Program Files\ONLYOFFICE\DocumentServer\Log\ for Windows.
hello @Constantine
I have updated the server to 7.3,the issue alawys exists。
1、The Java Example version is : 1.5.1
2、I run the example in windows
3、The server error is below
Please note that this thread is related to the Java Example. If you are facing this issue right after installing Document Server, then please refer to this article: https://api.onlyoffice.com/editors/troubleshooting#token
In general, if the issue is related to Document Server installation and not to Java Example, make sure to install the latest version 7.4 first since 7.1 is already outdated and then, if you still face the issue, consider starting a separate thread with detailed explanation of the issue to avoid mixing up topics. Thank you.
hii @Constantine i get the same issue “The document security token is not correctly formed. Please contact your Document Server administrator.”
i checked serveral blogs also but i still get the issue, i also made the JWT_ENABLE= false but when i do that then i get the erro “Download Failed” even i just open my doc file.