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]: crash during onesignal 4.8.6 initialisation on [NPE from com.onesignal.LocationController.backgroundLocationPermissionLogic(LocationController.java:284)] #1877

Open
1 task done
chokokatana opened this issue Oct 23, 2023 · 2 comments

Comments

@chokokatana
Copy link

chokokatana commented Oct 23, 2023

What happened?

Getting crashes from devices on field, logs indicate they are just opening the app and have practically no time to do anything else because the app is crashing on them.

Steps to reproduce?

Open app on Galaxy Z Fold3 5G with Android 13. According to app logs these are devices without Google Play Services:

> Couldn't get ad id info java.io.IOException: Google Play services not available (no exception)

What did you expect to happen?

Hopefully not crash.

OneSignal Android SDK version

4.8.6

Android version

13

Specific Android models

Galaxy Z Fold3 5G

Relevant log output

Fatal Exception: java.lang.NullPointerException:
       at java.util.Objects.requireNonNull(Objects.java:220)
       at java.util.Arrays$ArrayList.<init>(Arrays.java:4248)
       at java.util.Arrays.asList(Arrays.java:4235)
       at com.onesignal.LocationController.backgroundLocationPermissionLogic(LocationController.java:284)
       at com.onesignal.LocationController.getLocation(LocationController.java:268)
       at com.onesignal.OneSignal.startLocationUpdate(OneSignal.java:1049)
       at com.onesignal.OneSignal.startRegistrationOrOnSession(OneSignal.java:1024)
       at com.onesignal.OneSignal.doSessionInit(OneSignal.java:1013)
       at com.onesignal.OneSignal.init(OneSignal.java:868)
       at com.onesignal.OneSignal.setAppId(OneSignal.java:737)
       at com.onesignal.OneSignal.reassignDelayedInitParams(OneSignal.java:1181)
       at com.onesignal.OneSignal.onRemoteParamSet(OneSignal.java:889)
       at com.onesignal.OneSignal$7.complete(OneSignal.java:1122)
       at com.onesignal.OneSignalRemoteParams.processJson(OneSignalRemoteParams.java:211)
       at com.onesignal.OneSignalRemoteParams.access$100(OneSignalRemoteParams.java:12)
       at com.onesignal.OneSignalRemoteParams$1.onSuccess(OneSignalRemoteParams.java:156)
       at com.onesignal.OneSignalRestClient$5.run(OneSignalRestClient.java:279)
       at java.lang.Thread.run(Thread.java:1012)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@emawby
Copy link
Contributor

emawby commented Oct 23, 2023

@chokokatana Thank you for reporting. Just to confirm this is only happening on the Galaxy Z Fold devices? We investigate to see what is different about that devices lifecycle.

@chokokatana
Copy link
Author

Yes, only had this on those devices and the logs showed lack of google play services. Got 4 crashlytics crash reports from 2 users, but given the times it's most likely a single user who installed the app, tried to open it twice, deleted the app, reinstalled, tried twice again, and probably we won't see him ever again.

@jkasten2 jkasten2 changed the title [Bug]: crash during onesignal 4.8.6 initialisation [Bug]: crash during onesignal 4.8.6 initialisation on [NPE from com.onesignal.LocationController.backgroundLocationPermissionLogic(LocationController.java:284)] Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants