-
Notifications
You must be signed in to change notification settings - Fork 369
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]: 5.1.4 - NullPointerException: null cannot be cast to non-null type kotlin.String crashes on Startup #1995
Comments
Hello @CarlBarks, thanks for sharing the stack trace. Could you provide a little more info with any event listener or observer that you have added under OneSignal? From the look of the stack trace you were trying to access onesignalId in one of the event handler. Note that onesignalId isn't always available. If that is the case, I would recommend using |
Hi @jinliu9508 , we are not trying to retrieve the The only place where we are using it and we are seeing the crash, is when initialising OneSignal with The only observer we have is the following: Where no onesignalId is used or retrieved. |
@jinliu9508 and OneSignal team. We got 18 more crashes in this issue today. We would highly appreciate if you could look into this issue in one of your upcoming releases. |
@CarlBarks Thanks for the additional info! The team is currently looking into this bug and it is determined that this issue is caused by the migration from v4 to v5. We will keep you posted once an update is out. |
Hello, got the same identical crashes (lots of them) on 1S SDK 5.1.4, on all sorts of devices and OS versions.
Also, do you perhaps know a good workaround to avoid the crash? |
@alenjularic @CarlBarks a fix for this is now available in OneSignal-Android-SDK 5.1.6 |
What happened?
We experienced a NullPointer on initialisation which causes the app to crash on startup. We are on
5.1.4
Might be related to #1990 but the logoutput there suggests a crash at a different place
Seems more related to #1745 however, that was closed in March 2023.
Steps to reproduce?
What did you expect to happen?
OneSignal to get initialised without issues across all users and devices
OneSignal Android SDK version
5.1.4
Android version
9
Specific Android models
No response
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: