Skip to content
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]: NullPointerException in RefreshUserOperation on getStringProperty #2224

Open
1 task done
markobenke1 opened this issue Dec 2, 2024 · 0 comments
Open
1 task done

Comments

@markobenke1
Copy link

What happened?

The application crashes with a NullPointerException when calling the getStringProperty method in Model.kt. The exception indicates that a null value is being cast to a kotlin.String type, leading to the crash. This happens within the RefreshUserOperation when trying to fetch the OneSignalId or create the comparison key, causing failure in processing the queue in the OperationRepo.

Steps to reproduce?

Unfortunately, the exact steps to reproduce the issue are unclear at the moment. The crash occurs under certain conditions involving the RefreshUserOperation.

What did you expect to happen?

I expected the operation to complete without causing a NullPointerException, and for the relevant properties like OneSignalId to be retrieved correctly without crashing the app.

OneSignal Android SDK version

5.1.23

Android version

13, 10, 9, 7.0

Specific Android models

Xiaomi MiTV
Poco X3 Pro
TCL TV
Samsung Galaxy A51
Samsung S7
Samsung Galaxy S21 Ultra

Relevant log output

Fatal Exception: java.lang.NullPointerException
null cannot be cast to non-null type kotlin.String
com.onesignal.common.modeling.Model.getStringProperty (Model.kt:491)
com.onesignal.common.modeling.Model.getStringProperty$default (Model.kt:488)
com.onesignal.user.internal.operations.RefreshUserOperation.getOnesignalId (RefreshUserOperation.kt:27)
com.onesignal.user.internal.operations.RefreshUserOperation.getCreateComparisonKey (RefreshUserOperation.kt:32)
com.onesignal.core.internal.operations.impl.OperationRepo.getGroupableOperations (OperationRepo.kt:393)
com.onesignal.core.internal.operations.impl.OperationRepo.getNextOps$com_onesignal_core (OperationRepo.kt:360)
com.onesignal.core.internal.operations.impl.OperationRepo.processQueueForever (OperationRepo.kt:185)
com.onesignal.core.internal.operations.impl.OperationRepo.access$get_configModelStore$p (OperationRepo.kt)
com.onesignal.core.internal.operations.impl.OperationRepo.access$processQueueForever (OperationRepo.kt)
com.onesignal.core.internal.operations.impl.OperationRepo$processQueueForever$1.invokeSuspend (OperationRepo.kt:11)
kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33)

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant