-
Notifications
You must be signed in to change notification settings - Fork 24.2k
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
AsyncStorage.getItem blocks when debugging remotely #12830
![:octocat: :octocat:](https://github.githubassets.com/images/icons/emoji/octocat.png)
Comments
We're cutting down on the number of outstanding issues, in order to allow us to focus. I'm closing this issue because it has been open for over 60 days with no activity. If you think it should still be opened let us know why. PRs are always welcome. |
any update? see the same problem |
@youhan26 This issue has stopped for me. Not sure what the reason is, but have you tried upgrading react native to the latest version? |
@bartolkaruza I try to use real phone to test, It's ok. maybe just because of simulator |
Still broken on react native 0.46.4 on a real device. |
@hramos please reopen. AsyncStorage is a key component of react native and it's currently unusable when debugging. |
I'm experiencing the same issue. RN 48, Genymotion running android 7 |
i am having the same issue. Anyone had any solution? |
This is happening for me fairly consistently with RN 0.50.3. I can refresh my app a couple times with the multiGet promise completing, but after that the promise no longer completes. Issuing a |
Same issue. I think this problem should be payed attention. |
I have the same problem `console.log('beforereadtoken') console.log('afterreadtoken')` The second console.log does not get printed, also no errors are printed |
I have same problem on Android. Statements after 'await' are never executed. My 'workaround' for now is to kill and relaunch the app, then it starts working for some time. (react-native 0.51.0) |
Same problem here using node v8.8.1, npm v5.6, RN v0.50.4 and debugging using chrome 62. I'm using a real device by the way |
Hi this was happening to me until I ran "react-native run-android" again. I seem to need to do this everytime I import AsyncStorage to a new file. |
Same issue on Android with real device, after reload the device. When it happened, I must kill the app and relaunch. Can we re-open this issue? @bartolkaruza RN v0.51.0 |
@hramos There seems to be regular activity on this issue on very recent versions, even though I have not experienced it myself recently. Could you re-open it? |
+1 Same issue on Android, have to restarting app |
This issue is also a regular problem that occurs on |
Having the same issue out of the blue from one day to another without changing anything on my react-native project! |
+1 Same issue on Android 6, API Level 23. I resolve this issue by rerun 'react-native run-android'. |
+1 |
+1. Any update on this ? This is a issue worth looking into. cannot go ahead with this for production apps. |
I've been able to confirm that this is as a result of some kind of blocking in Android when debugging with an emulator. |
A fix would definitely be nice. |
It's still happening, even in recent react native version. It's very annoying, why this issue not prioritize to solve? Btw it's happening even the debugging is not active. And it's happen in emulator and real devices. 👎 |
If it would help you: I discovered this issue only now after starting to use VSC debugger or RNDebugger. I've always debugged in Chrome before and never ever experienced any AsyncStorage failures. So I tried now a few times in Chrome (opening&closing remote debugging session from app) and in Chrome it's fine. What else have I observed:
|
+1 |
1 similar comment
+1 |
as far as i know we cant use local storage in RN, so if we can't debug our apps when using Asyncstorage, what on earth we can do to store some data locally on the device? |
+1 |
3 similar comments
+1 |
+1 |
+1 |
+1 :( |
+1 |
5 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
This issue is opened for more than year but still nothing. That's really sad. Someone really need to look at it. |
+1 |
3 similar comments
+1 |
+1 |
+1 |
Locking due to +1 spam. Issue's still open in case any one wants to volunteer a fix. |
This issue has been moved to react-native-async-storage/async-storage#11. |
![:octocat: :octocat:](https://github.githubassets.com/images/icons/emoji/octocat.png)
Description
In some situations when calling AsyncStorage.getItem, either with a callback, calling
then
or usingasync await
, the proceeding callback is not called and the promise does not resolve. This only happens when the remote debugger is on.result or error are not called below:
AFTER is not printed (and no error is thrown):
The same code above completes the first time (and several consecutive times) it is run in the same debug session but blocks at a later stage. The point in time where it starts blocking is consistent in my app, so there is a piece of context that I haven't found yet which is causing it. I will continue searching for this context. Are maybe others running into similar behavior?
No matter the availability of data, getItem should always resolve (or reject), right?
Reproduction
I will keep trying to isolate the reproduction but so far I have not been able to cleanly reproduce, but in my full app, it is consistently occurring.
Solution
Additional Information
This issue is occurring on both iOS devices and simulators. I haven't seen it on Android yet.
OS X 10.11.6
Xcode 8.2.1
React Native Debugger 0.5.6
React Native 0.42.0
The text was updated successfully, but these errors were encountered: