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

[Bug]: 5.4.0 com.onesignal.notifications.internal.common.NotificationHelper.getActiveNotifications

Open laraibsaghir0 opened this issue 1 year ago • 1 comments

What happened?

Alot of ANRs are being logged in Firebase Analytics after upgrading to one signal version 5.4.0.

Steps to reproduce?

Many users face ANR when the app runs. There are no specific steps to reproduce this issue.

What did you expect to happen?

No ANR in my app.

OneSignal Android SDK version

5.4.0

Android version

15

Specific Android models

Oppo Reno11 F 5G/Reno11 A
Samsung Galaxy S21 Ultra 5G
Transsion Infinix Note 40
Samsung Galaxy S25 Ultra

Relevant log output

main (native):tid=1 systid=2853 
#00 pc 0x98760 libc.so (syscall + 32) (BuildId: 260aabe00c4bed82089a372674d667a4)
#01 pc 0x201230 libart.so (art::ConditionVariable::WaitHoldingLocks + 136) (BuildId: 80d2ab18f9d259d8e546c1e6bae752b1)
#02 pc 0x5ee448 libart.so (artJniMethodEnd + 120) (BuildId: 80d2ab18f9d259d8e546c1e6bae752b1)
#03 pc 0x68f48c libart.so (art_jni_method_end + 12) (BuildId: 80d2ab18f9d259d8e546c1e6bae752b1)
       at android.os.BinderProxy.transactNative(Native method)
       at android.os.BinderProxy.transact(BinderProxy.java:661)
       at android.app.INotificationManager$Stub$Proxy.getAppActiveNotifications(INotificationManager.java:7351)
       at android.app.NotificationManager.getActiveNotifications(NotificationManager.java:3789)
       at com.onesignal.notifications.internal.common.NotificationHelper.getActiveNotifications(NotificationHelper.kt:35)
       at com.onesignal.notifications.internal.common.NotificationHelper.getGrouplessNotifsCount(NotificationHelper.kt:51)
       at com.onesignal.notifications.internal.open.impl.NotificationOpenedProcessor.clearStatusBarNotifications(NotificationOpenedProcessor.kt:214)
       at com.onesignal.notifications.internal.open.impl.NotificationOpenedProcessor.markNotificationsConsumed(NotificationOpenedProcessor.kt:191)
       at com.onesignal.notifications.internal.open.impl.NotificationOpenedProcessor.processIntent(NotificationOpenedProcessor.kt:113)
       at com.onesignal.notifications.internal.open.impl.NotificationOpenedProcessor.processFromContext(NotificationOpenedProcessor.kt:65)
       at com.onesignal.notifications.receivers.NotificationDismissReceiver$onReceive$1$1.invokeSuspend(NotificationDismissReceiver.kt:55)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
       at android.os.Handler.handleCallback(Handler.java:995)
       at android.os.Handler.dispatchMessage(Handler.java:103)
       at android.os.Looper.loopOnce(Looper.java:273)
       at android.os.Looper.loop(Looper.java:363)
       at android.app.ActivityThread.main(ActivityThread.java:10060)
       at java.lang.reflect.Method.invoke(Native method)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)

Code of Conduct

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

laraibsaghir0 avatar Nov 26 '25 07:11 laraibsaghir0

Hi, thank you for reporting these multiple stacktraces. Since they appear to be similar root causes, I will consolidate into a single issue for tracking.

nan-li avatar Dec 04 '25 21:12 nan-li