Get Active Session is failing from Java Extension

Versions Used:
<java.version>11</java.version>
<fdk-extension.version>0.0.49</fdk-extension.version>
<fdk-client.version>1.3.4</fdk-client.version>

API Used : appClient.getUser().getActiveSessions(userId);

2023-10-12T18:14:36.907+05:30 ERROR 96080 — [nio-8080-exec-2] c.fynd.delfee.controller.CartController : get cart failed with the exception message Cannot deserialize value of type com.sdk.platform.user.UserPlatformModels$SessionListResponseSchema from Array value (token JsonToken.START_ARRAY)
at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 1, column: 1]

com.sdk.common.model.FDKException: Cannot deserialize value of type com.sdk.platform.user.UserPlatformModels$SessionListResponseSchema from Array value (token JsonToken.START_ARRAY)

Hi @Pitchaimani, please add “logging.level.com.sdk: DEBUG” line in your application.yaml file, this will print the logs and share the fdk response logs here.

2023-10-13T13:53:07.125+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : → GET https://api.jiox1.de/service/platform/user/v1.0/company/4/application/64b002e1386bae58f856f06d/customers/sessions?id=6502ff3c7c8eebce0d2719d4
2023-10-13T13:53:07.125+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : Authorization: Bearer oa-e44a0a464e7f9a96406f9758472c3b4d9c8b958d
2023-10-13T13:53:07.125+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : Content-Type: application/x-www-form-urlencoded
2023-10-13T13:53:07.125+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : x-fp-sdk-version: 1.3.4
2023-10-13T13:53:07.125+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : x-ext-lib-version: java/0.0.49
2023-10-13T13:53:07.125+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : x-fp-date: 20231013T082307Z
2023-10-13T13:53:07.125+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : host: api.jiox1.de
2023-10-13T13:53:07.125+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : x-fp-signature: v1:fb12ffad808f11beae5a6d8e70875ea1673fbd7f458e96ae7089f40d7ee50f72
2023-10-13T13:53:07.125+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : → END GET
2023-10-13T13:53:07.258+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : ← 200 https://api.jiox1.de/service/platform/user/v1.0/company/4/application/64b002e1386bae58f856f06d/customers/sessions?id=6502ff3c7c8eebce0d2719d4 (132ms)
2023-10-13T13:53:07.258+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : date: Fri, 13 Oct 2023 08:23:07 GMT
2023-10-13T13:53:07.258+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : content-type: application/json; charset=utf-8
2023-10-13T13:53:07.258+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : content-length: 310
2023-10-13T13:53:07.258+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : strict-transport-security: max-age=63072000; includeSubdomains
2023-10-13T13:53:07.258+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : x-content-type-options: nosniff
2023-10-13T13:53:07.259+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : x-powered-by: Express
2023-10-13T13:53:07.259+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : etag: W/“136-y5LI7YsTsAySXPl+npYtI9yNkR8”
2023-10-13T13:53:07.259+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : x-fynd-trace-id: f0350898c207bac8d31f0b2a3e9fc186
2023-10-13T13:53:07.259+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : via: 1.1 google
2023-10-13T13:53:07.259+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : alt-svc: h3=“:443”; ma=2592000,h3-29=“:443”; ma=2592000
2023-10-13T13:53:07.259+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger :
2023-10-13T13:53:07.259+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : [{“user_agent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36”,“expire_in”:“2023-11-11T11:54:58.231Z”,“ip”:“49.37.222.220”,“domain”:“.jiomartplaypitcompany.jiox1.de”,“location”:" IN",“session_id”:“sess:5xmxvU06Z9tARJQ-2XUd5kTg6tn8emxt”}]
2023-10-13T13:53:07.259+05:30 DEBUG 50575 — [nio-8080-exec-1] com.sdk.common.FDKLogger : ← END HTTP (310-byte body)
2023-10-13T13:53:07.261+05:30 ERROR 50575 — [nio-8080-exec-1] c.fynd.delfee.controller.CartController : get cart failed with the exception message Cannot deserialize value of type com.sdk.platform.user.UserPlatformModels$SessionListResponseSchema from Array value (token JsonToken.START_ARRAY)
at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 1, column: 1]

com.sdk.common.model.FDKException: Cannot deserialize value of type com.sdk.platform.user.UserPlatformModels$SessionListResponseSchema from Array value (token JsonToken.START_ARRAY)
at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 1, column: 1]
at com.sdk.platform.user.UserPlatformService$ApplicationClient.getActiveSessions(UserPlatformService.java:354) ~[fdk-client-java-1.3.4.jar:1.3.4]
at com.sdk.platform.user.UserPlatformService$ApplicationClient.getActiveSessions(UserPlatformService.java:336) ~[fdk-client-java-1.3.4.jar:1.3.4]
at com.fynd.delfee.controller.CartController.getActiveUserSessions(CartController.java:129) ~[classes/:na]
at com.fynd.delfee.controller.CartController.getCart(CartController.java:103) ~[classes/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]

Hello @Pitchaimani

Thank you for sharing the logs, we are checking on this and will get back to you with a solution shortly.

Tried with 1.3.5 sdk version, still facing the same issue

2023-11-01T11:51:13.987+05:30 INFO 26000 — [nio-8080-exec-2] com.fynd.delfee.utils.ControllerUtils : platformConfig com.sdk.platform.PlatformConfig@af3effb
2023-11-01T11:51:14.007+05:30 INFO 26000 — [nio-8080-exec-2] c.f.extension.service.ExtensionService : Platform Client for Company Id : 4 and Session Id :wArw09SwZWBE9tBLshh84EGuW4rngMhngJ/tw3XAjPo=
2023-11-01T11:51:14.007+05:30 INFO 26000 — [nio-8080-exec-2] com.fynd.delfee.utils.ControllerUtils : platformClient com.sdk.platform.PlatformClient@488342d
2023-11-01T11:51:14.007+05:30 INFO 26000 — [nio-8080-exec-2] com.fynd.delfee.utils.ControllerUtils : getPlatformClient function took 20 milliseconds
2023-11-01T11:51:14.018+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : → GET https://api.jiox1.de/service/platform/user/v1.0/company/4/application/64b002e1386bae58f856f06d/customers/sessions?id=6502ff3c7c8eebce0d2719d4
2023-11-01T11:51:14.018+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : Authorization: Bearer oa-5626819d41c8367097cd70bd9cfee47d73ad892a
2023-11-01T11:51:14.018+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : Content-Type: application/x-www-form-urlencoded
2023-11-01T11:51:14.018+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : x-fp-sdk-version: 1.3.5
2023-11-01T11:51:14.018+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : x-ext-lib-version: java/0.0.49
2023-11-01T11:51:14.018+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : x-fp-date: 20231101T062114Z
2023-11-01T11:51:14.018+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : host: api.jiox1.de
2023-11-01T11:51:14.018+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : x-fp-signature: v1:5effd37c88d5f26534edeba8011f983c2149999915895f6017ac92563e2c4f8b
2023-11-01T11:51:14.019+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : → END GET
2023-11-01T11:51:14.146+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : ← 200 https://api.jiox1.de/service/platform/user/v1.0/company/4/application/64b002e1386bae58f856f06d/customers/sessions?id=6502ff3c7c8eebce0d2719d4 (127ms)
2023-11-01T11:51:14.146+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : date: Wed, 01 Nov 2023 06:21:14 GMT
2023-11-01T11:51:14.146+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : content-type: application/json; charset=utf-8
2023-11-01T11:51:14.146+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : content-length: 628
2023-11-01T11:51:14.146+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : strict-transport-security: max-age=63072000; includeSubdomains
2023-11-01T11:51:14.146+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : x-content-type-options: nosniff
2023-11-01T11:51:14.147+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : x-powered-by: Express
2023-11-01T11:51:14.147+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : etag: W/“274-jkPL7c8klZxVaOmu0wdeeAMvkbE”
2023-11-01T11:51:14.147+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : x-fynd-trace-id: 9dad34b7d37892c4b331664861eeb7d2
2023-11-01T11:51:14.147+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : via: 1.1 google
2023-11-01T11:51:14.147+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : alt-svc: h3=“:443”; ma=2592000,h3-29=“:443”; ma=2592000
2023-11-01T11:51:14.147+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger :
2023-11-01T11:51:14.147+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : [{“user_agent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36”,“expire_in”:“2023-11-19T08:32:35.587Z”,“ip”:“59.89.205.126”,“domain”:“.jiomartplaypitcompany.jiox1.de”,“location”:“Coonoor TN IN”,“session_id”:“sess:j5ISEVbEBHOhYZmnr1zhSl6OEKRPjzog”},{“user_agent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36”,“expire_in”:“2023-12-01T06:15:00.347Z”,“ip”:“49.37.210.130”,“domain”:“.jiomartplaypitcompany.jiox1.de”,“location”:" IN",“session_id”:“sess:ckg5ypVq7J9DWwoQiZopJ2Oc2UZZr9nj”}]
2023-11-01T11:51:14.147+05:30 DEBUG 26000 — [nio-8080-exec-2] com.sdk.common.FDKLogger : ← END HTTP (628-byte body)
2023-11-01T11:51:14.147+05:30 ERROR 26000 — [nio-8080-exec-2] c.fynd.delfee.controller.CartController : get active sessions failed with the exception message Cannot deserialize value of type com.sdk.platform.user.UserPlatformModels$SessionListResponseSchema from Array value (token JsonToken.START_ARRAY)
at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 1, column: 1]

com.sdk.common.model.FDKException: Cannot deserialize value of type com.sdk.platform.user.UserPlatformModels$SessionListResponseSchema from Array value (token JsonToken.START_ARRAY)
at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 1, column: 1]
at com.sdk.platform.user.UserPlatformService$ApplicationClient.getActiveSessions(UserPlatformService.java:354) ~[fdk-client-java-1.3.5.jar:1.3.5]
at com.sdk.platform.user.UserPlatformService$ApplicationClient.getActiveSessions(UserPlatformService.java:336) ~[fdk-client-java-1.3.5.jar:1.3.5]

Hello @Pitchaimani

To resolve the issue, kindly switch to SDK version 1.8.5, as the problem is not expected to persist in that release.

Extension is getting complied, if we use 1.8.5

[WARNING] The POM for com.github.gofynd:fdk-client-java:jar:1.8.5 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.893 s
[INFO] Finished at: 2023-11-09T15:22:15+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project delfee-extension: Could not resolve dependencies for project com.fynd:delfee-extension:jar:1.0.0-SNAPSHOT: com.github.gofynd:fdk-client-java:jar:1.8.5 was not found in https://jitpack.io during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of jitpack.io has elapsed or updates are forced → [Help 1]
[ERROR]

This issue is resolved after using <fdk-client.version>1.3.8</fdk-client.version>

Thank you very much for resolving this issue