remote-redux-devtools icon indicating copy to clipboard operation
remote-redux-devtools copied to clipboard

Can't get working react debugger on Android

Open pablopi opened this issue 8 years ago • 15 comments

Do I need any special configuration? Can you help?

pablopi avatar Sep 19 '16 13:09 pablopi

You didn't provide any information to tell for sure what's wrong there.

In case you don't have process.env.NODE_ENV === 'development', make sure to set realtime parameter to true.

zalmoxisus avatar Sep 20 '16 12:09 zalmoxisus

the same configuration work on macosx and ios simulator, but with android connected to ubuntu, ti doesn't show any state changes or actions etc

maysam avatar Dec 09 '16 06:12 maysam

@maysam are you using the default configuration or with remotedev-server? If the latter, then don't forget about running adb to forward the port.

zalmoxisus avatar Dec 09 '16 11:12 zalmoxisus

already done that, even mobile does open the debugger page automatically and I get to see the js errors in the console, it's just the state/action part that doesn't do anything

maysam avatar Dec 09 '16 11:12 maysam

@maysam what app do you use for monitoring? Try the web version (and add the host and port there in the settings).

zalmoxisus avatar Dec 09 '16 11:12 zalmoxisus

I get this in the console log

WebSocket connection to 'ws://localhost:8081/socketcluster/' failed: WebSocket is closed before the connection is established.

maysam avatar Dec 09 '16 11:12 maysam

screenshot from 2016-12-09 19-51-41

maysam avatar Dec 09 '16 11:12 maysam

Did you start remotedev-server on port 8081? Do you get any errors there?

zalmoxisus avatar Dec 09 '16 11:12 zalmoxisus

Also try the web version as mentioned above, to see if it's the issue of remote-redux-devtools-on-debugger.

zalmoxisus avatar Dec 09 '16 11:12 zalmoxisus

this is what I already had in my package.json

"remotedev": "remotedev-debugger --injectserver",
"postinstall": "npm run link && npm run remotedev && rndebugger-open"

}, "remotedev": { "hostname": "localhost", "port": 5678 },

needless to say, I am testing a reactnative app on android device

maysam avatar Dec 09 '16 12:12 maysam

on the console I can see this error now

maysam@VPCZ226GG:~/workspace/bph$ [node-haste] Encountered an error while persisting cache:

SyntaxError: /home/maysam/workspace/bph/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/request/node_modules/node-uuid/test/test.js: Octal literal in strict mode (21:12) 19 | if (typeof(console) != 'undefined') { 20 | var color = {

21 | log: '\033[39m', | ^ 22 | warn: '\033[33m', 23 | error: '\033[31m' 24 | };

maysam avatar Dec 09 '16 12:12 maysam

I'm not familiar with remote-redux-devtools-on-debugger architecture, maybe @jhen0409 can help. As I understand running npm install or npm run postinstall should start the server.

zalmoxisus avatar Dec 09 '16 12:12 zalmoxisus

thanks, what's odd is that same config works just fine for xcode-iphone usecase

maysam avatar Dec 09 '16 12:12 maysam

@maysam, you could use it without a local server. By default, if you don't set a hostname and port parameter, remote-redux-devtools will connect to remotedev.io. Then you can monitor the app on http://remotedev.io/local. So, no need for port forwarding to connect the device on lan, but it should be connected to the internet of course.

In case of remote-redux-devtools-on-debugger, I guess you could set hostname to remotedev.io.

zalmoxisus avatar Dec 09 '16 12:12 zalmoxisus

It looks like reactNative util not working on newer versions of React Native, it removed __fbBatchedBridge.RemoteModules, but looks we can get hostname via __fbBatchedBridgeConfig, so I'll fix it.

@maysam currently we need run adb reverse tcp:5678 tcp:5678 until I fix the above problem.

jhen0409 avatar Dec 09 '16 15:12 jhen0409