Skip to main content

Hello dear Support Team,

after updating the Intercom SDK to version 15.2.0 our app crashing with the next Stacktrace:
 


This happens when our own push notification will be consumed and the application will be send in background. After resuming the app from “recent apps” the crash happens. 
This behavior is noticed on different android versions from 11 to 14, and with Intercom SDK Versions 15.+, the same happens with 15.5.0.

Thanks in advance for support!

Hi @Artiom C !

This type of question is best sent directly to the Support team via email or your workspace Messenger. That way we can work with you to dig into the specific details a bit more. I’m going to send your message to the team. They will reach out to you via the Email address that you signed up with in order to get more details from you!



I have found the reason of crashing the Intercom SDK in our app - 
After a bit of research, I found that the problem was that the SDK, depending on the state of the application lifecycle, was trying to access the intent fields in the method onResume() responsible for the continuation of the activity, while on our side we were emptying the entire activity's intent after processing and consuming our own notifications, after each consumption we were nullifying the intent completely with the assurance that this would not break anything, to prevent showing the notifications multiple times.
At the same time Intercom SDK tries to access the nullable intent - which in my own opinion should not crash the whole application and that intent should be marked as nullable in SDK.
So we have just adjusted the function that was responsible for emptying the intent and it worked.
 


Thanks so much for sharing your findings @Artiom C ! Hopefully that will help other customers that run into the same issue!


after installing intercom version i got this error and don’t know how to resolve this error

 

> Task :app:mergeExtDexDebug FAILED
AGPBI: {"kind":"error","text":"java.lang.NullPointerException: Cannot invoke \"String.length()\" because \"<parameter1>\" is null","sources":e{"file":"/Users/ayazshaikh/.gradle/caches/transforms-3/1b404c1915ee05ffc03fd435305e5edf/transformed/lifecycle-livedata-core-2.8.1-runtime.jar"}],"tool":"D8"}

Execution failed for task ':app:mergeExtDexDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform lifecycle-livedata-core-2.8.1.aar (androidx.lifecycle:lifecycle-livedata-core:2.8.1) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /Users/ayazshaikh/.gradle/caches/transforms-3/1b404c1915ee05ffc03fd435305e5edf/transformed/lifecycle-livedata-core-2.8.1-runtime.jar.
         > Error while dexing.
   > Failed to transform lifecycle-livedata-core-2.8.1.aar (androidx.lifecycle:lifecycle-livedata-core:2.8.1) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /Users/ayazshaikh/.gradle/caches/transforms-3/1b404c1915ee05ffc03fd435305e5edf/transformed/lifecycle-livedata-core-2.8.1-runtime.jar.
         > Error while dexing.


Reply