question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AsyncStorage not working frequently

See original GitHub issue

Environment

Environment: OS: Linux 4.4 Node: 6.14.1 Yarn: Not Found npm: 3.10.10 Watchman: 4.7.0 Xcode: N/A Android Studio: Not Found

Packages: (wanted => installed) react: ^16.3.0-alpha.1 => 16.4.1 react-native: 0.54.4 => 0.54.4

Description

In our app we use AsyncStorage API. But there is a problem occur. The problem is from the first time this API is working fine. But after some time response is not coming from AsyncStorage and also not showing any error message, basically AsynStorage totally stopped working. This is happens frequently. Don’t know why this is happen. Is there any promise issue or anything else? This is happens both in ios and android. We build in release mode in ios but still getting issue frequently.

Reproducible Demo

My code is below. When the issue occur then we can’t get any console.log in between AsyncStorage.multiGet. Also not showing any err log also.

AsyncStorage.multiGet(keys, (err, stores) => {
       console.log(err);
       console.log(stores);
      });

Anyone please suggest any solution, Why this is happen!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
MSSPL-PiyaleeMaiticommented, Jun 29, 2018

@OtacilioN We do a release build in iOS but we are getting the issue for AsyncStorage. And in debug mode when AsyncStorage not working then after closing remote debugger still not working. It’s working again when we close the app and re-open the APP. Why this is happening can you tell me? And what is the solution can you suggest for me?

@kelset I know it’s a duplicate issue, but in the previous issue, there is too much conversation so I can’t post any comment. That’s why I create a new one.

We have a big problem with AsyncStorage in release build also, it’s so urgent. Can anyone one suggest any solution?

0reactions
kelsetcommented, Jun 29, 2018

Yes this really looks like it’s a duplicate of #14101. I’ll close this until there are enough evidences that the two are different issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

reactjs - AsyncStorage not working - Stack Overflow
You need to move your getItem code outside of render, there is no reason it should be located there. Put it in a...
Read more >
error installing AsyncStorage in react-native - Reddit
To fix this issue try these steps: • Run `react-native link @react-native-async-storage/async-storage` in the project root.
Read more >
A guide to React Native's AsyncStorage - LogRocket Blog
AsyncStorage is an unencrypted and asynchronous data storage system in React Native that allows users to persist data offline.
Read more >
Building offline React Native apps with AsyncStorage
An end-to-end tutorial showing how to build an offline to-do list application with React Native and Expo.
Read more >
Async Storage in React Native: How to Do It Right | Waldo Blog
Often, we need to store data locally in the React Native app. For this, we can use Async Storage, a feature of React...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found