snowplow / snowplow-android-tracker

Snowplow event tracker for Android. Add analytics to your Android apps and games
http://snowplowanalytics.com
Apache License 2.0
109 stars 63 forks source link

Getting crash in snowplow in ServiceProvider class #686

Open Prithuld opened 5 months ago

Prithuld commented 5 months ago

Describe the bug Fatal Exception: java.lang.IndexOutOfBoundsException: Index: 2, Size: 2 at java.util.ArrayList.get(ArrayList.java:437) at kotlin.collections.CollectionsKt_MutableCollectionsKt.filterInPlace$CollectionsKt_MutableCollectionsKt(MutableCollections.kt:289) at kotlin.collections.CollectionsKt__MutableCollectionsKt.removeAll(MutableCollections.kt:274) at com.snowplowanalytics.core.tracker.ServiceProvider.removePlugin(ServiceProvider.kt:373) at com.snowplowanalytics.core.tracker.PluginsControllerImpl.removePlugin(PluginsControllerImpl.kt:32) at com.snowplowanalytics.core.globalcontexts.GlobalContextsControllerImpl.remove(GlobalContextsControllerImpl.kt:51) at commonlib.snowplow.DefaultSnowplowAnalyticsTracker.setGlobalUserContext(DefaultSnowplowAnalyticsTracker.kt:106)

To Reproduce Steps to reproduce the behavior or code snippets that produce the issue.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Device informatoin (please complete the following information): We are using 6.0.1 library Additional context Add any other context about the problem here.

miike commented 5 months ago

@Prithuld Could you please include information about your usage / configuration to allow us to replicate this issue? (particularly around global contexts)

Prithuld commented 5 months ago

As per analysis we see we are calling it from different Dispatchers(IO), but we did not change this part of code very recently