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]: EventProducer.fire #1858

Closed
1 task done
ayushi-sk opened this issue Oct 3, 2023 · 9 comments
Closed
1 task done

[Bug]: EventProducer.fire #1858

ayushi-sk opened this issue Oct 3, 2023 · 9 comments
Labels

Comments

@ayushi-sk
Copy link

ayushi-sk commented Oct 3, 2023

What happened?

java.util.ConcurrentModificationException

Steps to reproduce?

Sometimes on app start, sometimes on notification receive

What did you expect to happen?

Not crash the app

OneSignal Android SDK version

5.0.2

Android version

13

Specific Android models

No response

Relevant log output

Fatal Exception: java.util.ConcurrentModificationException:
       at java.util.ArrayList$Itr.next(ArrayList.java:860)
       at com.onesignal.common.events.EventProducer.fire(EventProducer.kt:43)
       at com.onesignal.core.internal.application.impl.ApplicationService.setCurrent(ApplicationService.kt:50)
       at com.onesignal.core.internal.application.impl.ApplicationService.onActivityStarted(ApplicationService.kt:145)
       at android.app.Application.dispatchActivityStarted(Application.java:413)
       at android.app.Activity.dispatchActivityStarted(Activity.java:1483)
       at android.app.Activity.onStart(Activity.java:2017)
       at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1566)
       at android.app.Activity.performStart(Activity.java:8572)
       at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3934)
       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:2415)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:211)
       at android.os.Looper.loop(Looper.java:300)
       at android.app.ActivityThread.main(ActivityThread.java:8410)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@arthurgeron-work
Copy link

arthurgeron-work commented Oct 6, 2023

Getting the same error here, seems like it's trying to modify a collection using an iterator, which generates a crash. I can't really help since com.onesignal:core is closed source, but it seems to be a straightforward fix.

@jennantilla
Copy link
Contributor

Thanks for the reports! We're looking into this.

@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.

@ayushi-sk
Copy link
Author

Hi,
Any update on when you are going to release the fixes?

@arthurgeron-work
Copy link

I've found a way to reproduce this error consistently, with a temporary fix: #1857 (comment)

@jennantilla
Copy link
Contributor

Hello everyone! Thank you for your patience here. We have introduced a fix for this crash in our latest release, 5.0.4. Please update your SDK and let us know if you are still having any issues.

@jennantilla
Copy link
Contributor

Closing this issue; please let us know if you see any further occurrences of this exception. Thanks!

@tobus2012
Copy link

Ok and for those who use OneSignalSDK.DotNet 5.0.2 version in Xamarin.Form how do we fix this bug??

@jkasten2
Copy link
Member

jkasten2 commented Apr 4, 2024

@tobus2012 you will need to update to OneSignalSDK.DotNet 5.1.0 or newer to get this fix. Please follow up on the OneSignal-DotNet-SDK repo if you have issues, since this repo is only for Android native issues.

Edit: an issue was already created as a follow up here:
OneSignal/OneSignal-DotNet-SDK#99

@OneSignal OneSignal deleted a comment from tobus2012 Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants