InstallationId is null

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(
    at org.json.JSONTokener.nextValue(
    at org.json.JSONArray.<init>(
    at org.json.JSONArray.<init>(
    at com.wonderpush.sdk.WonderPushConfiguration.changeUserId(
    at com.wonderpush.sdk.WonderPush.initForNewUser(
    at com.wonderpush.sdk.WonderPush.setUserId(

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


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