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

Outdated values after installing new version of the app #157

Open
CodeWithOz opened this issue Sep 20, 2021 · 0 comments
Open

Outdated values after installing new version of the app #157

CodeWithOz opened this issue Sep 20, 2021 · 0 comments

Comments

@CodeWithOz
Copy link

Sometimes when I install a new version of the app, some values I retrieve are not up to date. The keys contain values from several days before, instead of the most recent values from a few hours before. As a simple example, consider this:

// after initializing the app
const now = Date.now(); // assume the value is 1000000000000
NativeStorage.setItem('lastOpenTime', now);

a few hours later after I open the app again

NativeStorage.getItem('lastOpenTime', value => {
  console.log(value === 1000000000000); // true
  const now = Date.now(); // assume the value is now 2000000000000
  NativeStorage.setItem('lastOpenTime', now);
});

the next day after I open the app again

NativeStorage.getItem('lastOpenTime', value => {
  console.log(value === 2000000000000); // false
  console.log(value === 1000000000000); // true
  ...
});

So the idea is that for some reason the value saved for lastOpenTime reverts to 1000000000000 even after it's been updated to 2000000000000. Any idea as to what could be causing this?

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

1 participant