Jetzt verfügbar:  Berichte für DRACOONMehr Infos

Received null when initializing Dracoon Client

Kommentare

6 Kommentare

  • Avatar
    Matthias Kellnhofer

    Dear Ivan,

    Which version of the SDK do you use?

    Could you also provide the version of the API backend?

    Best regards
    Matthias

    0
    Aktionen für Kommentare Permalink
  • Avatar
    Ivan Martínez

    Hi Matthias,

    The API version that we receive from backend on the devices that don't get this problem is 4.32.0

    The SDK that we are using on the Android client is "com.dracoon:dracoon-sdk:2.2.0-beta1"

    Let me know if you need anything else

    0
    Aktionen für Kommentare Permalink
  • Avatar
    Matthias Kellnhofer

    Hello Ivan,

    Could you please provide a stack trace of the error?

    Currently, I can't explain the error/cause to myself. The server should not return a null value at this point. And it is strange, that you have this problem only on one device.

    I will prepare a fix to handle a possible null value.

    Best regards
    Matthias

    0
    Aktionen für Kommentare Permalink
  • Avatar
    Ivan Martínez

    Sure, here are the logs that we are getting from this device about the error:

    W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String[] java.lang.String.split(java.lang.String)' on a null object reference
    W/System.err: at com.dracoon.sdk.internal.DracoonClientImpl.isApiVersionGreaterEqual(DracoonClientImpl.java:414)
    W/System.err: at com.dracoon.sdk.internal.DracoonClientImpl.assertApiVersionSupported(DracoonClientImpl.java:322)
    W/System.err: at com.dracoon.sdk.internal.DracoonClientImpl.init(DracoonClientImpl.java:227)
    W/System.err: at com.dracoon.sdk.DracoonClient$Builder.build(DracoonClient.java:1385)
    W/System.err: at com.teamwire.messenger.dracoon.DracoonDetailsActivity.onInitialized$lambda-4(DracoonDetailsActivity.kt:107)
    W/System.err: at com.teamwire.messenger.dracoon.DracoonDetailsActivity.$r8$lambda$A-SfPoqtRHsPcZdh2f2ZIjPAQvk(Unknown Source:0)
    W/System.err: at com.teamwire.messenger.dracoon.DracoonDetailsActivity$$ExternalSyntheticLambda4.run(Unknown Source:6)
    W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    W/System.err: at java.lang.Thread.run(Thread.java:919)

    Thanks for your help, and again, just let me know if we can help with something else

    0
    Aktionen für Kommentare Permalink
  • Avatar
    Matthias Kellnhofer

    Hello Ivan,

    I made a fix to prevent the NullPointerException. However, I think this might not solve your problem completely.

    Could you please send me a recording or logs of the HTTP messages?

    You can use an OkHttp interceptor to log requests/responses.

    See: https://github.com/dracoon/dracoon-java-sdk/blob/master/example/src/main/java/com/dracoon/sdk/example/OkHttpInterceptorExamples.java

    Request/response should look like this:

    2021-11-04 11:57:56 d/OkHttpInterceptorExamples 11:57:56: Request: (0)
    GET: https://dracoon.team/api/v4/public/software/version

    2021-11-04 11:57:57 d/OkHttpInterceptorExamples 11:57:57: Response: (0)
    200
    Body:
    {
    "restApiVersion" : "4.32.1",
    "sdsServerVersion" : "4.32.1",
    "buildDate" : "2021-11-02T12:21:03Z",
    "isDracoonCloud" : true
    }

    Best regards
    Matthias

    1
    Aktionen für Kommentare Permalink
  • Avatar
    Matthias Kellnhofer

    Hello Ivan,

    today, we made a new release (2.5.1) of the Java SDK. The release contains the fix to prevent the NullPointerException.

    Best regards
    Matthias

    1
    Aktionen für Kommentare Permalink

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.