Importing and using Realm on react native works fine for iOS. Android also works in terms of functionality, however, when using remote debugging on chrome the following error yields.
I've looked around almost everywhere and nobody seems to have a clear cut answer for this. Anyone here that has managed to get out of this pit? Remote debugging is quite essential as the app is dealing with rather plex objects and using react-native log-ios
is a little hard on the workflow.
Thanks all.
Importing and using Realm on react native works fine for iOS. Android also works in terms of functionality, however, when using remote debugging on chrome the following error yields.
I've looked around almost everywhere and nobody seems to have a clear cut answer for this. Anyone here that has managed to get out of this pit? Remote debugging is quite essential as the app is dealing with rather plex objects and using react-native log-ios
is a little hard on the workflow.
Thanks all.
Share Improve this question asked May 30, 2017 at 13:31 Return-1Return-1 2,4494 gold badges22 silver badges58 bronze badges6 Answers
Reset to default 3Easy fix is to goto node_modules/realm/lib/browser/rpc.js
and replace line 216 with let url = 'http://127.0.0.1:8083/' + mand;
You're running into known issues w/ android remote debugging, but they're being worked on. You can track progress here: https://github./realm/realm-js/issues/491
I've met this problem when I've used react native with realm database. I think you need manually port reverse and forward to avoid conflict port.When you enable debug mode, please open mand line and follow below mand:
`adb reverse tcp:8081 tcp:8081`
`adb forward tcp:8082 tcp:8082`
Then, you can reload and go into debug mode.
Cheer!
if answer from @johnny didn't work, when you type the mands
adb reverse tcp:8081 tcp:8081
adb forward tcp:8082 tcp:8082
and you get the following message
adb server is out of date. killing...
* daemon started successfully *
that means that the adb mand you are using in mand line, and the adb tool used by the emulator are different.
you can confirm that by checking the location of adb (here I have two different tools in /usr/bin and /home, which are not symlinks as verified after)
42:~/pathToMyApp$ whereis adb
adb: /usr/bin/adb /home/42/Android/Sdk/platform-tools/adb /usr/share/man/man1/adb.1.gz
I tried with the full path on both tools, and I discovered the emulator was using the adb tool in /home/... So to make it work I now type
/home/42/Android/Sdk/platform-tools/adb reverse tcp:8081 tcp:8081;
/home/42/Android/Sdk/platform-tools/adb forward tcp:8082 tcp:8082
I was able to resolve this issue in my pixel_3XL simulator android API level : 29
reset the path for platform-tools changed my PATH to platform-tools
$ export PATH=${PATH}:/root/Android/Sdk/platform-tools
$ adb kill-server
$ adb root #will give root access for adb
$ adb forward tcp:8082 tcp:8082
$ adb reverse tcp:8081 tcp:8081
$ react-native run-android #restart the server with a debugger enabled
voila, it worked in my machine... good luck.
additionaly try changing the ip to 127.0.0.1 and port manually in app's Developer menu -> Dev settings -> Debug server host & port
Doing this worked for me
on terminal:
adb reverse tcp:8081 tcp:8081
adb forward tcp:8082 tcp:8082
adb forward tcp:8083 tcp:8083
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742284650a4415109.html
评论列表(0条)