Skip to content

Crash on SDK initialization after updating from 1.18.1 to 1.19.0 #255

Closed
@snitsaruk

Description

@snitsaruk

Describe the bug
Crash on SDK initialization after updating from 1.18.1 to 1.19.0

To Reproduce
Steps to reproduce the behavior:

  1. Use version 1.18.1
  2. Migrate to 1.19.0
  3. Initialize the SDK
  4. See error

Platform (please complete the following information):

  • Library Version in use: 1.19.0
  • Platform being tested: Android
  • Integrations in use: Ajust, Firebase, Braze, Consent

Additional context
After updating the SDK from 1.18.1 to 1.19.0 we're seeing crashes on SDK init.

   Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{[REDACTED].LauncherSplashActivity}: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3903)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4049)
       at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
       at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:211)
       at android.os.Looper.loop(Looper.java:300)
       at android.app.ActivityThread.main(ActivityThread.java:8348)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1028)

Caused by java.lang.ClassCastException
java.lang.Integer cannot be cast to java.lang.String
          Caused by java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
       at android.app.SharedPreferencesImpl.getString(SharedPreferencesImpl.java:302)
       at com.segment.analytics.kotlin.android.utilities.AndroidKVS.get(AndroidKVS.kt:16)
       at com.segment.analytics.kotlin.core.utilities.StorageImpl.read(StorageImpl.kt:114)
       at com.segment.analytics.kotlin.android.plugins.AndroidLifecyclePlugin.trackApplicationLifecycleEvents$android_release(AndroidLifecyclePlugin.kt:242)
       at com.segment.analytics.kotlin.android.plugins.AndroidLifecyclePlugin.onCreate(AndroidLifecyclePlugin.kt:216)
       at com.segment.analytics.kotlin.android.plugins.AndroidLifecyclePlugin.onActivityCreated(AndroidLifecyclePlugin.kt:104)
       at android.app.Application.dispatchActivityCreated(Application.java:380)
       at android.app.Activity.dispatchActivityCreated(Activity.java:1469)
       at android.app.Activity.onCreate(Activity.java:1764)
       at androidx.core.app.ComponentActivity.onCreate(ComponentActivity.kt:68)
       at androidx.activity.ComponentActivity.onCreate(ComponentActivity.kt:328)
       at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:216)
       at com.flink.consumer.feature.splash.SplashActivity.onCreate(SplashActivity.kt:29)
       at com.flink.consumer.feature.splash.Hilt_LauncherSplashActivity.onCreate(Hilt_LauncherSplashActivity.java:57)
       at android.app.Activity.performCreate(Activity.java:8577)
       at android.app.Activity.performCreate(Activity.java:8541)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1437)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3884)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4049)
       at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
       at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:211)
       at android.os.Looper.loop(Looper.java:300)
       at android.app.ActivityThread.main(ActivityThread.java:8348)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1028)

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