-
Notifications
You must be signed in to change notification settings - Fork 476
[Android] multiGet() hangs, app not responsive #634
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
Comments
Hey @ecexplorer Thanks for providing all these details. Doing small repro, I confirm that the I'm marking this as bug and I'm going to work on this one. Thanks! |
This issue has been marked as stale due to inactivity. Please respond or otherwise resolve the issue within 7 days or it will be closed. |
This should be fixed in the latest release (v1.15.11) |
Hello guys, as for v.1.17.6 of the package issue persists. |
Current behavior
In our app, I call
AsyncStorage.multiGet()
on a key array with just two keys. Admittedly one of the keys is tied to a JSON string that when formatted, is 17000+ lines long. This is still under the overall 6MB limit.When the call is made, it just hangs. No error is thrown, and if I use a callback, it is never called. The same data in iOS has no problem being fetched.
I can also tell that the data is there. That 17,000+ number comes from pulling the data directly on Android Studio using the database inspector. The data is being stored correctly.
If I request the same data using
getItem()
, then the request works without issue and I get the expected value back.(See comments for a workaround)
Expected behavior
Calls to
multiGet()
don't hang, return the data expected.Repro steps
multiGet()
request.Similar to source, if I make a Promise.all(keys.map(async (key) => [key, await AsyncStorage.getItem(key)]), I see the same hang. Android doesn't seem to like the multiple accesses to AsyncStorage/DB at once.
Environment
System:
OS: macOS 11.4
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 131.27 MB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 12.16.2 - ~/.nvm/versions/node/v12.16.2/bin/node
Yarn: Not Found
npm: 6.14.4 - ~/.nvm/versions/node/v12.16.2/bin/npm
Watchman: 2021.06.07.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK: Not Found
IDEs:
Android Studio: 4.2 AI-202.7660.26.42.7486908
Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
Languages:
Java: Not Found
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.63.4 => 0.63.4
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
The text was updated successfully, but these errors were encountered: