Regression - unable to start debugger
Describe the bug
I've just tried creating a new project with RePack v5.2.0 and the latest template, but the same applies to my existing project.
Once the app is up and running, when I try to open the debugger the app crashes and from logcat I see the following 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-08-29 16:46:27.271 19560-19618 AndroidRuntime com.foo E FATAL EXCEPTION: OkHttp Dispatcher
Process: com.foo, PID: 19560
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?
at com.facebook.react.devsupport.inspector.InspectorNetworkRequestListener.onHeaders(Native Method)
at com.facebook.react.devsupport.inspector.InspectorNetworkHelper$loadNetworkResource$1.onResponse(InspectorNetworkHelper.kt:63)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Here is a video which demonstrates it: https://github.com/user-attachments/assets/8798adb7-cb28-44e9-9b7d-b6415dd72fed
System Info
System:
OS: macOS 15.6.1
CPU: (12) arm64 Apple M3 Pro
Memory: 116.86 MB / 18.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.16.0
path: ~/.nvm/versions/node/v22.16.0/bin/node
Yarn:
version: 1.22.22
path: ~/.nvm/versions/node/v22.16.0/bin/yarn
npm:
version: 10.9.2
path: ~/.nvm/versions/node/v22.16.0/bin/npm
Watchman:
version: 2025.08.11.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /Users/ilteoood/.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:
- "32"
- "34"
- "34"
- "34"
- "34"
- "34"
- "35"
- "36"
Build Tools:
- 30.0.3
- 34.0.0
- 35.0.0
- 36.0.0
- 36.0.0
- 36.0.0
- 36.1.0
System Images:
- android-31 | Google APIs ARM 64 v8a
- android-34 | Google Play ARM 64 v8a
- android-35 | Google Play ARM 64 v8a
- android-36 | Google APIs ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2025.1 AI-251.26094.121.2512.13991807
Xcode:
version: 16.4/16F6
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.15
path: /Users/ilteoood/.sdkman/candidates/java/current/bin/javac
Ruby:
version: 3.4.3
path: /Users/ilteoood/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli":
installed: 20.0.0
wanted: 20.0.0
react:
installed: 19.1.0
wanted: 19.1.0
react-native:
installed: 0.81.1
wanted: 0.81.1
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.0
Reproduction
Create a new empty project
Steps to reproduce
- Create a new empty project
- Install the deps
- Open the debugger
I've just checked this and confirmed this is an issue on Android only 👍
@ilteoood seems like it might be related to this PR from RN Core: https://github.com/facebook/react-native/pull/53036
could you try if patching with the changes from the PR above fixes the issue?
Yes, I tried it without any luck. If this helps you, creating a new project with metro (and the same RN version) works without issues.
I've been able to find where the issue gets triggered.
By removing the sendMessage, the InspectorNetworkHelper doesn't get involved so the debugger can be opened without issues.
As usual, I would like to contribute to the fix, but in this scenario I'm a bit stuck: this piece of code seems to be related to module federation 🤔
I've been able to find where the issue gets triggered. By removing the
sendMessage, theInspectorNetworkHelperdoesn't get involved so the debugger can be opened without issues.As usual, I would like to contribute to the fix, but in this scenario I'm a bit stuck: this piece of code seems to be related to module federation 🤔
yes, I managed to track it down to that place as well, it was slightly hacky in the first place 👍 I'll try to ask around for a proper workaround this time around 😅
sorry for the delay @ilteoood, was slightly busy with the conference last week, I'll look into this more deeply this week
No worries, for the time being I've patched that piece of code and removed it
@ilteoood If possible, can you share exactly what you did to be able to use the debugger? I have the same issue here
I created a patch to remove the code shared above
Hi @ilteoood how did you create the patch, if you don't mind sharing?
Hi @ilteoood how did you create the patch, if you don't mind sharing?
Hi! It depends a lot on the package manager you are using. Pnpm and yarn, for example, support it by default
Hi @ilteoood I created a new project using bun
workaround:
android/app/src/main/java/..../MainApplication.kt
import com.facebook.react.soloader.OpenSourceMergedSoMapping
import com.facebook.soloader.SoLoader
override fun onCreate() {
super.onCreate()
SoLoader.init(this, OpenSourceMergedSoMapping)
/*
* Regarding next lint.
* There's an open issue regarding this https://github.com/callstack/repack/issues/1299.
* This line is generally unnecessary and will need
* to be removed when we migrate to RN 0.82+,
* but as a temporary solution, it will prevent
* a crash when opening the debugger.
*/
SoLoader.loadLibrary("reactnativejni")
...
@Feofilov can you explain this change, what does it do? Like why does that fix work around this issue?
@Feofilov can you explain this change, what does it do? Like why does that fix work around this issue?
If you open the android device log at the time of this crash, you will most likely see something like this:
java.lang.UnsatisfiedLinkError:
No implementation found for void
com.facebook.react.devsupport.inspector.InspectorNetworkRequestListener.onHeaders(int, java.util.Map)
This is a JNI crash: the Java class expects a native implementation of onHeaders(), but the corresponding function isn't found/loaded in the .so file.
And here is the actual fix for this - https://github.com/facebook/react-native/pull/53036/changes As an alternative, you can use the patch for react-native based on this pull request.