reactotron icon indicating copy to clipboard operation
reactotron copied to clipboard

Not Connecting

Open seunlanlege opened this issue 9 years ago • 18 comments

i'm on linux(ubuntu 16.04) trying to debug on a physical device and

screenshot from 2017-05-19 14-38-32

this is all i get. It just doesn't connect. Is there something i'm doing wrong?

index.android.js

import { AppRegistry, StatusBar } from 'react-native';
import Reactotron from 'reactotron-react-native';

import './src/lib/Reactotron';

import colors from './src/components/styles/colors';
import setup from './src/setup';


Reactotron.log('hello rendering world');

if (!__DEV__) {
  console.log = () => {};
}

StatusBar.setBackgroundColor(colors.primaryDark);

AppRegistry.registerComponent('sfa', setup);

src/lib/Reactotron

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

Reactotron
  .configure()
  .use(reactotronRedux())
  .useReactNative()
  .connect();

configureStore.js

import { createStore, applyMiddleware, compose } from 'redux';
import thunk from 'redux-thunk';
import Reactotron from 'reactotron-react-native';
import devTools from 'remote-redux-devtools';
import { persistStore, autoRehydrate } from 'redux-persist';
import { AsyncStorage } from 'react-native';

import reducers from './reducers';

const configureStore = (onComplete = false) => {
  const middlewares = [thunk];
  const enhancers = [
    applyMiddleware(...middlewares),
    autoRehydrate(),
  ];

  if (__DEV__) {
    enhancers.push(devTools());
  }
  const store = Reactotron.createStore(reducers, undefined, compose(...enhancers));

  if (onComplete) {
    persistStore(store, { storage: AsyncStorage }, () => setTimeout(onComplete, 500));
  }
  persistStore(store, { storage: AsyncStorage, blacklist: ['AppState'] });

  return store;
};

export default configureStore;

seunlanlege avatar May 19 '17 13:05 seunlanlege

Your device needs to talk to your computer.

You'll want to Reactotron.configure({ host: '192.168.0.2' }) in your ReactotronConfig.js (or wherever your computer's local network address might be.

skellock avatar May 19 '17 15:05 skellock

I have found that you can avoid doing the host change (at least in genymotion) if you do adb reverse tcp:9090 tcp:9090

rmevans9 avatar May 20 '17 01:05 rmevans9

For me, I can connect to reactotron-cli but no connection to the Reactotron App

screen shot 2017-05-27 at 10 55 38 pm

ApolloTang avatar May 28 '17 02:05 ApolloTang

My problem was the port 9090 was already open and Reactotron wasn't complaining.

oallouch avatar May 29 '17 10:05 oallouch

@oallouch Ya, that'd be a nice feature to have. For the app to know it can't listen on that port instead of dying horribly.

@ApolloTang You can't run them both at the same time because they use the same port. Is that what's happening here?

skellock avatar May 29 '17 12:05 skellock

Still, reactotron is my discovery of the month ! 👍

oallouch avatar May 30 '17 15:05 oallouch

Feel free to reopen if you're still stuck.

skellock avatar Jun 01 '17 06:06 skellock

same issue, already add Reactotron.configure({ host: '192.168.0.2' }) no lucky, any suggestion?

xralphack avatar Aug 02 '17 09:08 xralphack

Try adding that while initialization itself. That solved the issue for me.

eg. - Reactotron .configure({ host: '172.16.18.13', // server ip }) .useReactNative() .connect();

shivam-aditya avatar Sep 26 '17 09:09 shivam-aditya

Having trouble setting up connection between Reactotron and Genymotion VM...

For Genymotion, is this reverse proxy valid and only thing needed to work?: adb reverse tcp:9090 tcp:9090 or i saw another github thread mention this: adb reverse tcp:3334 tcp:3334 Which port should it be? (using the Windows 64 bit Reactotron)

My config is below: ###ReactotronConfig.js import Reactotron from 'reactotron-react-native' Reactotron .configure() // controls connection & communication settings .useReactNative() // add all built-in react native plugins .connect() // let's connect! //don't believe i need to add the Genymotion IP in connect() here as some threads says that is not needed if on Android 5.0+ and using the adb reverse proxy

###App.js import './ReactotronConfig'; //that it, hmmm do i need to do anything else to connect it?

Note: added reactotron dev dependency to package.json with:

yarn add -D reactotron-react-native

EDIT: i got it working. The 64 bit app looked kinda funky (was all white and not the grey/black UI as screenshots showed). So I tried the 32 bit app and it worked with the 'adb reverse tcp:9090 tcp:9090' reverse proxy.

armyofda12mnkeys avatar Nov 18 '17 06:11 armyofda12mnkeys

@ApolloTang I have the same issue.

I am running Ubuntu 18.04 LTS, 64-bit. Initially, I have downloaded the reactotron beat app, but does not work, then try CLI version using npm download reactotron-cli. now I have run the app it showing me 1 device is connected and able to see the log printed.

cli_version

I am facing the issue when I run the reactotron-beat-app.

In addition, I also tried download stable version in mac/ubuntu machine and run the app could able to see the reactotron is connected and successfully worked.

It seems like I have an issue with reactotron-beat-app

Bhavdip avatar Jun 18 '18 06:06 Bhavdip

The CLI is no longer a thing anymore. We're using electron now to render.

That screenshot brings back some nice memories though.

skellock avatar Jun 18 '18 15:06 skellock

@skellock I have tried the alpha 2.0.0 version of reactotron desk-app on ubuntu 18.04 LTE it not showing connected devices. I did adb reverse but no luck. Anything else should try to connect device and show online.

Bhavdip avatar Jun 19 '18 04:06 Bhavdip

In your .configure() call, you can pass the ip address too: .configure({ host: '192.168.0.x' })

skellock avatar Jun 19 '18 14:06 skellock

I have to manually pass the IP of my machine as the host to get Reactotron V2 to detect Android Emulators as in @skellock suggestion.

The adb reverse tcp:9090 tcp:9090 did nothing for me.

ryanpatk avatar Jul 27 '18 12:07 ryanpatk

Thanks @rynatk and @skellock .. Adding ip solved the issue, It took me 5 hours just to make it work :/ ..

By the way if this is an issue why the devs are not trying to resolve it ?? Or is it related to some specific situations ??

ShooterArk avatar Aug 27 '18 15:08 ShooterArk

I even can't connect to reactotron. If I point the Browser to my Address (where Reactotron runs) to port 9090, I only see a message: Upgrade Required

And in Developer-Console of the Browser I see: Failed to load resource: the server responded with a status of 426 (Upgrade Required)

I use Reactotron 2.1.2-1

xstable avatar Oct 11 '18 07:10 xstable

Hello. I'm having the same issue as @xstable (Reactrotron 2.6.2 for MAC) - Upgrade Required Also my Android app is not connecting to it even when a host is defined in Reactrotron configuration like this:

import Reactotron from 'reactotron-react-native';
import config from './temp/config';

Reactotron.configure({
  host: config.debuggerHost, // host ip: 10.98.17.85
  port: 9090,
}) // controls connection & communication settings
  .useReactNative({
    networking: {
      // optionally, you can turn it off with false.
      ignoreUrls: /symbolicate/,
    },
  })
  .connect();

shatodj avatar Feb 06 '19 14:02 shatodj