You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The application crashes whenever it receives a notification when it is in the background.
Steps to reproduce?
1. Launch the application.
2. Minimize the application.
3. Send a notification to the application.
4. Click on the notification.
5. Observe the application crash.
What did you expect to happen?
I expect the app to not crash whenever it receives a notification in the background.
Unity version
2021.3.17f1
OneSignal Unity SDK version
5.0.6
Platform
Android
Relevant log output
Fatal Exception: java.lang.RuntimeException: Unable to start receiver com.onesignal.notifications.receivers.FCMBroadcastReceiver: java.lang.NullPointerException
at android.app.ActivityThread.handleReceiver(ActivityThread.java:4111)
at android.app.ActivityThread.access$1700(ActivityThread.java:242)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2078)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:227)
at android.app.ActivityThread.main(ActivityThread.java:7822)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1026)
Caused by java.lang.NullPointerException:
at com.onesignal.core.internal.application.impl.ApplicationService.getAppContext(ApplicationService.kt:40)
at com.onesignal.core.internal.device.impl.DeviceService.packageInstalledAndEnabled(DeviceService.kt:106)
at com.onesignal.core.internal.device.impl.DeviceService.isGMSInstalledAndEnabled(DeviceService.kt:101)
at com.onesignal.core.internal.device.impl.DeviceService.supportsGooglePush(DeviceService.kt:84)
at com.onesignal.core.internal.device.impl.DeviceService.getDeviceType(DeviceService.kt:41)
at com.onesignal.core.internal.device.impl.DeviceService.isAndroidDeviceType(DeviceService.kt:18)
at com.onesignal.location.LocationModule$register$1.invoke(LocationModule.kt:31)
at com.onesignal.location.LocationModule$register$1.invoke(LocationModule.kt:28)
at com.onesignal.common.services.ServiceRegistrationLambda.resolve(ServiceRegistration.kt:164)
at com.onesignal.common.services.ServiceProvider.getServiceOrNull(ServiceProvider.kt:79)
at com.onesignal.common.services.ServiceProvider.getService(ServiceProvider.kt:67)
at com.onesignal.common.services.ServiceRegistrationReflection.resolve(ServiceRegistration.kt:82)
at com.onesignal.common.services.ServiceProvider.getServiceOrNull(ServiceProvider.kt:79)
at com.onesignal.common.services.ServiceProvider.getService(ServiceProvider.kt:67)
at com.onesignal.common.services.ServiceRegistrationReflection.resolve(ServiceRegistration.kt:82)
at com.onesignal.common.services.ServiceProvider.getServiceOrNull(ServiceProvider.kt:79)
at com.onesignal.common.services.ServiceProvider.getService(ServiceProvider.kt:67)
at com.onesignal.internal.OneSignalImp.initWithContext(OneSignalImp.kt:518)
at com.onesignal.OneSignal.initWithContext(OneSignal.kt:208)
at com.onesignal.notifications.receivers.FCMBroadcastReceiver.onReceive(FCMBroadcastReceiver.kt:26)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:4095)
at android.app.ActivityThread.access$1700(ActivityThread.java:242)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2078)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:227)
at android.app.ActivityThread.main(ActivityThread.java:7822)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1026)
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
What happened?
The application crashes whenever it receives a notification when it is in the background.
Steps to reproduce?
What did you expect to happen?
I expect the app to not crash whenever it receives a notification in the background.
Unity version
2021.3.17f1
OneSignal Unity SDK version
5.0.6
Platform
Android
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: