React-native: No implementation found for com.facebook.react.bridge.Inspector RN 0.60.0

Created on 9 Jul 2019  路  20Comments  路  Source: facebook/react-native

android logcat shows below error at every second while running app using react-native run-android

java.lang.UnsatisfiedLinkError: No implementation found for com.facebook.react.bridge.Inspector com.facebook.react.bridge.Inspector.instance() (tried Java_com_facebook_react_bridge_Inspector_instance and Java_com_facebook_react_bridge_Inspector_instance__)

React Native version:
System:
OS: macOS 10.14.5
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 19.14 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 11.10.1 - /usr/local/bin/node
npm: 6.7.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 23, 24, 25, 26, 27, 28
Build Tools: 23.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.3, 27.0.3, 28.0.2, 28.0.3
System Images: android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.0 => 0.60.0
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7

Steps To Reproduce

  1. create new project
  2. run app using react-native run-android

2019-07-09 21:00:12.921 10898-11041/com.my.app E/com.my.app: No implementation found for com.facebook.react.bridge.Inspector com.facebook.react.bridge.Inspector.instance() (tried Java_com_facebook_react_bridge_Inspector_instance and Java_com_facebook_react_bridge_Inspector_instance__) 2019-07-09 21:00:12.922 10898-11041/com.my.app E/unknown:ReactNative: Inspector doesn't work in open source yet java.lang.UnsatisfiedLinkError: No implementation found for com.facebook.react.bridge.Inspector com.facebook.react.bridge.Inspector.instance() (tried Java_com_facebook_react_bridge_Inspector_instance and Java_com_facebook_react_bridge_Inspector_instance__) at com.facebook.react.bridge.Inspector.instance(Native Method) at com.facebook.react.bridge.Inspector.getPages(Inspector.java:27) at com.facebook.react.devsupport.InspectorPackagerConnection.getPages(InspectorPackagerConnection.java:152) at com.facebook.react.devsupport.InspectorPackagerConnection.handleProxyMessage(InspectorPackagerConnection.java:72) at com.facebook.react.devsupport.InspectorPackagerConnection$Connection.onMessage(InspectorPackagerConnection.java:223) at okhttp3.internal.ws.RealWebSocket.onReadMessage(RealWebSocket.java:323) at okhttp3.internal.ws.WebSocketReader.readMessageFrame(WebSocketReader.java:219) at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:105) at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:274) at okhttp3.internal.ws.RealWebSocket$2.onResponse(RealWebSocket.java:214) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:206) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:764)

Describe what you expected to happen:
there should not be any error regarding com.facebook.react.bridge.Inspector

Bug Android

Most helpful comment

Don't write same issue, just react to first message, omg

All 20 comments

I have the same issue. I just run a clean project, no third party liberaries. But I this error keeps looping

having the same issue here

I've got the same issue in brownfield app with RN 0.60.

I'm also having this issue on RN 0.60.0 without any third party module

Same issue with RN 0.60.0

Same issue here

Having the same issue with the same repro steps as OP

System:
OS: Windows 10
CPU: (12) x64 Intel(R) Core(TM) i7-8700T CPU @ 2.40GHz
Memory: 954.88 MB / 7.84 GB
Binaries:
Node: 11.13.0 - C:\Program Files\nodejs\node.EXE
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
SDKs:
Android SDK:
Android NDK: 19.2.5345600
IDEs:
Android Studio: Version 3.4.0.0 AI-183.6156.11.34.5522156

react-native-cli: 2.0.1
react-native: 0.60.0

coming from the issue https://github.com/facebook/react-native/issues/25415

now I have the issue with the bridge.Inspector.instance

I have a clean react native integration with an existing app

same issue here. );

I have the same issue

same issue

same issue

Don't write same issue, just react to first message, omg

issue resolved for me. please try these:

update your react-native version to: 0.60.3
in your android/build.gradle make sure you have these

 maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }

in app/build.gradle

packagingOptions {
        pickFirst '**/armeabi-v7a/libc++_shared.so'
        pickFirst '**/x86/libc++_shared.so'
        pickFirst '**/arm64-v8a/libc++_shared.so'
        pickFirst '**/x86_64/libc++_shared.so'
        pickFirst '**/x86/libjsc.so'
        pickFirst '**/armeabi-v7a/libjsc.so'
    }

def enableHermes = project.ext.react.get("enableHermes", false);

def jscFlavor = 'org.webkit:android-jsc:+'

project.ext.react = [
    entryFile: "index.js",
    enableHermes: false,  // clean and rebuild if changing
]

in MainApplication.java
import com.facebook.react.bridge.JavaScriptExecutorFactory;
if you are still getting an error, try creating a fresh react-native project and compare.
i have created and found these and updated.

if you are not copying the hermes parts mentioned it would still crash.
\

Thanks @praveens96 that worked for me

Worked for me just updating to 0.60.3, thanks @praveens96

Works for me as well. For clarity, the packagingOptions should be inside android block like shown here: https://react-native-community.github.io/upgrade-helper/?from=0.60.0&to=0.60.3

I've followed the changes but it still fails for me.

I am following this guide https://facebook.github.io/react-native/docs/integration-with-existing-apps
And these are my gradle files.

android

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        google()
        jcenter()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.2'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven {
            // All of React Native (JS, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        google()
        jcenter()

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

app

apply plugin: 'com.android.application'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.0"
    defaultConfig {
        applicationId "com.example.rnintegration"
        minSdkVersion 16
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

    packagingOptions {
        pickFirst '**/armeabi-v7a/libc++_shared.so'
        pickFirst '**/x86/libc++_shared.so'
        pickFirst '**/arm64-v8a/libc++_shared.so'
        pickFirst '**/x86_64/libc++_shared.so'
        pickFirst '**/x86/libjsc.so'
        pickFirst '**/armeabi-v7a/libjsc.so'
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation "com.facebook.react:react-native:0.60.3"
}

This is the error I got, basically it fails trying to load the library jscexecutor

2019-07-14 08:57:13.437 11375-11375/com.example.rnintegration E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.rnintegration, PID: 11375
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.rnintegration/com.example.rnintegration.MainActivity}: java.lang.RuntimeException: SoLoader.init() not yet called
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3260)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3396)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2009)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7319)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:934)
     Caused by: java.lang.RuntimeException: SoLoader.init() not yet called
        at com.facebook.soloader.SoLoader.assertInitialized(SoLoader.java:781)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:505)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:484)
        at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:304)
        at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:279)
        at com.example.rnintegration.MainActivity.onCreate(MainActivity.java:46)
        at android.app.Activity.performCreate(Activity.java:7783)
        at android.app.Activity.performCreate(Activity.java:7772)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3235)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3396)聽
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)聽
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)聽
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)聽
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2009)聽
        at android.os.Handler.dispatchMessage(Handler.java:107)聽
        at android.os.Looper.loop(Looper.java:214)聽
        at android.app.ActivityThread.main(ActivityThread.java:7319)聽
        at java.lang.reflect.Method.invoke(Native Method)聽
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)聽
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:934)聽

Resolution : Upgrade to RN 0.60.3
Upgrade Guide : https://react-native-community.github.io/upgrade-helper/?from=0.60.0&to=0.60.3

Closing issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

phongyewtong picture phongyewtong  路  3Comments

TrakBit picture TrakBit  路  3Comments

josev55 picture josev55  路  3Comments

anchetaWern picture anchetaWern  路  3Comments

aniss picture aniss  路  3Comments