Kudo / react-native-v8

Opt-in V8 runtime for React Native Android
MIT License
914 stars 69 forks source link

React Native V8 not working with React Navigation Drawer (Android) #207

Open Sushant-Sardeshpande opened 1 month ago

Sushant-Sardeshpande commented 1 month ago

When attempting to use react native v8 with the react navigation drawer component, the app hangs on Android.

Environment: OS: Android (SDK 34) React Native: 0.73.9

Haven't used V8 for iOS but with Android been able to always reproduce this issue. Attached a link with the reproduction below.

Reproduction: DrawerV8

Information from npx react-native info: info Fetching system and libraries information...

System:
  OS: macOS 14.5
  CPU: (10) arm64 Apple M2 Pro
  Memory: 121.59 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.15.1
    path: /usr/local/bin/node
  Yarn:
    version: 1.22.21
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.8.2
    path: /usr/local/bin/npm
  Watchman:
    version: 2024.01.22.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.5
      - iOS 17.5
      - macOS 14.5
      - tvOS 17.5
      - visionOS 1.2
      - watchOS 10.5
  Android SDK:
    Android NDK: 24.0.8215888
IDEs:
  Android Studio: 2024.1 AI-241.18034.62.2411.12071903
  Xcode:
    version: 15.4/15F31d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.73.9
    wanted: 0.73.9
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: false
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false
Sushant-Sardeshpande commented 1 month ago

Was trying do some debugging on this and realized that the issue might be stemming out of useSharedValue / useDerivedValue from react-native-reanimated used by the modern/drawer. When I comment these and load a an empty view it started showing but would run into an issue with worklets as it cannot modify those variables. Hence, suspecting it has something to do with these functions not working well with v8.

Would appreciate if someone can look into the issue.