plaidev / karte-android-sdk

KARTE SDK for Android
https://karte.io/
Apache License 2.0
5 stars 3 forks source link

[notifications] App crashes rarely on Android 7 and below #15

Closed wasnot closed 3 years ago

wasnot commented 3 years ago

Expected Behavior

SDK works properly without a crash.

Current Behavior

Application will crash when tap push notification.

Possible Solution

Steps to Reproduce

cannot reproduced.

SDK Version

Context Details

This caused by AOSP bug, and fixed on Android 7. https://cs.android.com/android/_/android/platform/frameworks/base/+/694753465b577509cecba33a90fb7cb6d50f5533

Logs

java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx/xxx.Activity}: java.lang.IllegalArgumentException
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2727)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2791)
    at android.app.ActivityThread.-wrap12(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1539)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6329)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:890)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:780)
Caused by: java.lang.IllegalArgumentException
    at android.os.Parcel.nativeAppendFrom(Native Method)
    at android.os.Parcel.appendFrom(Parcel.java:463)
    at android.os.BaseBundle.<init>(BaseBundle.java:164)
    at android.os.Bundle.<init>(Bundle.java:106)
    at android.content.Intent.getExtras(Intent.java:6697)
    at io.karte.android.notifications.internal.wrapper.IntentWrapper.<init>(SourceFile:2)
    at io.karte.android.notifications.internal.track.ClickTracker.handle(SourceFile:2)
    at io.karte.android.KarteApp.onActivityCreated(SourceFile:10)
    ... 9 more

Possible Implementation

wasnot commented 3 years ago

This issue has been fixed in notifications 2.7.2 https://developers.karte.io/docs/release-notes-android-sdk-v2#notifications-272