Parsing JSON error

I got this error while running my tests. What could be the possible root cause for this one?.

GoError: GoError: cannot parse json due to an error at line 1, character 2662202 , error: unexpected end of JSON input

Hello! You’re either dealing with malformed JSON or no JSON at all in the received response. You might want to put a try/catch where the exception occurs so that you can print out the response you’re actually receiving. I would also recommend using a web debugging proxy (such as Fiddler or Charlesproxy) and routing all HTTP requests through it so that you can see the full HTTP conversation (use the http_proxy environment variable for that).

There’s a response but it’s just too long to be included in this discussion. The status code was 201 as well.

We really need to see the response to help diagnose - are you able to send it to support@k6.io?

I take it the 201 is the expected status code?

I guess it’s not inconceivable that there’s some maximum length… Is this a HTTP/2 endpoint, or is there a Transfer-Encoding: chunked response header?

I’ve sent an email with the body attached to support@k6.io. For the header, there’s nothing but a Content-Type and Authorization.