OneSignal / OneSignal-Android-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native Android or Amazon app with OneSignal. https://onesignal.com
Other
604 stars 368 forks source link

[Bug]: NullPointerException - Attempt to invoke interface method 'boolean java.util.concurrent.ExecutorService.isShutdown()' on a null object reference #1872

Open rosebm opened 1 year ago

rosebm commented 1 year ago

What happened?

Screen Shot 2023-10-17 at 2 58 03 PM

Steps to reproduce?

Unknown, is reported by Crashlytics

What did you expect to happen?

No crashes

OneSignal Android SDK version

4.8.6

Android version

13, 12, 11, 10, 9

Specific Android models

48% Motorola: Moto G Power, Stylus 5G, Stylus, Play,  5G
21% LGE: Style 6, Style 5
21% Samsung: Galaxy Note 9, Galaxy A14 5G, Galaxy A13 5G
5% VSmart
5% Other

OS:

32% Android 10
26% Android 11
21% Android 12
16% Android 13
5% Other

Relevant log output

Fatal Exception: java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.concurrent.ExecutorService.isShutdown()' on a null object reference
       at com.onesignal.OSTaskController.shouldRunTaskThroughQueue(OSTaskController.java:44)
       at com.onesignal.OneSignal.sendTags(OneSignal.java:2011)
       at com.onesignal.OneSignal.sendTags(OneSignal.java:1931)
       at com.onesignal.OneSignal.sendTag(OneSignal.java:1907)
       at com.rosebm.cover.events.AnalyticsOneSignalImpl$sendUserProperties$1.invokeSuspend(AnalyticsOneSignalImpl.kt:63)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
       at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
       at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:100)
       at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

Code of Conduct

emawby commented 1 year ago

@rosebm Thank you for reporting we will investigate but any ideas you have on how to reproduce this issue would be very helpful!

rosebm commented 1 year ago

So far I don't know how to replicate it, will try to find it and post it here @emawby