Skip to content

IterableInAppFragmentHTMLNotification crash due to null context #466

@hangduykhiem

Description

@hangduykhiem

SDK Version: 3.4.8

Here's the stacktrace from our Firebase:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
       at android.view.animation.AnimationUtils.loadAnimation(AnimationUtils.java:141)
       at com.iterable.iterableapi.IterableInAppFragmentHTMLNotification.hideWebView(IterableInAppFragmentHTMLNotification.java:381)
       at com.iterable.iterableapi.IterableInAppFragmentHTMLNotification.onUrlClicked(IterableInAppFragmentHTMLNotification.java:257)
       at com.iterable.iterableapi.IterableWebViewClient.shouldOverrideUrlLoading(IterableWebViewClient.java:15)
       at android.webkit.WebViewClient.shouldOverrideUrlLoading(WebViewClient.java:83)
       at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(AwContentsClientBridge.java:15)
       at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
       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:8669)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

It seems that this DialogFragment is somehow disconnected from the activity and thus have no valid context. However I don't know how that is possible, seeing that the meethod is triggered by onUrlClicked.

Some additional information:

Devices affected
Screenshot 2022-08-19 at 10 40 48

Android OS
Screenshot 2022-08-19 at 10 41 03

Everything seems to be in foreground as well.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions