[FIX] fix(android): load inspector libraries on initialization#1213
[FIX] fix(android): load inspector libraries on initialization#1213raghav-reglobe wants to merge 1 commit into
Conversation
|
@raghav-reglobe is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: d8bd581 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@raghav-reglobe I've reviewed the PR and our DevTools integration and found that these changes are not needed. In principle, I've made necessary fixes for RN 80 compatibility in #1227 and got the DevTools working for all of the testers in the monorepo. Sorry for the delayed response, and thank you for your time & contribution nonetheless. I'll close this PR since it's not needed anymore, but please do not feel discouraged from submitting another contributions in the future! |
|
Thanks |
🔧 Fix Android UnsatisfiedLinkError for DevTools on RN 0.80+
Summary
Problem
Opening the DevTools network-inspector on Android crashes with
UnsatisfiedLinkError: ...InspectorNetworkRequestListener.onHeaders(...)when the app is built with React Native 0.80 or later.
Root cause
RN 0.80 stopped pre-loading
libreactnativejni.so, which contains theInspectorNetworkRequestListenerJNI stubs.Re.Pack initialises its
ScriptManagerModulebefore RN has loaded the library.Fix
Call
SoLoader.loadLibrary("reactnativejni")once duringScriptManagerModuleinitialisation, guarded byBuildConfig.DEBUGso itruns only in debug builds.
Implementation details
ensureInspectorLoaded()inScriptManagerModule.@Volatileflag to ensure the load happens exactly once.Test plan
Preconditions
Steps
jin the terminal to open the JS debugger.Expected
Before this fix
UnsatisfiedLinkError.Changelog
libreactnativejni.so.Checklist