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

AsyncStorage hangs infinitely on real device in debug mode. #21317

Closed
ThomasStubbe opened this issue Sep 25, 2018 · 3 comments
Closed

AsyncStorage hangs infinitely on real device in debug mode. #21317

ThomasStubbe opened this issue Sep 25, 2018 · 3 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@ThomasStubbe
Copy link

Environment

Environment:
OS: Windows 10
Node: 8.11.1
Yarn: 1.9.4
npm: 6.0.1
Watchman: Not Found
Xcode: N/A
Android Studio: Not Found

Packages: (wanted => installed)
react: ^16.3.0-alpha.1 => 16.3.0
react-native: 0.54.0 => 0.54.0

Description

The code that hangs infinitely:

return AsyncStorage
      .multiRemove(['param1', 'param2'], (error) => console.warn("Problem with clearing state: ", error))
      .then(() => console.log('cleared storage'));
  • Tested on real devices (one plus, lenovo tablet, ZTE, ... every tested phone so far has it).
  • Happens a lot more on windows
  • With 'Chrome Debugger' and 'React Native Debugger'
  • Doesn't happen all the time, but when it does, it happens A LOT (like 30 times in row)
  • Even after cleaning the project, uninstalling the app, rebuilding, cleaning the storage: nothing helps.
  • Seems to happen a lot more if an error occurred (which happens 1/2 on first start up), and you reload afterwards
  • The params are not necessarily available in the store at that time, but it doesn't seem to matter
  • This happens to be the first AsyncStorage call of the app. by removing it, it happens at the next one.

Reproducible Demo

Really hard to reproduce, but I suppose: any project which is developed and debugged on a real device.

By the way:

  • We must use a real device, since our app requires bluetooth
  • This costs us at least 1 hour a day / person, if we cannot fix it within the month, we will look into implementing another version of SQLite or step away from react-native altogether.
@react-native-bot
Copy link
Collaborator

It looks like you are using an older version of React Native. Please update to the latest release, v0.57 and verify if the issue still exists.

The ":rewind:Old Version" label will be removed automatically once you edit your original post with the results of running react-native info on a project using the latest release.

@ThomasStubbe
Copy link
Author

ThomasStubbe commented Sep 25, 2018

Hi, we tried to update to version 56 when it got released, but it was not supported on windows yet. There was a aplha version of 57 back then, but that was even worse. (see #20015, #19669, #19654, ...)

But I noticed now, that on the 57 both are in the changelist:

  • Fix issue with AsyncStorage not behaving properly on Android 7+ (1b09bd7)
  • Fixed builds on Windows machines (3ac86c3 by @rafeca)

So i'll try indeed to update to the 57. Since half of the dependencies will be broken as usual, this will take a few days probably, I'll give feedback once it happened

@hramos
Copy link
Contributor

hramos commented Sep 25, 2018

Let's reopen once you're on the current version.

@hramos hramos closed this as completed Sep 25, 2018
@facebook facebook locked as resolved and limited conversation to collaborators Sep 25, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Sep 25, 2019
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

3 participants