iterable-android-sdk icon indicating copy to clipboard operation
iterable-android-sdk copied to clipboard

SDK is crashing with ConcurrentModificationException (3.4.15)

Open andreichykov opened this issue 2 years ago • 2 comments
trafficstars

Preconditions:

Having Iterable wrapper component A


class A {
  init {
    val config = IterableConfig.Builder().setAutoPushRegistration(false).build()
    IterableApi.initialize(app, apiKey, config)
  }

  fun setupUser(userId: String, token: String) {
...
    IterableApi.getInstance().userId = userId
    IterableApi.getInstance().registerDeviceToken(token)
...
  }
}

Above code crashed randomly (quite often based on crashlytics report) Moving both init and setup to single/main thread (running on Handler(app.mainLooper)) didn't help

java.util.ConcurrentModificationException
	at java.util.HashMap$HashIterator.nextNode(HashMap.java:1441)
	at java.util.HashMap$EntryIterator.next(HashMap.java:1475)
	at java.util.HashMap$EntryIterator.next(HashMap.java:1473)
	at com.iterable.iterableapi.IterableApiClient.registerDeviceToken(IterableApiClient.java:426)
	at com.iterable.iterableapi.IterableApi.registerDeviceToken(IterableApi.java:486)
	at com.iterable.iterableapi.IterableApi$3.run(IterableApi.java:437)
	at java.lang.Thread.run(Thread.java:1012)

andreichykov avatar Oct 16 '23 11:10 andreichykov

Also crashed in 3.4.16

andreichykov avatar Oct 25 '23 11:10 andreichykov

yeah, I've created ticket for that on support, nothing happening from more than a month ¯_(ツ)_/¯ . They do not look like they care about it

fandomWojtek avatar Apr 24 '24 08:04 fandomWojtek