We updated the com.exacttarget.etpushsdk:etsdk to version 4.9.2. After we released the new version of our App we see several NullPointerExceptions that are caused by the SDK.

Fatal Exception: java.lang.NullPointerException
       at com.exacttarget.etpushsdk.ETPush.getInstance(SourceFile:660)
       at com.exacttarget.etpushsdk.h.a(SourceFile:62)
       at com.exacttarget.etpushsdk.ETGcmListenerService.onMessageReceived(SourceFile:15)
       at com.google.android.gms.gcm.GcmListenerService.zzo(Unknown Source)
       at com.google.android.gms.gcm.GcmListenerService.zzn(Unknown Source)
       at com.google.android.gms.gcm.GcmListenerService.zzm(Unknown Source)
       at com.google.android.gms.gcm.GcmListenerService.onMessageReceived(Unknown Source)
       at com.google.android.gms.gcm.GcmListenerService$1.run(Unknown Source)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:841)

The SDK is initialized like the following in the application class:

ETNotifications.setNotificationBuilder(new ETNotificationBuilder() {
    public NotificationCompat.Builder setupNotificationBuilder(Context context, Bundle bundle) {
        return NotificationUtil.createBuilder(context, bundle.getString("alert"));
ETPushConfig pushConfig = new ETPushConfig.Builder(this)
try {
    ETPush.configureSdk(pushConfig, new ETPushConfigureSdkListener() {
        public void onETPushConfigurationSuccess(ETPush etPush, ETRequestStatus etRequestStatus) {
            // we are not interested in the result

        public void onETPushConfigurationFailed(ETException e) {
            Logger.e(TAG, "ETPush configuration failed", e);
} catch (ETException e) {
    Logger.e(TAG, "Could not initialize ETPush", e);

It seems like the SDK is not handling the case when the GcmListenerService returns before the ETPush.configureSdk() finished (asynchronously) initializing ETPush.

  • It would appear you are correct. I will open a bug for prioritization. – Bill Mote May 17 '17 at 16:56
  • Ralph, we have a fix being reviewed. A release is forthcoming though I cannot provide an exact date. I will post an answer to this question when the release is public. – Bill Mote May 19 '17 at 17:48

Version 4.9.3 was just released to correct this problem: http://salesforce-marketingcloud.github.io/JB4A-SDK-Android/ Thank you for bringing it to our attention.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.