OneSignal-Android-SDK
OneSignal-Android-SDK copied to clipboard
[Bug]: Fatal Exception: java.lang.NullPointerException when calling com.onesignal.core.internal.backend.impl.ParamsBackendService.fetchParams
What happened?
I'm observing some crash reports in Firebase Crashlytics with the following stack trace:
Fatal Exception: java.lang.NullPointerException:
at com.onesignal.core.internal.backend.impl.ParamsBackendService.fetchParams(ParamsBackendService.kt:38)
at com.onesignal.core.internal.backend.impl.ParamsBackendService$fetchParams$1.invokeSuspend(ParamsBackendService.kt:12)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33)
at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(BlockingCoroutine.java:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(BuildersKt__Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Builders.kt:1)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(BuildersKt__Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Builders.kt:1)
at com.onesignal.common.threading.ThreadUtilsKt$suspendifyOnThread$1.invoke(ThreadUtils.kt:60)
at com.onesignal.common.threading.ThreadUtilsKt$suspendifyOnThread$1.invoke(ThreadUtils.kt:59)
at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)
Steps to reproduce?
I'm not sure on the steps. Just seeing the reports in Crashlytics.
What did you expect to happen?
Crashes should not happen
OneSignal Android SDK version
com.onesignal:OneSignal:[5.0.0, 5.99.99]
Android version
13, 12
Specific Android models
* Samsung Galaxy A31
* Samsung Galaxy A52
* Xiaomi Redmi Note 11
* TBA
Relevant log output
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
@dmytroreutov thank you for reaching out! We're investigating this. In the meantime, if you have any additional information you can share on the frequency of this crash or any other details provided by Crashlytics, it would be very appreciated!
Hi, on the screenshot below you can see additional information from Crashlytics
+1 We're observing this issue too
Fatal Exception: java.lang.NullPointerException:
at com.onesignal.core.internal.backend.impl.ParamsBackendService.fetchParams(ParamsBackendService.kt:38)
at com.onesignal.core.internal.backend.impl.ParamsBackendService$fetchParams$1.invokeSuspend(ParamsBackendService.kt:12)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33)
at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(BlockingCoroutine.java:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(BuildersKt__Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Builders.kt:1)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(BuildersKt__Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Builders.kt:1)
at com.onesignal.common.threading.ThreadUtilsKt$suspendifyOnThread$1.invoke(ThreadUtils.kt:60)
at com.onesignal.common.threading.ThreadUtilsKt$suspendifyOnThread$1.invoke(ThreadUtils.kt:59)
at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Threads.kt:30)
This is now becoming our #1 crash, @jennantilla is there any update on this issue?
@jennantilla Any updates so far? This issue has ben reported for more than 3 weeks yet there is no action taken to fix it.
+1 We're observing this issue too.
+1 (version is 5.0.3)
+1 We're seeing this issue as well.
Hello has anyone been able to reproduce the issue locally? It looks like it could be happening when the app has been in the background and is then foregrounded?
+1 (version is 5.0.3)
+1 (version 5.0.2, on production we got a lot of crash like this)
This should be fixed in the latest 5.1.2 https://github.com/OneSignal/OneSignal-Android-SDK/releases
Please let us know if you continue to see this issue and provide the full crash log including affected devices and operating system versions.