Question

Hello, since last migration to 14.0.3 we have a problem with in-app messages in our Android app: app crashes when I try to open a message by clicking a in-app message notification in the bottom of the screen.

  • 15 December 2022
  • 6 replies
  • 268 views

Badge

I searched the whole documentation and android repository with the sample app, but can not find any information on that.

On the screenshot You can see the intercom in-app message notification:inapp messageWhen I click on it I receive the NPE Error with following stacktrace:

FATAL EXCEPTION: main Process: de.lexoffice.android.debug, PID: 19577 java.lang.NullPointerException: Attempt to read from field 'java.lang.String android.content.Intent.mAction' on a null object reference in method 'void android.content.Intent.<init>(android.content.Intent, int)' at android.content.Intent.<init>(Intent.java:7915) at android.content.Intent.<init>(Intent.java:7911) at android.app.TaskStackBuilder.getIntents(TaskStackBuilder.java:306) at android.app.TaskStackBuilder.startActivities(TaskStackBuilder.java:222) at android.app.TaskStackBuilder.startActivities(TaskStackBuilder.java:233) at android.app.TaskStackBuilder.startActivities(TaskStackBuilder.java:209) at io.intercom.android.sdk.overlay.OverlayPresenter.openMessenger(OverlayPresenter.java:311) at io.intercom.android.sdk.overlay.OverlayPresenter.openNotification(OverlayPresenter.java:290) at io.intercom.android.sdk.overlay.InAppNotificationPresenter.onInAppNotificationTap(InAppNotificationPresenter.java:122) at io.intercom.android.sdk.overlay.InAppNotification.onTouch(InAppNotification.java:87) at android.view.View.dispatchTouchEvent(View.java:15529) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3310) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2974) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3338) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2990) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3316) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2990) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3316) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2990) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3316) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2990) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3316) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2990) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3316) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2990) at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:1091) at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1968) at android.app.Activity.dispatchTouchEvent(Activity.java:4373) at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:70) at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:1049) at android.view.View.dispatchPointerEvent(View.java:15792) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:7931) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:7655) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6991) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7048) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7014) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7212) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7022) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:7269) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6995) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7048) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7014) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7022) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6995) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:10568) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:10456) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:10412) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:10706) 2022-12-15 17:50:50.192 19577-19577 AndroidRuntime de.lexoffice.android.debug E at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:267) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:335) at android.os.Looper.loopOnce(Looper.java:186) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8770) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

I am not sure what happens here, and I can not find any reasons for this NPE in the app because the stacktrace does not refer to any class in my application.

 

On the last SDK that we used (12.x) it worked without any problems.

 

I already migrated all the deprecated methods in version 14.0.x.

 

Thank you in advance!

 

Best regards

Artiom Carabas

 


6 replies

Userlevel 2

Hey @artiom c​​! Daniel from Customer Support Engineering here 🔧 

 

Can you please try updating to V14.0.4 and letting me know if it helps? If not, could you contact us about this via the Messenger, sharing your device and OS version, noting any plugins or third party apps used in your app? We may need to troubleshoot this further and request sensitive info that is not suitable to share in a public forum. Thanks!

Badge

Hello Daniel,

Thank you for your response,

we found a workaround for this issue on our site:

in the place where we handled our own deeplinks within the main activity of the application we had to clean the intent so that the deeplink wont be handled again and again, so after handling we just set the intent to null setIntent(null);. And a fix was to clear specific Intent Extras that we used instead of cleaning the whole intent.

 

So now we are good to go, but it was pretty hard to find what was the problem as it appeared with the Intercom SDK update.

I will test the V14.0.4 and will let you know if it also resolves the issue.

 

Hello,

 

We are having the same issue, and updating to V14.0.4 did not solve it. Can you please advise?

 

Thanks,

 

Andrew

Hey,

 

We are experiencing the same issue, but we have no stacktrace to show as it just crashes silently. Latest intercom version.

 

Any solutions or pending plans?

 

Thanks.

We are using latest react native version of intercom (4.0.1) and seeing same issue on Android app, where the app silently crashes in the background when opening a message received from intercom. Any update on this issue will be appreciated.

We are also seeing the same issue using @intercom/intercom-react-native@^4.0.1. Any update or workaround would be greatly appreciated. Thanks.

Reply