Comments (14)
from cordova-plugin-secure-storage.
Hi.
Look like there are invalid entries in the storage.
The only reason I can think that could cause such entries would be that an entry in localStorage whose name starts with SS and has not been created by the plugin.
@Darkoon could this be the case?
Can you please clarify whether the errors appeared after upgrading the plugin or the first time you tried it.
Also could you please debug and reply on which key the error happens and what's the value of it?
from cordova-plugin-secure-storage.
Hello again!
I'm not using localStorage in my project but decided to look at it, my localStorage is empty all the time.
Errors started to pop up from the very beginning and are connected with get method but they appear only once, after first use of get. I tried to test it on few devices and avd's but in all cases there were the same warnings/erros. Clearly I don't know what to do with that, plugin works fine and I really want to use it. Can you tell me something about the structure, where can I possibly find something to fix it? I'm using a few other cordova plugins (only one connected with data storage - sqlite plugin), maybe there are some conflicts between them?
Thanks for help!
from cordova-plugin-secure-storage.
This shouldn't stop you in anyway, we will have a look into it, but it should not affect the operation of the plugin.
In brief, we used to store encrypted data in localStorage but recently switched to using a native mechanism. There is a migration that happens the first time for those that had been using the old version. This migration fails in your case, but it shouldn't occur at all since it's a pristine installation and there is nothing to migrate.
from cordova-plugin-secure-storage.
Is there any other information I can provide to help fix this problem?
from cordova-plugin-secure-storage.
@Darkoon If you could provide the name and value of the failing entry it could point us to the right direction. If this is a problem for you I could instruct you on how to do it. Thanks.
from cordova-plugin-secure-storage.
I don't quiet understand about what entry are you talking (warnings/errors pop up for every key-value pair even for 'mykey', 'myvalue' from readme examples). So if you are talking about something else, please instruct me.
from cordova-plugin-secure-storage.
I am talking about debugging the plugin code. The error happens while migrating old data as ggozad already mentioned. Adding a printout of the key value pair that is being migrated in line 362 of securestorage.js would do the job. You can do the change either by forking this project or by changing the downloaded plugin code.
from cordova-plugin-secure-storage.
Sorry for the late response! Log added in line 362 was never called, so I decided to log key and value from line 385. I saw pairs generating warnings/errors, keys: insert
, pushArray
and swap
are all set to null
.
from cordova-plugin-secure-storage.
Line 387 in www/securestorage.js does not check for a null value returned from JSON.parse and thus throws and exception. I modified that line to read:
if (payload != null && !payload.native) {
and it fixed the problem for me.
from cordova-plugin-secure-storage.
@jmotyl1959 Hey, thanks but you solve the problem by hiding the reason. Can you confirm Darkoon's findings?
@Darkoon thanks for your results I am looking into it.
from cordova-plugin-secure-storage.
@Darkoon @jmotyl1959 Can you please verify that applying the correction I did in my PR fixes the problem? My tests show it does but I 'll wait until you verify. Thanks for the help.
from cordova-plugin-secure-storage.
@demetris-manikas I can confirm that your correction fixed the problem for me.
from cordova-plugin-secure-storage.
Fixed in 2.5.2
from cordova-plugin-secure-storage.
Related Issues (20)
- Where can I inspect the saved passwords on my iOS device? HOT 4
- Exception on Android Pie HOT 7
- Where is sjcl_ss.js? HOT 4
- Dependency on SAMKeychain HOT 3
- uncaught exception error HOT 3
- Do not rely on internal Android API for screen unlock HOT 11
- Usage of OAEP HOT 1
- Link doesn't work in readme HOT 1
- Exception on Android Pie after adding back lock screen HOT 15
- Save value of ss.get() in a variable ? HOT 1
- Android Q API 28 ERROR: No Activity found to handle Intent { act=com.android.credentials.UNLOCK } HOT 32
- iOS User interaction is not allowed HOT 1
- Data is still accessible after loging out of icloud HOT 1
- icloud
- App using unlockCredentials crash on Android Q HOT 2
- Refactor actions in static class so it can be re-used by other plugins HOT 1
- How to check whether key exist or not HOT 1
- android.content.ActivityNotFoundException HOT 2
- Capacitor support HOT 1
- Still having a problem with this. Running emulator on 12.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-secure-storage.