REST plugin addon - Invalid serialized plain/JWS/JWE object

Hi,

I hope this is the right place for this topic.

We developed an addon for Jira Server that exposes a REST component called by a JS script.
The API controller is defined as follow:

@Path("")
@Consumes({MediaType.APPLICATION_JSON})
@Produces({MediaType.APPLICATION_JSON})
@Scanned
public class MyApiController
{
    @PUT
    @Path("/board/{boardId}/capacity")
    public Response myPutCall(@PathParam("boardId") long boardId, @QueryParam("sprintId") long sprintId, final MyDto dto) throws Exception
    {
        ...
    }
}

Everything works fine on our local setup, as well as many other client installations.
However, one particular user is facing an issue with Jira 7.7.0 that we can’t figure out. The API call to that endpoint results in the following error:

<!DOCTYPE html>
<html>
<head>
<title>Apache Tomcat/8.5.6 - Error report</title>
 </head>
<body>
<h1>HTTP Status 400 - java.text.ParseException: Invalid serialized plain/JWS/JWE object: Missing part delimiters (caused by Invalid serialized plain/JWS/JWE object: Missing part delimiters)</h1>
<div class="line"></div>
<p><b>type</b> Status report</p>
<p><b>message</b> <u>java.text.ParseException: Invalid serialized plain/JWS/JWE object: Missing part delimiters (caused by Invalid serialized plain/JWS/JWE object: Missing part delimiters)</u></p>
<p><b>description</b> <u>The request sent by the client was syntactically incorrect.</u></p>
<hr class="line">
<h3>Apache Tomcat/8.5.6</h3>
</body>
</html>

The request had the following headers:

Accept application/json
Accept-Encoding gzip, deflate, br
Accept-Language en-US,en;q=0.9
Authorization JWT undefined
Connection keep-alive
Content-Length 492
Content-Type application/json
Cookie JSESSIONID=1A978F7E1F60765D4D8B7EE7E8221592; atlassian.xsrf.token=BOKY-JCXV-ZHWT-MVQ|d60fa7cc080190879d614cb705a59e27928e3e58|lin
User-Agent Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.92 Safari/537.36
X-Requested-With XMLHttpRequest

This exception seems to point to a JWT issue, but this is not handled by the API controller. And the fact that the same code works on different instances except this one baffles us.

Would anyone have an idea about what could cause this?

Thanks!

My apologies… writing this topic actually made me notice this weird “Authorization JWT undefined” header. I don’t know why this works in many installations, but this is most likely the culprit.
Nevermind :slight_smile: