InstallationId is null

Hi,
I just implemented the SDK in my application. but I am having problems with the data.
When I add userId I see an error in the logcat and I have no information about installationId

java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
    at org.json.JSONTokener.nextCleanInternal(JSONTokener.java:121)
    at org.json.JSONTokener.nextValue(JSONTokener.java:98)
    at org.json.JSONArray.<init>(JSONArray.java:94)
    at org.json.JSONArray.<init>(JSONArray.java:110)
    at com.wonderpush.sdk.WonderPushConfiguration.changeUserId(WonderPushConfiguration.java:175)
    at com.wonderpush.sdk.WonderPush.initForNewUser(WonderPush.java:1759)
    at com.wonderpush.sdk.WonderPush.setUserId(WonderPush.java:2309)

The error happens just before the server calls, so I have no data afterwards.

The error happens with the changeUserId (userId)

I have to kill the app and relaunch it so that the WonderPush SDK can provide me with the installationId
Actual version : com.wonderpush:wonderpush-android-sdk:4.0.2 and com.wonderpush:wonderpush-android-sdk-fcm:1.0.1

Quentin.

Hi Quentin,

Thanks for reporting.
We’ve committed a fix for this issue and release the v4.0.3 of our SDK for Android.

1 Like