OneSignal-Unity-SDK icon indicating copy to clipboard operation
OneSignal-Unity-SDK copied to clipboard

[Bug]: Fatal Exception: java.util.ConcurrentModificationException

Open ajaybirla-fabzen opened this issue 1 year ago • 1 comments

What happened?

The application crashes whenever it receives a notification when it is in the background.

Steps to reproduce?

1. Launch the application.
2. Minimize the application.
3. Send a notification to the application.
4. Click on the notification.
5. Observe the application crash.

What did you expect to happen?

I expect the app to not crash whenever it receives a notification in the background.

Unity version

2021.3.17f1

OneSignal Unity SDK version

5.0.5

Platform

Android

Relevant log output

Fatal Exception: java.util.ConcurrentModificationException:
       at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:760)
       at java.util.LinkedHashMap$LinkedEntryIterator.next(LinkedHashMap.java:792)
       at java.util.LinkedHashMap$LinkedEntryIterator.next(LinkedHashMap.java:790)
       at com.onesignal.common.modeling.Model.initializeFromModel(Model.kt:124)
       at com.onesignal.core.internal.config.impl.ConfigModelStoreListener$fetchParams$1.invokeSuspend(ConfigModelStoreListener.kt:69)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
       at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33)
       at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
       at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
       at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
       at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
       at kotlinx.coroutines.BuildersKt.runBlocking(:1)
       at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
       at kotlinx.coroutines.BuildersKt.runBlocking$default(:1)
       at com.onesignal.common.threading.ThreadUtilsKt$suspendifyOnThread$1.invoke(ThreadUtils.kt:60)
       at com.onesignal.common.threading.ThreadUtilsKt$suspendifyOnThread$1.invoke(ThreadUtils.kt:59)
       at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

ajaybirla-fabzen avatar Jan 13 '24 20:01 ajaybirla-fabzen

@ajaybirla-fabzen, thank you for providing the log output! We've acknowledged this issue and plan to address it in the next release.

jinliu9508 avatar Jan 26 '24 17:01 jinliu9508

Thank you for your patience, this has been addressed in the 5.0.6 release. Let us know if you still see this issue

shepherd-l avatar Mar 11 '24 20:03 shepherd-l