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

[Bug]: Crash ModelStore.persist java.util.ConcurrentModificationException #1578

Closed
2 of 3 tasks
Chasty opened this issue Oct 2, 2023 · 6 comments
Closed
2 of 3 tasks

Comments

@Chasty
Copy link

Chasty commented Oct 2, 2023

What happened?

Crashlytics are reporting those crashes.

Steps to reproduce?

-

What did you expect to happen?

React Native OneSignal SDK version

5.0.0

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

com.onesignal.common.modeling
ModelStore.kt:140

Fatal Exception: java.util.ConcurrentModificationException:
       at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1029)
       at java.util.ArrayList$Itr.next(ArrayList.java:982)
       at com.onesignal.common.modeling.ModelStore.persist(ModelStore.kt:140)
       at com.onesignal.common.modeling.ModelStore.addItem(ModelStore.kt:108)
       at com.onesignal.common.modeling.ModelStore.addItem$default(ModelStore.kt:98)
       at com.onesignal.common.modeling.ModelStore.add(ModelStore.kt:46)
       at com.onesignal.common.modeling.IModelStore$DefaultImpls.add$default(IModelStore.kt:37)
       at com.onesignal.core.internal.operations.impl.OperationRepo.internalEnqueue(OperationRepo.kt:76)
       at com.onesignal.core.internal.operations.impl.OperationRepo.enqueue(OperationRepo.kt:60)
       at com.onesignal.core.internal.operations.IOperationRepo$DefaultImpls.enqueue$default(IOperationRepo.kt:16)
       at com.onesignal.core.internal.operations.listeners.SingletonModelStoreListener.onModelUpdated(SingletonModelStoreListener.kt:51)
       at com.onesignal.common.modeling.SingletonModelStore$onModelUpdated$1.invoke(SingletonModelStore.kt:50)
       at com.onesignal.common.modeling.SingletonModelStore$onModelUpdated$1.invoke(SingletonModelStore.kt:50)
       at com.onesignal.common.events.EventProducer.fire(EventProducer.kt:44)
       at com.onesignal.common.modeling.SingletonModelStore.onModelUpdated(SingletonModelStore.kt:50)
       at com.onesignal.common.modeling.ModelStore$onChanged$1.invoke(ModelStore.kt:74)
       at com.onesignal.common.modeling.ModelStore$onChanged$1.invoke(ModelStore.kt:74)
       at com.onesignal.common.events.EventProducer.fire(EventProducer.kt:44)
       at com.onesignal.common.modeling.ModelStore.onChanged(ModelStore.kt:74)
       at com.onesignal.common.modeling.Model$notifyChanged$1.invoke(Model.kt:295)
       at com.onesignal.common.modeling.Model$notifyChanged$1.invoke(Model.kt:295)
       at com.onesignal.common.events.EventProducer.fire(EventProducer.kt:44)
       at com.onesignal.common.modeling.Model.notifyChanged(Model.kt:295)
       at com.onesignal.common.modeling.Model.notifyChanged(Model.kt:300)
       at com.onesignal.common.modeling.Model.setOptAnyProperty(Model.kt:200)
       at com.onesignal.common.modeling.Model.setOptAnyProperty$default(Model.kt:187)
       at com.onesignal.common.modeling.MapModel.put(MapModel.kt:47)
       at com.onesignal.common.modeling.MapModel.put(MapModel.kt:8)
       at com.onesignal.user.internal.UserManager.addTag(UserManager.kt:173)
       at com.onesignal.rnonesignalandroid.RNOneSignal.addTag(RNOneSignal.java:551)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
       at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:188)
       at com.facebook.jni.NativeRunnable.run(NativeRunnable.java)
       at android.os.Handler.handleCallback(Handler.java:942)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
       at android.os.Looper.loopOnce(Looper.java:201)
       at android.os.Looper.loop(Looper.java:288)
       at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
       at java.lang.Thread.run(Thread.java:1012)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@nan-li
Copy link
Contributor

nan-li commented Oct 6, 2023

Hi @Chasty, thanks for reporting this issue. I will investigate along with your other crash report #1579

@arthurgeron-work
Copy link

arthurgeron-work commented Oct 11, 2023

Can we get a status on this? This crash is already impacting 10% of our user base.
Captura de Tela 2023-10-11 às 08 56 20

@theonetheycallneo
Copy link

theonetheycallneo commented Oct 11, 2023

@arthurgeron-work Yes, we are seeing the same...

Poker_Power_-Crashlytics-_Firebase_console

@nan-li
Copy link
Contributor

nan-li commented Oct 12, 2023

Hi all, I apologize for any delay,

We have identified the cause and are working on the fix for all the methods this crash is reported.

@uasghar-smile
Copy link

Hi @nan-li I hope you are doing well. I am also getting crash and looking forward to fix it. Is there any chance to get a temp or permanent fix for it

I have reported this issue here with detail.
Issue detail

@jennantilla
Copy link
Contributor

Hello everyone! These crashes should now be resolved. Please try updating to the latest version of our SDK and let us know if you are still having any issues. Thanks!

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

6 participants