react-native: Couldn't get the native call queue: bridge configuration isn't available

I’m unable to run the init app using the master. I followed steps describe here : https://facebook.github.io/react-native/docs/android-building-from-source.html I always get the same error: Couldn't get the native call queue: bridge configuration isn't available I’m on MacOS and try to run the android init app on the simulator (genymotion). Note that I started the packager. I can see log requests.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 20
  • Comments: 48 (7 by maintainers)

Most upvoted comments

I solved my problem using adb reverse tcp:8081 tcp:8081 before react-native run-android

In another window, try running

react-native start

Apparently the package server doesn’t start. I don’t really know why, yet…

I also have the same problem. I am integrating with Existing App. So the app runs, but when I try to load my React code. I get the same error.

I have tried to upgrade react and react-native to: “react”: “^15.0.2”, “react-native”: “^0.26.0-rc”

And i start the react-packages with node node_modules/react-native/local-cli/cli.js start. The packages starts:

image

But the app still crashes. Any suggestions? I have been struggling with this for a while now.

I was facing the same issue and that’s how I ended up here. Here is how I fixed it. The problem is that the app was trying to connect to the local server localhost:8081 which is not available in the phone.

Follow the below steps

  1. Start your development server in your machine. react-native start , this should start you server.
  2. Open your app in you mobile which is showing a red screen, don’t worry about that.
  3. Type in this command in your machine - adb shell input keyevent 82
  4. Go to Dev Settings.
  5. Go to Debug server host for device.
  6. Type in your machine’s IP address and the port of the local dev server. my case - 192.168.1.1:8081 and save.
  7. Type adb shell input keyevent 82 in command line and Reload JS

The red screen is gone now!

Thanks for the link @johnphillips1992

I updated to latest versions via package.json then npm update, and now get this error in emulator: screen shot 2016-05-28 at 3 59 37 pm

  "dependencies": {
    "react": "^15.1.0",
    "react-native": "^0.27.0-rc2"
  },

@appbeijing the message is much clearer now, with the logcat part.

E/ReactNativeJS( 7123): Error:
    undefined is not a function (evaluating 'babelHelpers.typeof(global)'), stack:

That’s a different issue then …

Thanks for fixing the error message.

couldn’t get the native call queue:bridge configuration isn’t available. this probably indicates there was an issue loading the js bundle,e.g. it wasn’t packaged into the app or was malformed. check your logs(‘adb logcat’) for more information

Thank you @willfong. That did it for me together with adb reverse tcp:8081 tcp:8081.

Closing this issue is certainly a bit premature. There is no clear way how to prevent it and to me it looks clearly like a bug that costs many developers time. Please re-open to prevent duplicates from getting opened.

I fixed it by upgrading react to 15.0.2 with react-native 0.26.0-rc / master. See the release notes for 0.26.0-rc https://github.com/facebook/react-native/releases/tag/v0.26.0-rc

thanks , adb reverse tcp:8081 tcp:8081 did for me.

@Streemo In more general terms, say you have class Foo (a native module which you include getPackages())

@Override
    protected List<ReactPackage> getPackages() {
        return Arrays.<ReactPackage>asList(
            new Foo(),
        );
    }

and it has a sendEvent method you use to communicate with your JS part:

private void sendEvent(String eventName, @Nullable WritableMap params) {
        this.context
                .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
                .emit(eventName, params);
    }

And Foo constructor calls sendEvent.

This is a race condition as the constructor is called before the JS part done setting up and the message queue might not be available yet, so you’re trying to sendEvent where there’s no message queue yet and it explodes.

In my case, the constructor would immediately start listening to location events and relaying them via sendEvent to JS, and sometimes it was before message queue was done setting up.

To resolve this, I added something like StartSendingLocationUpdates() to Foo, and I’m calling StartSendingLocationUpdates from JS code, which means message queue must be already up otherwise I couldn’t have called this method.

Hope this was a better explanation. and Please someone correct me if I’m wrong I draw these conclusions from observations, not actually reading the code.

I missed the same problem. I ran the project on the genymotion. Becase I forgot open the WIFI. When I open that, it worked.

Full error message is as follows:

Couldn't get the native call queue: bridge configuration isn't available. This probably indicates there was an issue loading the JS bundle, e.g. it wasn't packaged into the app or was malformed. Check your logs('adb logcat') for more information

run
NativeRunnable.java:-2

handleCallback
Handler.java:95

dispatchMessage
MessageQueueThreadHandler.java:31

loop
Looper.java:136

run
MessageQueueThreadImpl.java:187

run
Thread.java:841

If at this point I hit the Reload JS button I just get the “Could not connect to development server error”, but the server is definitely running.

Thanks! Now it works :]

Here is what I did:

Changed dependencies in package.json to: “dependencies”: { “react”: “^15.0.2”, “react-native”: “^0.26.0-rc” } Executed npm i Started the emulator. Executed react-native run-android

Then the emulator said react native android emulator could not connect to development server

Executed react-native start Hit Reload JS Button in the App.