Closed Alex-Sessler closed 8 years ago
Ouch! That's pretty bad, will try to fix this week. Would it be possible to make a failing test case for the above?
Hm, what do you mean with "a failing test case"? In my first example, the get call fails and in the second example the set call succeeds. Since all functions use the same helper functions on error/succeed I though that should be good enough.
I mean there is a small test suite in the package. If you could write a test case that fails (copy pasting the above and asserting that all callbacks are called properly) that would save me some trouble :)
I've added a branch with a test case that demonstrates this in FIX-thread-callbacks. Seems that since callbackId is kept in self, this is overwritten every time. @goshakkk would you please be able to fix this?
Seems I have fixed this in FIX-thread-callbacks. Tests now all pass including multiple calls to securestorage. @Alex-Sessler could you please verify with your app running the branch?
I tested the branch version and it seems to fix my issues... Awesome, thanks!
I've found this behaviour in my main app and have also managed to reproduce it in a minimal cordova app. All of this is executed after the deviceReady event.
Now these calls are supposed to fail, because there is no data in the keychain yet:
The output I receive however, is:
Now let's say I want to store some values in the keychain, which should succeed:
The calls succeed, but the pattern is the same as before, the success callback is only executed for the last one:
There must be some problems with processing those requests in separate threads.