Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No implementation found for com.facebook.react.bridge.Inspector RN 0.60.0 #25560

Closed
renishg opened this issue Jul 9, 2019 · 20 comments
Closed
Labels
Bug Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.

Comments

@renishg
Copy link

renishg commented Jul 9, 2019

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

@renishg renishg added the Bug label Jul 9, 2019
@renishg renishg changed the title No implementation found for com.facebook.react.bridge.Inspector No implementation found for com.facebook.react.bridge.Inspector RN 0.60.0 Jul 9, 2019
@jeltehomminga
Copy link

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

@deguilardi
Copy link

having the same issue here

@michalchudziak michalchudziak added the Platform: Android Android applications. label Jul 9, 2019
@michalchudziak
Copy link
Contributor

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

@el173
Copy link

el173 commented Jul 9, 2019

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

@tianjyan
Copy link

Same issue with RN 0.60.0

@PatrickLambert1101
Copy link

Same issue here

@Villar74
Copy link

#25537 (comment) that fix helped me

@magicalbeacon
Copy link

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

@ivan-navarro-75
Copy link

ivan-navarro-75 commented Jul 10, 2019

coming from the issue #25415

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

I have a clean react native integration with an existing app

@ahmadi-akbar
Copy link

same issue here. );

@huuthinh245
Copy link

I have the same issue

@rogerionj
Copy link

same issue

1 similar comment
@Leisurelyc
Copy link

same issue

@Villar74
Copy link

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

@praveens96
Copy link

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.
\

@PatrickLambert1101
Copy link

Thanks @praveens96 that worked for me

@rogerionj
Copy link

Worked for me just updating to 0.60.3, thanks @praveens96

@JonnyBurger
Copy link
Contributor

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

@ivan-navarro-75
Copy link

ivan-navarro-75 commented Jul 14, 2019

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) 

@renishg
Copy link
Author

renishg commented Jul 16, 2019

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.

@renishg renishg closed this as completed Jul 16, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Oct 10, 2021
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests