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

Multiple RNCAsyncStorage objects are created, causing the data file _manifest content to be out of sync #1172

Open
1 of 5 tasks
xiaofeiyun opened this issue Jan 13, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@xiaofeiyun
Copy link

What happened?

Hello, our project encountered the following problems:Multiple RCTSurfaceHostingProxyRootView objects are created in the project, corresponding to multiple RCTBridges. Multiple RCTBridges will result in the creation of multiple RNCAsyncStorages, and each RNCAsyncStorage corresponds to a _manifest, so there will be multiple _manifest objects. Multiple _manifest objects operating data will cause data storage confusion.

Version

1.24.0

What platforms are you seeing this issue on?

  • Android
  • iOS
  • macOS
  • Windows
  • web

System Information

info Fetching system and libraries information...
System:
  OS: macOS 15.0.1
  CPU: (11) arm64 Apple M3 Pro
  Memory: 62.64 MB / 36.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.14.0
    path: ~/.nvm/versions/node/v20.14.0/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v20.14.0/bin/yarn
  npm:
    version: 10.7.0
    path: ~/.nvm/versions/node/v20.14.0/bin/npm
  Watchman:
    version: 2024.08.05.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/renzhenfei/.rvm/gems/ruby-3.2.0/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.1
      - iOS 18.1
      - macOS 15.1
      - tvOS 18.1
      - visionOS 2.1
      - watchOS 11.1
  Android SDK:
    API Levels:
      - "28"
      - "33"
      - "34"
    Build Tools:
      - 28.0.3
      - 30.0.3
      - 33.0.0
      - 33.0.1
      - 34.0.0
    System Images:
      - android-33 | Intel x86_64 Atom
      - android-34 | Google APIs ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2023.3 AI-233.14808.21.2331.11709847
  Xcode:
    version: 16.1/16B40
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 1.8.0_412
    path: /Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/bin/javac
  Ruby:
    version: 3.2.0
    path: /Users/renzhenfei/.rvm/rubies/ruby-3.2.0/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.6
    wanted: 0.73.6
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

info React Native v0.76.6 is now available (your project is running on v0.73.6).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.76.6
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.76.6
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".

Steps to Reproduce

Use different RCTBridges to create multiple RCTSurfaceHostingProxyRootViews to load different React Native components. Use async-storage to store different key-value pairs in each React Native component. Finally, after exiting all React Native components, restart the app to check the last stored key-value pairs to see if there is any data loss.

@xiaofeiyun xiaofeiyun added the bug Something isn't working label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant