repack icon indicating copy to clipboard operation
repack copied to clipboard

devtools close app with RN 0.80.2 and 0.81.4

Open eeuruetade opened this issue 3 months ago • 3 comments

Describe the bug

When installing repack it works correctly when running the app, but when opening the devtools the app closes, this happens with react-native 0.80.2 and 0.81.4

Image

System Info

System:
  OS: macOS 26.0.1
  CPU: (12) arm64 Apple M3 Pro
  Memory: 130.53 MB / 18.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 23.11.0
    path: /opt/homebrew/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.9.2
    path: /opt/homebrew/bin/npm
  Watchman:
    version: 2025.04.14.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/usuario/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.5
      - iOS 18.5
      - macOS 15.5
      - tvOS 18.5
      - visionOS 2.5
      - watchOS 11.5
  Android SDK:
    API Levels:
      - "28"
      - "30"
      - "33"
      - "34"
      - "35"
      - "36"
    Build Tools:
      - 28.0.3
      - 34.0.0
      - 35.0.0
      - 36.0.0
    System Images:
      - android-28 | Google ARM64-V8a Play ARM 64 v8a
      - android-30 | Google Play ARM 64 v8a
      - android-34 | Google APIs ARM 64 v8a
      - android-35 | Google Play ARM 64 v8a
      - android-36 | Google APIs ARM 64 v8a
      - android-36 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2025.1 AI-251.27812.49.2514.14217341
  Xcode:
    version: 16.4/16F6
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.14
    path: /usr/bin/javac
  Ruby:
    version: 3.1.2
    path: /Users/usuario/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 19.1.1
    wanted: 19.1.1
  react:
    installed: 19.1.0
    wanted: 19.1.0
  react-native:
    installed: 0.80.2
    wanted: 0.80.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: false

Re.Pack Version

5.2.1

Reproduction

n/a

Steps to reproduce

  1. npx @react-native-community/cli@latest init template --version 0.80.2
  2. follow the steps => quick-start
  3. run app
  4. open devtools

eeuruetade avatar Oct 20 '25 21:10 eeuruetade

Checking in logcat I find the error

No implementation found for void com.facebook.react.devsupport.inspector.InspectorNetworkRequestListener.onHeaders(int, java.util.Map) (tried Java_com_facebook_react_devsupport_inspector_InspectorNetworkRequestListener_onHeaders and Java_com_facebook_react_devsupport_inspector_InspectorNetworkRequestListener_onHeaders__ILjava_util_Map_2) - is the library loaded, e.g. System.loadLibrary? 2025-10-20 17:26:16.836 26260-26368 AndroidRuntime com.template E FATAL EXCEPTION: OkHttp Dispatcher Process: com.template, PID: 26260 java.lang.UnsatisfiedLinkError: No implementation found for void com.facebook.react.devsupport.inspector.InspectorNetworkRequestListener.onHeaders(int, java.util.Map) (tried Java_com_facebook_react_devsupport_inspector_InspectorNetworkRequestListener_onHeaders and Java_com_facebook_react_devsupport_inspector_InspectorNetworkRequestListener_onHeaders__ILjava_util_Map_2) - is the library loaded, e.g. System.loadLibrary?

It is also featured in the latest version of react native.

"dependencies": {
    "react": "19.1.1",
    "react-native": "0.82.1",
    "@react-native/new-app-screen": "0.82.1",
    "react-native-safe-area-context": "^5.5.2"
  },
  "devDependencies": {
    "@babel/core": "^7.25.2",
    "@babel/preset-env": "^7.25.3",
    "@babel/runtime": "^7.25.0",
    "@callstack/repack": "^5.2.1",
    "@react-native-community/cli": "20.0.0",
    "@react-native-community/cli-platform-android": "20.0.0",
    "@react-native-community/cli-platform-ios": "20.0.0",
    "@react-native/babel-preset": "0.82.1",
    "@react-native/eslint-config": "0.82.1",
    "@react-native/metro-config": "0.82.1",
    "@react-native/typescript-config": "0.82.1",
    "@rspack/core": "^1.3.4",
    "@swc/helpers": "^0.5.17",
    "@types/jest": "^29.5.13",
    "@types/react": "^19.1.1",
    "@types/react-test-renderer": "^19.1.0",
    "eslint": "^8.19.0",
    "jest": "^29.6.3",
    "prettier": "2.8.8",
    "react-test-renderer": "19.1.1",
    "typescript": "^5.8.3"
  }

eeuruetade avatar Oct 20 '25 22:10 eeuruetade

Any thoughts how can it be solved? It's kinda frustrating :/

mefjuu avatar Nov 27 '25 20:11 mefjuu

Any thoughts how can it be solved? It's kinda frustrating :/

We were able to get it working with the following settings:

rspack.config.mjs: devtool: false

package.json: "react": "19.1.0", "react-native": "0.81.0", "@callstack/repack": "^5.2.2"

You can try first just with the change in rspack.cofig.mjs

I hope it works for you, good luck.

eeuruetade avatar Dec 02 '25 17:12 eeuruetade