Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AmplitudeSDK.logEvent java.util.ConcurrentModificationException occurs #404

Closed
Kanchan-tech1994 opened this issue Jun 27, 2024 · 2 comments

Comments

@Kanchan-tech1994
Copy link

Kanchan-tech1994 commented Jun 27, 2024

OnFirebase crashlytics, Amplitude SDK occurs below attached crash rapidly but while debugging on device it doesn't occurs(For a long time multiple users).

Using 'com.amplitude:android-sdk:2.40.1'

According to below logs while sending screenview event by BaseActivity which is extending by all other activities it occurs.

keyboard_arrow_up
java.util.LinkedHashMap$LinkedHashIterator.nextNode (LinkedHashMap.java:757)
arrow_drop_down
com.amplitude.api.AmplitudeClient.logEvent (AmplitudeClient.java:923)
arrow_right
com.Dummy.analytics.client.AmplitudeSDK.logEvent (AmplitudeSDK.kt:108)
com.Dummy.utils.event.EventBuilder.build (EventBuilder.java:330)
com.Dummy.analytics.screenView.ScreenViewEvents.sendAmplitudeEvent (ScreenViewEvents.kt:173)
com.Dummy.analytics.screenView.ScreenViewEvents.send (ScreenViewEvents.kt:28)
com.Dummy.activity.BaseActivity.sendScreenViewEvent (BaseActivity.java:2742)
com.Dummy.activity.fragment.next_gen_home.NextGenHomeFragment.onViewCreated (NextGenHomeFragment.kt:388)
androidx.fragment.app.Fragment.performViewCreated (Fragment.java:3137)
arrow_drop_down
androidx.appcompat.app.AppCompatActivity.onStart (AppCompatActivity.java:251)
com.Dummy.activity.BaseActivity.onStart (BaseActivity.java:236)
android.app.Instrumentation.callActivityOnStart (Instrumentation.java:1436)
arrow_drop_down
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1006)

@justin-fiedler
Copy link
Contributor

justin-fiedler commented Jun 28, 2024

Hi @Kanchan-tech1994 thanks for choosing Amplitude!

This is our older Android SDK which is in maintenance and no longer actively maintained.

Could you please upgrade to the latest SDK which likely resolves this issue? Thank you!

@izaaz izaaz closed this as completed Jul 12, 2024
@Kanchan-tech1994
Copy link
Author

hello @justin-fiedler Thanks for your response.

We have updated our SDK as per your suggestion but still getting the same crash occurs.

SDK which we are currently using -> com.amplitude:analytics-android:1.+

Updating SDK doesn't resolve our issue.

Fatal Exception: java.util.ConcurrentModificationException
keyboard_arrow_up
java.util.HashMap$HashIterator.nextNode (HashMap.java:1603)
arrow_drop_down
com.amplitude.core.Amplitude.track$default (Amplitude.kt:175)
arrow_right
com. Dummy.analytics.client.AmplitudeSDK.logEvent (AmplitudeSDK.kt:106)
com. Dummy.utils.event.EventBuilder.build (EventBuilder.java:315)
com. Dummy.analytics.screenView.ScreenViewEvents.sendAmplitudeEvent (ScreenViewEvents.kt:173)
com. Dummy.analytics.screenView.ScreenViewEvents.send (ScreenViewEvents.kt:28)
com. Dummy.activity.BaseActivity.sendScreenViewEvent (BaseActivity.java:2603)
com. Dummy.activity.fragment.next_gen_home.NextGenHomeFragment.onViewCreated (NextGenHomeFragment.kt:387)
androidx.fragment.app.Fragment.performViewCreated (Fragment.java:3137)
arrow_drop_down
androidx.appcompat.app.AppCompatActivity.onStart (AppCompatActivity.java:251)
com.Dummy.activity.BaseActivity.onStart (BaseActivity.java:233)
android.app.Instrumentation.callActivityOnStart (Instrumentation.java:1582)
arrow_drop_down
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:992)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants