java icon indicating copy to clipboard operation
java copied to clipboard

Json validation error in new version

Open editcriteria opened this issue 1 year ago • 11 comments
trafficstars

Describe the bug While trying to read the nodes of a server I got the following error:

java.lang.IllegalArgumentException: Expected the field `names` to be an array in the JSON string but got `null`

The line that throws the exception is V1ContainerImage.java:193 and in debug I noticed that in my case jsonObj.get("names") is JsonNull so the first condition of line 192 fails because it checks for null and the second fails because it is not an array. I tried the same call in versions 19.0.0 and even 20.0.1-legacy and I can read the nodes

Client Version 20.0.1

Kubernetes Version 1.29.1

Java Version Java 17

To Reproduce It happens on an internal server only when reading nodes

Expected behavior The Json response is parsed correctly

KubeConfig //

Server (please complete the following information):

  • OS: Linux
  • Environment container
  • Cloud /

editcriteria avatar Apr 15 '24 08:04 editcriteria