react-native-async-storage / async-storage

An asynchronous, persistent, key-value storage system for React Native.
https://react-native-async-storage.github.io/async-storage/
MIT License
4.62k stars 458 forks source link

multiGet crash with Hermes on Android #560

Closed pavlos256 closed 3 years ago

pavlos256 commented 3 years ago

Current behavior

When Hermes is enabled, multiGet behaves like it's hanged for about 10 seconds and then the app crashes. It doesn't happen all the time but the more the keys, the easier it is to reproduce. Possibly related to #445.

Expected behavior

multiGet should be fast and not crash.

Repro steps

  1. Enable Hermes as per https://reactnative.dev/docs/hermes
  2. Wait on multiGet with enough keys. You may have to repeat this a few times before the problem manifests itself.

Environment

tido64 commented 3 years ago

Can you provide a minimal project with the crash? Does it crash if you don't turn on Hermes? If it doesn't crash on JSC, then I would suggest you open an issue at https://github.com/facebook/hermes instead. Judging from the stack trace alone, it doesn't look like AsyncStorage is the cause here.

pavlos256 commented 3 years ago

You're right, it doesn't crash on JSC and I confirmed it's a Hermes issue by removing code until I was left with a minimal test case.

Turns out it's a known issue related to this one (https://github.com/facebook/hermes/issues/95) and it seems to be fixed on 0.64 (I can't make it crash).