-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: ANR during SDK Initialization #2226
Comments
Hello @maximkir-fl, thank you for reporting to us! To help us better understanding your issue, could you post the code where you call OneSignal.initWithContext? |
Sure, here it is: import android.app.Application
import com.onesignal.OneSignal
open class Application : Application() {
override fun onCreate() {
super.onCreate()
OneSignal.initWithContext(this, getString(R.string.one_signal_app_id))
}
} |
I don't see any issues with your code here, assuming the app ID is valid. Are you able to reliably reproduce this ANR? If not, have you noticed any specific pattern when this ANR occurs? Also, have you implemented any OneSignal lifecycle listener? |
I did not implement any lifecycle listeners. Once updated to |
@maximkir-fl The stack trace is from the runnable main thread and did not suggest what is blocking it. Could you paste the complete stack trace that shows where the thread has been blocked? |
What happened?
My code follows the integration instructions and initializes the OneSignal SDK during
Application.onCreate
.After upgrading to version 5.1.25, I saw the following ANR, originating from the initialization process.
Steps to reproduce?
What did you expect to happen?
Smooth background initialization.
OneSignal Android SDK version
5.1.25
Android version
14
Specific Android models
No response
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: