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

ConcurrentModificationException occurs #229

Open
Kanchan-tech1994 opened this issue Nov 5, 2024 · 4 comments
Open

ConcurrentModificationException occurs #229

Kanchan-tech1994 opened this issue Nov 5, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Kanchan-tech1994
Copy link

Expected Behavior

App Must not crash.

Current Behavior

Currently for multiple users app is getting crashed while sending event.

Steps to Reproduce

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)

Environment

  • SDK Version:
    com.amplitude:analytics-android:1.16.8
    com.squareup.okhttp3:okhttp:4.9.0
Screenshot 2024-11-05 at 4 14 43 PM Screenshot 2024-11-05 at 4 15 33 PM
@Kanchan-tech1994 Kanchan-tech1994 added the bug Something isn't working label Nov 5, 2024
@izaaz
Copy link
Collaborator

izaaz commented Nov 5, 2024

Hi @Kanchan-tech1994 - this SDK is no longer being maintained. Can you please use the new Kotlin SDK instead?

@izaaz izaaz closed this as completed Nov 6, 2024
@Kanchan-tech1994
Copy link
Author

Hi @izaaz ,

Thank you for your response.

As you can see, I am already using the Kotlin SDK (com.amplitude:analytics-android:1.+). Despite updating to the latest version of the Kotlin SDK, I am still encountering the same crash within the AmplitudeSDK.kt file, specifically at line 106.

Could you kindly assist in further investigating this issue?

@izaaz izaaz transferred this issue from amplitude/Amplitude-Android Nov 7, 2024
@izaaz
Copy link
Collaborator

izaaz commented Nov 7, 2024

@Kanchan-tech1994 my bad :) Missed the version number. I moved the issue to the right SDK.

@izaaz izaaz reopened this Nov 7, 2024
@izaaz
Copy link
Collaborator

izaaz commented Nov 7, 2024

@Kanchan-tech1994 - do you happen to register any plugins as well while initializing Amplitude?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants