-
Notifications
You must be signed in to change notification settings - Fork 467
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
Async Storage is not working when I turn off debug or build app to production #271
Comments
need help :( |
Unfortunately the same issue for me. Only on some IOS devices (so far on IOS 12.2) Only on release build. |
I think what you might be experiencing is a condition race between you using Community's AsyncStorage and your dependencies using RN Core's AsyncStorage. Try to find if any of your dependency is doing so. If that's the case, I suggest to find different dependency or use AsyncStorage from the core. |
I'm also facing this issue. Can't see anything that's using RN Core's AS, and switching my usage to import from core does not help. Anyone get anywhere with this? |
@giangnguyen712 this may seem like a random question, but are you doing any date manipulation with the data you're storing? It looks like that's been my issue all along. |
The same issue I stuck with, Have you @giangnguyen712 got the solution for this? |
The issue happen with me because I used window atob and btoa, for encode purpose, and it got bugs in react native, the weird thing is it still works when turn on debug (this is my issue: https://stackoverflow.com/questions/42829838/react-native-atob-btoa-not-working-without-remote-js-debugging). If you use RN v0.61.5 or above, try to debug by using try catch in your function, you can view the log on terminal without turn on debug, it help me find my issue. |
Exactly my issue, thanks! |
For me it was: #814 (comment) |
Current behavior
I'm getting this weird bug, cause I have try many times with my old project, Async Storage still worked ok but not in this current project.
Problem is when I turn on debug for coding, the Async Storage save my data correctly. But after I turn off debug or build to production (.apk file). It didn't work anymore, data didn't setItem to save, no data return.
Expected behavior
setItem and getItem will work ok when turn off debug or build app to production.
Environment
"dependencies": {
"@react-native-community/async-storage": "^1.7.1",
"moment": "^2.24.0",
"react": "16.8.6",
"react-native": "0.61.5",
"react-native-axios": "^0.17.1",
"react-native-camera": "^3.8.0",
"react-native-datepicker": "^1.7.2",
"react-native-gesture-handler": "^1.4.1",
"react-native-image-zoom-viewer": "^2.2.27",
"react-native-loading-spinner-overlay": "^1.0.1",
"react-native-modal-dropdown": "^0.7.0",
"react-native-ratings": "^6.5.0",
"react-native-reanimated": "^1.3.0",
"react-native-screens": "^2.0.0-alpha.4",
"react-native-sectioned-multi-select": "^0.7.6",
"react-native-simple-radio-button": "^2.7.4",
"react-native-snap-carousel": "3.8.0",
"react-native-spinkit": "^1.5.0",
"react-native-vector-icons": "^6.6.0",
"react-native-webview": "^7.4.3",
"react-navigation": "^4.0.10",
"react-navigation-stack": "^1.9.4",
"react-redux": "^7.1.1",
"redux": "^4.0.1",
"redux-devtools-extension": "^2.13.8",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0",
"socket.io-client": "2.0.4"
},
"devDependencies": {
"@babel/core": "7.6.0",
"@babel/runtime": "7.6.0",
"babel-jest": "24.9.0",
"jest": "24.9.0",
"metro-react-native-babel-preset": "0.54.1",
"react-native-dotenv": "^0.2.0",
"react-test-renderer": "16.8.6",
"redux-logger": "^3.0.6"
},
"jest": {
"preset": "react-native"
}
The text was updated successfully, but these errors were encountered: