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 (2) - Fatal Exception: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 #2008

Closed
1 task done
area51bis opened this issue Feb 26, 2024 · 1 comment

Comments

@area51bis
Copy link

What happened?

Multiple errors in Crashlytics

Steps to reproduce?

I can't reproduce it, but there are quite a few records in Crashlytics.

What did you expect to happen?

No crash...

OneSignal Android SDK version

Release 5.1.3

Android version

13, 12

Specific Android models

* Galaxy A54 5G
* Galaxy S20 FE 5G
* Galaxy A51
* Motorola Edge 30 Neo
* Moto G53 5G
* Moto G22
* Redmi Note 12

Relevant log output

Fatal Exception: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
       at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
       at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
       at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
       at java.util.Objects.checkIndex(Objects.java:359)
       at java.util.ArrayList.get(ArrayList.java:434)
       at java.util.Collections$SynchronizedList.get(Collections.java:2564)
       at kotlin.collections.CollectionsKt___CollectionsKt.toList(_Collections.kt:1315)
       at com.onesignal.common.events.EventProducer.fire(EventProducer.kt:48)
       at com.onesignal.core.internal.application.impl.ApplicationService.onGlobalLayout(ApplicationService.kt:208)
       at android.view.ViewTreeObserver.dispatchOnGlobalLayout(ViewTreeObserver.java:1084)
       at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:4302)
       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:3116)
       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10885)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1301)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1309)
       at android.view.Choreographer.doCallbacks(Choreographer.java:923)
       at android.view.Choreographer.doFrame(Choreographer.java:852)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1283)
       at android.os.Handler.handleCallback(Handler.java:942)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       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(Method.java)
       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

Consolidating this issue with #2007. I added this stack trace there.

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

2 participants