reactotron icon indicating copy to clipboard operation
reactotron copied to clipboard

Device does not connect

Open slhck opened this issue 4 years ago • 8 comments

I am using Reactotron (reactotron-react-native v4.0.3) with RN 0.61.5 on Android, developing under Ubuntu.

I am using the following snippet to configure Reactotron:

if (__DEV__) {
  import('./src/config/ReactotronConfig').then(() => {
    console.log('Reactotron Configured');
    registerAppComponent(appName, App);
  });
}

The config is as follows:

import AsyncStorage from '@react-native-community/async-storage';
import Reactotron from 'reactotron-react-native';

Reactotron
    .setAsyncStorageHandler(AsyncStorage) // AsyncStorage would either come from `react-native` or `@react-native-community/async-storage` depending on where you get it from
    .configure({
        name: "React Native Demo"
    })
    .useReactNative({
        asyncStorage: false, // there are more options to the async storage.
        networking: { // optionally, you can turn it off with false.
            ignoreUrls: /symbolicate/
        },
        editor: false, // there are more options to editor
        errors: { veto: (stackFrame) => false }, // or turn it off with false
        overlay: false, // just turning off overlay
    })
    .connect();

The console log is printed in the debugger, to which the virtual device is connecting.

I've added the reverse port mapping:

➜ adb reverse --list
host-8 tcp:8081 tcp:8081
host-8 tcp:9090 tcp:9090

However, Reactotron keeps showing "Waiting for connection", even when reinstalling/reloading the app on the virtual device.

The device can obviously connect to the debugger at port 8081, but not Reactotron. What can I do?

slhck avatar Mar 10 '20 16:03 slhck

I have the same problem.

rlocatelli9 avatar Mar 19 '20 14:03 rlocatelli9

same problem

justb avatar Mar 25 '20 06:03 justb

I don't know it might help for anyone or not, I discovered that after basic module settings, there is no need to debugger mode in my case, I just connected tcp:9090 tcp:9090 and then simple console.log working fine for my case

raza2022 avatar Apr 22 '20 14:04 raza2022

adb reverse tcp:9090 tcp:9090

louzada01 avatar Apr 23 '20 17:04 louzada01

@louzada01 You can see from my original post that I already did that.

slhck avatar Apr 23 '20 18:04 slhck

@louzada01 You can see from my original post that I already did that.

I'm sorry.

Try:

In reactotron-config-file.js

import Reactotron from 'reactotron-react-native';
import AsyncStorage from '@react-native-community/async-storage';

if (__DEV__) {
  const tron = Reactotron.setAsyncStorageHandler(AsyncStorage) // AsyncStorage would either come from `react-native` or `@react-native-community/async-storage` depending on where you get it from
    .configure({
      name: 'React Native Demo',
    })
    .useReactNative({
    // Yours configs 
    })
    .connect();

  tron.clear();

  console.tron = tron;
}

In your index.js :

import './config/reactotron-config-file.js';
/* Your code */

Run your app after steps.

__

My configs for exemple using redux and redux saga with react-native:

import Reactotron from 'reactotron-react-native';
import {reactotronRedux} from 'reactotron-redux';
import reactotronSaga from 'reactotron-redux-saga';

if (__DEV__) {
  const tron = Reactotron.configure()
    .useReactNative()
    .use(reactotronRedux())
    .use(reactotronSaga())
    .connect();

  tron.clear();

  console.tron = tron;
}

louzada01 avatar Apr 28 '20 12:04 louzada01

check IP address in reactotron config file with your PC IP

yevhenlv avatar Apr 06 '23 17:04 yevhenlv

This project appears to be dead and I'm no longer using it. So I'm leaving this open, as I don't have any solution.

slhck avatar Apr 06 '23 18:04 slhck