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

RCTAsyncStorage.getAllKey callback does not happen RN 0.31 Android 4.2.2 when debugging #9319

Closed
eranbes opened this issue Aug 9, 2016 · 9 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@eranbes
Copy link

eranbes commented Aug 9, 2016

Android 4.2.2
RN 0.31

RCTAsyncStorage.getAllKeys(function(error, keys) { line in AsyncStorage.js, getAllKeys method never gets to callback when debugging in chrome.
Also, AsyncStorage.js chooses to use sqlite implementation (at least in the chrome debugger).

This issue happen only in debug.

@corbt
Copy link
Contributor

corbt commented Aug 11, 2016

I have replicated this issue on 0.31 and 0.32.0-rc.0.

I can confirm that AsyncStorage.getAllKeys works while running on the device normally, but not when debugging JS remotely in Chrome.

EDIT: Replicated on Android 6.0.1 with a Oneplus One and Nexus 9, so don't think it's related to your version of Android.

@alenia
Copy link

alenia commented Aug 12, 2016

I'm also experiencing this issue. It means I haven't been able to use the chrome debugger since upgrading to 0.31. Anyone have any workarounds for now?

@corbt
Copy link
Contributor

corbt commented Aug 12, 2016

@alenia nope, still broken for me. Haven't had a chance to investigate.

@kageurufu
Copy link
Contributor

I have the same issue, it works as expected in 0.30.

I have downgraded until the cause is determined. I have tested on a Nexus 5 a 6.0.1, and a Nexus 6P at N preview 5

@rigdern
Copy link
Contributor

rigdern commented Aug 16, 2016

I hit this as well in 0.32.0-rc. I suspect that the commit in 0.31.0 (c89c25f) which makes the new bridge the default bridge introduced the issue.

@rigdern
Copy link
Contributor

rigdern commented Aug 17, 2016

@cjhopman, do you have any thoughts on this issue. Do you think my theory about your commit (c89c25f) is accurate?

@kageurufu
Copy link
Contributor

@rigdern the bridge is definitely the issue. I modified my MainApplication to call setUseOldBridge(true) in the ReactNativeHost subclass, and I'm now able to use AsyncStorage while debugging on Android with 0.31.0

I don't have the time to debug this issue fully beyond that, but for those experiencing this issue, I posted a workaround: https://gist.github.com/kageurufu/79e4aaa1c41cbdb147e936d7e473029d

@mkonicek
Copy link
Contributor

mkonicek commented Aug 20, 2016

@rigdern Thanks for looking into it! I'll ping @cjhopman and @mhorowitz on fb@work messenger.

@mkonicek mkonicek changed the title RCTAsyncStorage.getAllKey callback does not happen RN 0.31 Android 4.2.2 RCTAsyncStorage.getAllKey callback does not happen RN 0.31 Android 4.2.2 when debugging Aug 20, 2016
@lexs
Copy link
Contributor

lexs commented Aug 23, 2016

Closing in favor of #9436

@lexs lexs closed this as completed Aug 23, 2016
@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

10 participants