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]: SharedPreferences in credential encrypted storage are not available until after user is unlocked #2135

Open
1 task done
Munzey opened this issue Jun 24, 2024 · 1 comment

Comments

@Munzey
Copy link

Munzey commented Jun 24, 2024

What happened?

Firebase crash report of java.lang.IllegalStateException:.
happened to a single user but reporting anyway.

Firebase crash stacktrace:

android.app.ContextImpl.getSharedPreferences (ContextImpl.java:577)
android.content.ContextWrapper.getSharedPreferences (ContextWrapper.java:226)
com.onesignal.OneSignalPrefs.getSharedPrefsByName (OneSignalPrefs.java:330)
com.onesignal.OneSignalPrefs.get (OneSignalPrefs.java:302)
com.onesignal.OneSignalPrefs.getString (OneSignalPrefs.java:266)
com.onesignal.OSSharedPreferencesWrapper.getString (OSSharedPreferencesWrapper.java:22)
com.onesignal.language.LanguageContext.<init> (LanguageContext.java:23)
com.onesignal.OneSignal.setupContextListeners (OneSignal.java:902)
com.onesignal.OneSignal.initWithContext (OneSignal.java:760)```

### Steps to reproduce?

```Markdown
Firebase crash report

What did you expect to happen?

not crash

OneSignal Android SDK version

4.8.9

Android version

13

Specific Android models

Samsung Galaxy S20+ 5G

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jkasten2
Copy link
Member

jkasten2 commented Jun 24, 2024

@Munzey thanks for reporting, I believe this happens when the user reboots their device but hasn't unlocked it yet. I believe we will need to look into Android's Direct Boot to solve this:

Related OneSignal Issues:

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

2 participants