2

I'm using the Marketing Cloud SDK v5.4 for Android Push Notifications. My implementation is modeled completely after the sample code. On App start, the sdk initializes and I'm able to receive push notifications fine.

However, sometimes after the app has been open for awhile, it just crashes. The stack trace looks to be from something in the SDK and not my code. Does anyone know what is causing this and how it can be prevented? Thanks.

03-08 12:59:19.011 29800-29800/com.My App.My AppNow E/~!a: Failed to create our analytic item from storage.
                                                                   Sdk Version: 5.4.4
                                                                   Google Play Services Version: 11910000
                                                                   java.security.GeneralSecurityException: MAC stored in civ does not match computed MAC.
                                                                       at com.salesforce.marketingcloud.tozny.AesCbcWithIntegrity.decrypt(Unknown Source:68)
                                                                       at com.salesforce.marketingcloud.tozny.AesCbcWithIntegrity.decryptString(Unknown Source:2)
                                                                       at com.salesforce.marketingcloud.tozny.AesCbcWithIntegrity.decryptString(Unknown Source:3)
                                                                       at com.salesforce.marketingcloud.e.a.b(Unknown Source:11)
                                                                       at com.salesforce.marketingcloud.d.a.a.a(Unknown Source:178)
                                                                       at com.salesforce.marketingcloud.d.a.a.b(Unknown Source:17)
                                                                       at com.salesforce.marketingcloud.d.a.a.a(Unknown Source:92)
                                                                       at com.salesforce.marketingcloud.analytics.b.q.b(Unknown Source:65)
                                                                       at com.salesforce.marketingcloud.analytics.b.q.a(Unknown Source:12)
                                                                       at com.salesforce.marketingcloud.a.b.c(Unknown Source:19)
                                                                       at com.salesforce.marketingcloud.a.b$b.onReceive(Unknown Source:122)
                                                                       at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:311)
                                                                       at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:47)
                                                                       at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:120)
                                                                       at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                       at android.os.Looper.loop(Looper.java:164)
                                                                       at android.app.ActivityThread.main(ActivityThread.java:6494)
                                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                                       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
                                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
03-08 12:59:19.018 29800-29800/com.My App.My AppNow E/~!a: Failed to create our analytic item from storage.
                                                                   Sdk Version: 5.4.4
                                                                   Google Play Services Version: 11910000
                                                                   java.security.GeneralSecurityException: MAC stored in civ does not match computed MAC.
                                                                       at com.salesforce.marketingcloud.tozny.AesCbcWithIntegrity.decrypt(Unknown Source:68)
                                                                       at com.salesforce.marketingcloud.tozny.AesCbcWithIntegrity.decryptString(Unknown Source:2)
                                                                       at com.salesforce.marketingcloud.tozny.AesCbcWithIntegrity.decryptString(Unknown Source:3)
                                                                       at com.salesforce.marketingcloud.e.a.b(Unknown Source:11)
                                                                       at com.salesforce.marketingcloud.d.a.a.a(Unknown Source:178)
                                                                       at com.salesforce.marketingcloud.d.a.a.b(Unknown Source:17)
                                                                       at com.salesforce.marketingcloud.d.a.a.a(Unknown Source:92)
                                                                       at com.salesforce.marketingcloud.analytics.b.q.b(Unknown Source:65)
                                                                       at com.salesforce.marketingcloud.analytics.b.q.a(Unknown Source:12)
                                                                       at com.salesforce.marketingcloud.a.b.c(Unknown Source:19)
                                                                       at com.salesforce.marketingcloud.a.b$b.onReceive(Unknown Source:122)
                                                                       at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:311)
                                                                       at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:47)
                                                                       at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:120)
                                                                       at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                       at android.os.Looper.loop(Looper.java:164)
                                                                       at android.app.ActivityThread.main(ActivityThread.java:6494)
                                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                                       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
                                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
03-08 12:59:19.266 29800-29800/com.My App.My AppNow E/~!q: Failed to add the PI AnalyticItem Event to the event list.
                                                                   Sdk Version: 5.4.4
                                                                   Google Play Services Version: 11910000
                                                                   java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.salesforce.marketingcloud.analytics.g.h()' on a null object reference
                                                                       at com.salesforce.marketingcloud.analytics.b.q.a(Unknown Source:34)
                                                                       at com.salesforce.marketingcloud.analytics.b.q.a(Unknown Source:19)
                                                                       at com.salesforce.marketingcloud.analytics.b.q.b(Unknown Source:69)
                                                                       at com.salesforce.marketingcloud.analytics.b.q.a(Unknown Source:12)
                                                                       at com.salesforce.marketingcloud.a.b.c(Unknown Source:19)
                                                                       at com.salesforce.marketingcloud.a.b$b.onReceive(Unknown Source:122)
                                                                       at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:311)
                                                                       at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:47)
                                                                       at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:120)
                                                                       at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                       at android.os.Looper.loop(Looper.java:164)
                                                                       at android.app.ActivityThread.main(ActivityThread.java:6494)
                                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                                       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
                                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
03-08 12:59:19.273 29800-29800/com.My App.My AppNow E/~!q: Failed to add the PI AnalyticItem Event to the event list.
                                                                   Sdk Version: 5.4.4
                                                                   Google Play Services Version: 11910000
                                                                   java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.salesforce.marketingcloud.analytics.g.h()' on a null object reference
                                                                       at com.salesforce.marketingcloud.analytics.b.q.a(Unknown Source:34)
                                                                       at com.salesforce.marketingcloud.analytics.b.q.a(Unknown Source:19)
                                                                       at com.salesforce.marketingcloud.analytics.b.q.b(Unknown Source:69)
                                                                       at com.salesforce.marketingcloud.analytics.b.q.a(Unknown Source:12)
                                                                       at com.salesforce.marketingcloud.a.b.c(Unknown Source:19)
                                                                       at com.salesforce.marketingcloud.a.b$b.onReceive(Unknown Source:122)
                                                                       at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:311)
                                                                       at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:47)
                                                                       at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:120)
                                                                       at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                       at android.os.Looper.loop(Looper.java:164)
                                                                       at android.app.ActivityThread.main(ActivityThread.java:6494)
                                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                                       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
                                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
03-08 12:59:19.297 29800-29800/com.My App.My AppNow V/MCRequest: Executing https://app.igodigital.com/api/v1/collect/process_batch request ...
03-08 12:59:19.300 29800-29800/com.My App.My AppNow D/AndroidRuntime: Shutting down VM
03-08 12:59:19.306 29800-29800/com.My App.My AppNow E/AndroidRuntime: FATAL EXCEPTION: main
                                                                              Process: com.My App.My AppNow, PID: 29800
                                                                              java.lang.NullPointerException: Attempt to invoke virtual method 'int com.salesforce.marketingcloud.analytics.g.a()' on a null object reference
                                                                                  at com.salesforce.marketingcloud.analytics.h.a(Unknown Source:26)
                                                                                  at com.salesforce.marketingcloud.analytics.b.q.a(Unknown Source:32)
                                                                                  at com.salesforce.marketingcloud.analytics.b.q.b(Unknown Source:69)
                                                                                  at com.salesforce.marketingcloud.analytics.b.q.a(Unknown Source:12)
                                                                                  at com.salesforce.marketingcloud.a.b.c(Unknown Source:19)
                                                                                  at com.salesforce.marketingcloud.a.b$b.onReceive(Unknown Source:122)
                                                                                  at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:311)
                                                                                  at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:47)
                                                                                  at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:120)
                                                                                  at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                                  at android.os.Looper.loop(Looper.java:164)
                                                                                  at android.app.ActivityThread.main(ActivityThread.java:6494)
                                                                                  at java.lang.reflect.Method.invoke(Native Method)
                                                                                  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
                                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
03-08 12:59:20.331 29800-29868/com.My App.My AppNow I/CrashlyticsCore: Crashlytics report upload complete: 5AA193E6018E-0001-7468-84D0774194CF
  • I've traced through the code and see the path to the NPE. I'll log a bug internally to get this corrected. It is baffling that the encryption is failing to decrypt information from the DB. Are you seeing this in your testing or in production? If in testing can you provide more information around how to recreate the crash? You said that this happens after the app has been open for a while. How long is "a while?" The process that is running here will only occur when the app is in the background so I might be missing some information on how this is occurring. – Seth Mar 8 '18 at 22:33
  • @Seth. I'll see what information I can get you. All I can tell you right now is that the app will be sitting idly, then all of a sudden logcat just starts outputting logs and then it crashes. Awhile can be anything from one minute to 5 minutes. And the app hasn't been suspended at any point. This is still in test but it's blocking us from publishing. Any help is appreciated. – Marty Miller Mar 9 '18 at 1:34
  • @glls What is the reason for this question being marked as "off-topic"? The question is related to the Salesforce Marketing Cloud Android SDK. How is that "off-topic"? – Seth Mar 9 '18 at 17:50
  • @glls I didn't know if this was an issue with the SDK or if there is something I'm doing wrong. I assumed that since I couldn't find anyone else having this issue, it must be me. – Marty Miller Mar 9 '18 at 22:38
  • Any updates on this? thx – Marty Miller Mar 14 '18 at 19:33

Your Answer

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

Browse other questions tagged or ask your own question.