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]: java.util.ConcurrentModificationException #954

Closed
2 of 3 tasks
christiaan opened this issue Dec 20, 2023 · 7 comments
Closed
2 of 3 tasks

[Bug]: java.util.ConcurrentModificationException #954

christiaan opened this issue Dec 20, 2023 · 7 comments

Comments

@christiaan
Copy link

christiaan commented Dec 20, 2023

What happened?

The app completely crashes

Steps to reproduce?

We migrated from version 3.x to 5.x

Replaced `setAppId` with `initialize`.
Replaced `setNotificationOpenedHandler` with `click` event listener on Notifications.
Replaced `addSubscriptionObserver` with `change` event listener on User.pushSubscription.
And at the end added the requestPermission call.

What did you expect to happen?

No crash

OneSignal Cordova SDK version

5.0.4

Which platform(s) are affected?

  • iOS
  • Android 13 and higher

Relevant log output

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.events.EventProducer.fire (EventProducer.kt:49)
  at com.onesignal.core.internal.application.impl.ApplicationService.setCurrent (ApplicationService.kt:50)
  at com.onesignal.core.internal.application.impl.ApplicationService.onActivityStarted (ApplicationService.kt:150)
  at android.app.Application.dispatchActivityStarted (Application.java:420)
  at android.app.Activity.dispatchActivityStarted (Activity.java:1451)
  at android.app.Activity.onStart (Activity.java:1969)
  at android.app.Instrumentation.callActivityOnStart (Instrumentation.java:1510)
  at android.app.Activity.performStart (Activity.java:8616)
  at android.app.ActivityThread.handleStartActivity (ActivityThread.java:4204)
  at android.app.servertransaction.TransactionExecutor.performLifecycleSequence (TransactionExecutor.java:221)
  at android.app.servertransaction.TransactionExecutor.cycleToPath (TransactionExecutor.java:201)
  at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:173)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:97)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2574)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:226)
  at android.os.Looper.loop (Looper.java:313)
  at android.app.ActivityThread.main (ActivityThread.java:8757)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:571)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1067)

Code of Conduct

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

Thank you for this report, @christiaan. We are already investigating this crash happening in the same place as your stack trace. We will let you know when a fix is ready!

@Sergeo-sel
Copy link

@jennantilla Hello!
Do you have any update on this issue?

@christiaan
Copy link
Author

@jennantilla can you link the issue in which that bug is tracked?

@bartvanvelden
Copy link

@jennantilla is there a way to speed this up?
Without a short solution timeline I have to consider moving to some OneSignal alternative.

@bartvanvelden
Copy link

@brayden-onesignal can you help out here?

@bartvanvelden
Copy link

or @gdeglin what can we do to get this fixed?

@jennantilla
Copy link
Contributor

Hello everyone! Apologies that these responses were missed. In case you missed it, the ConcurrentModificationExceptions were resolved in Q1. Please update to our latest SDK version. If you have any further questions or concerns, please let us know!

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

4 participants