reactotron
reactotron copied to clipboard
Device does not connect
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?
I have the same problem.
same problem
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
adb reverse tcp:9090 tcp:9090
@louzada01 You can see from my original post that I already did that.
@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;
}
check IP address in reactotron config file with your PC IP
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.