-
Notifications
You must be signed in to change notification settings - Fork 97
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
Failed to init Secured Preference Store. Exception: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String #33
Comments
Hello, The library fails to initialise:
The actual crash takes place later when the app tries to use Secured Shared Preferences:
This is how I initialise the library: Testing device: |
Haven't been able to reproduce this so far. Have you tested on any other device except the Samsung? @minadaki |
I tried on a Motorolla phone running Android Oreo and it worked fine. |
Hello,
I am using the latest version of the library (0.7.2).
I noticed that the init function was marked as deprecated so I tried to use the new init function (by the way, the description of the new function is missing the @param annotations for the newly added input fields).
The extra arguments of the new init function:
private static final String SECURE_PREFS_NAME = "secPrefs";
private static final String SECURE_KEY_PREFIX = "testvss";
private static final byte[] SECURE_PREFS_SEED = "seed".getBytes();
The stack trace of the error:
W/System.err: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
at devliving.online.securedpreferencestore.SecuredPreferenceStore$MigrationHelper.migrateToV10(SecuredPreferenceStore.java:491)
at devliving.online.securedpreferencestore.SecuredPreferenceStore$MigrationHelper.migrate(SecuredPreferenceStore.java:548)
at devliving.online.securedpreferencestore.SecuredPreferenceStore$MigrationHelper.migrate(SecuredPreferenceStore.java:537)
at devliving.online.securedpreferencestore.SecuredPreferenceStore.(SecuredPreferenceStore.java:60)
at devliving.online.securedpreferencestore.SecuredPreferenceStore.init(SecuredPreferenceStore.java:116)
at initializeSecurePreferences(Application.java:136).
Can you please check?
Also, how can I enable the library specific logs?
The text was updated successfully, but these errors were encountered: