What happened?
App crashed due to the exception attached in the log.
It seems that the issue is here: https://github.com/OneSignal/OneSignal-Android-SDK/blob/main/OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/activities/PermissionsActivity.kt#L58
and extras turned out to be null.
At the line above the affected one there is a nullable parameter: https://github.com/OneSignal/OneSignal-Android-SDK/blob/main/OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/activities/PermissionsActivity.kt#L57
Regardless of the root cause it does not make sense to have a nullable parameter and then immediately use a non-null assertion operator on it. The parameter should be either non-nullable or there should be a nullcheck.
Steps to reproduce?
Unknown, it's an automated crash report.
From the stacktrace I guess it is related to app start.
What did you expect to happen?
No crash.
OneSignal Android SDK version
5.1.23
Android version
12
Specific Android models
Relevant log output
java.lang.RuntimeException: Unable to start activity ComponentInfo{<stripped app id>/com.onesignal.core.activities.PermissionsActivity}: java.lang.NullPointerException
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3635)
(stripped stacktrace entries from android framework)
Caused by: java.lang.NullPointerException:
com.onesignal.core.activities.PermissionsActivity.reregisterCallbackHandlers(PermissionsActivity.kt)
com.onesignal.core.activities.PermissionsActivity.handleBundleParams(PermissionsActivity.kt)
com.onesignal.core.activities.PermissionsActivity.onCreate(PermissionsActivity.kt:32)
android.app.Activity.performCreate(Activity.java:8051)
(stripped stacktrace entries from android framework)
Code of Conduct
What happened?
App crashed due to the exception attached in the log.
It seems that the issue is here: https://github.com/OneSignal/OneSignal-Android-SDK/blob/main/OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/activities/PermissionsActivity.kt#L58
and
extrasturned out to be null.At the line above the affected one there is a nullable parameter: https://github.com/OneSignal/OneSignal-Android-SDK/blob/main/OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/activities/PermissionsActivity.kt#L57
Regardless of the root cause it does not make sense to have a nullable parameter and then immediately use a non-null assertion operator on it. The parameter should be either non-nullable or there should be a nullcheck.
Steps to reproduce?
What did you expect to happen?
No crash.
OneSignal Android SDK version
5.1.23
Android version
12
Specific Android models
* Pixel 3aRelevant log output
java.lang.RuntimeException: Unable to start activity ComponentInfo{<stripped app id>/com.onesignal.core.activities.PermissionsActivity}: java.lang.NullPointerException android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3635) (stripped stacktrace entries from android framework) Caused by: java.lang.NullPointerException: com.onesignal.core.activities.PermissionsActivity.reregisterCallbackHandlers(PermissionsActivity.kt) com.onesignal.core.activities.PermissionsActivity.handleBundleParams(PermissionsActivity.kt) com.onesignal.core.activities.PermissionsActivity.onCreate(PermissionsActivity.kt:32) android.app.Activity.performCreate(Activity.java:8051) (stripped stacktrace entries from android framework)Code of Conduct