Skip to content

Using ReactDatabaseSupplier with next storage #1188

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

Open
1 of 5 tasks
dincozdemir opened this issue Feb 27, 2025 · 0 comments
Open
1 of 5 tasks

Using ReactDatabaseSupplier with next storage #1188

dincozdemir opened this issue Feb 27, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@dincozdemir
Copy link

dincozdemir commented Feb 27, 2025

What happened?

We have a brownfield application where we access async storage from native android code:

val readableDatabase = ReactDatabaseSupplier.getInstance(this).readableDatabase
val someValue = AsyncLocalStorageUtil.getItemImpl(readableDatabase, "some-key")

We recently enabled next storage, and after the migration we noticed we couldn't access data (We get a NullPointerException on the second line). It seems to be ReactDatabaseSupplier component is still accessing the old storage solution

Version

1.19.3

What platforms are you seeing this issue on?

  • Android
  • iOS
  • macOS
  • Windows
  • web

System Information

System:
  OS: macOS 14.5
  CPU: (10) arm64 Apple M1 Pro
  Memory: 145.61 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.17.0
    path: ~/.nvm/versions/node/v20.17.0/bin/node
  Yarn:
    version: 3.1.0
    path: ~/.nvm/versions/node/v20.17.0/bin/yarn
  npm:
    version: 9.8.1
    path: ~/Projects/goeuro/app/node_modules/.bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/dinc.oezdemir/.gem/ruby/3.4.1/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK:
    API Levels:
      - "27"
      - "29"
      - "30"
      - "31"
      - "32"
      - "33"
      - "34"
    Build Tools:
      - 30.0.3
      - 31.0.0
      - 32.0.0
      - 33.0.0
      - 34.0.0
    System Images:
      - android-27 | Google APIs ARM 64 v8a
      - android-28 | Google APIs ARM 64 v8a
      - android-29 | Google APIs ARM 64 v8a
      - android-30 | Google APIs ARM 64 v8a
      - android-30 | Google Play ARM 64 v8a
      - android-33 | Google Play ARM 64 v8a
      - android-34 | Google TV ARM 64 v8a
    Android NDK: 22.1.7171670
IDEs:
  Android Studio: 2024.2 AI-242.23726.103.2422.13016713
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 21.0.5
    path: /usr/bin/javac
  Ruby:
    version: 3.4.1
    path: /Users/dinc.oezdemir/.rubies/ruby-3.4.1/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.6
    wanted: 0.72.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

Steps to Reproduce

  • Enable next storage and run the app
  • Save data to AsyncStorage
  • Observe thrown exception
@dincozdemir dincozdemir added the bug Something isn't working label Feb 27, 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