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

[Bug]: Fatal Exception: java.lang.NullPointerException when calling com.onesignal.core.internal.backend.impl.ParamsBackendService.fetchParams

Open dmytroreutov opened this issue 1 year ago • 12 comments

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 avatar Sep 13 '23 07:09 dmytroreutov

@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!

jennantilla avatar Sep 13 '23 20:09 jennantilla

Hi, on the screenshot below you can see additional information from Crashlytics

image

dmytroreutov avatar Sep 14 '23 14:09 dmytroreutov

+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)
Screenshot 2023-09-26 at 03 21 24

fanwgwg avatar Sep 25 '23 19:09 fanwgwg

This is now becoming our #1 crash, @jennantilla is there any update on this issue?

fanwgwg avatar Sep 27 '23 02:09 fanwgwg

@jennantilla Any updates so far? This issue has ben reported for more than 3 weeks yet there is no action taken to fix it.

fanwgwg avatar Oct 02 '23 06:10 fanwgwg

+1 We're observing this issue too.

ajaybirla-fabzen avatar Oct 06 '23 07:10 ajaybirla-fabzen

+1 (version is 5.0.3)

drusak avatar Oct 19 '23 09:10 drusak

+1 We're seeing this issue as well.

muehlemann avatar Oct 19 '23 13:10 muehlemann

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?

emawby avatar Oct 23 '23 17:10 emawby

+1 (version is 5.0.3)

herotha avatar Nov 01 '23 02:11 herotha

+1 (version 5.0.2, on production we got a lot of crash like this)

sarbyn avatar Nov 27 '23 08:11 sarbyn

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.

jfishman1 avatar Feb 01 '24 21:02 jfishman1