Realm failed to connect to the embedded debug server inside the app. If attempting to use Chrome debugging from a device, ensure the device is reachable on the same network as this machine


Please provide more information, for example do you use a real device or emulator. Is it Android or iOS? Which version of Realm JS do you use?
My device is Android , the version of Realm JS I use is 2.21,thank you very much!!
@duxiwei Do you forward ports using adb?
yes
Does the debugger open in Chrome when you run react-native run-android? Do you enable remote debugging in your app on the device?
It's ok,but the debugger can't work , in other words the same computer,the same android phone ,the debugger of my other program is react-native can work
Since your screenshot says 192.168.1.115 and not 127.0.0.1, please explain your set up. Just so I can replicate it.
System:Ubuntu18.04 , IDE:Webstorm2018.1.5 , node:v8.10.0 ; realm:2.2.1,react-native:0.52.0 , thanks
same issues.
@duxiwei Realm JS 2.2.1 is fairly old, so could you try a recent version (2.12.0 or 2.13.0)?
I have tried it you said many times, but it never works.
same issue
"dependencies": {
"react": "16.3.1",
"react-native": "0.55.4",
"realm": "^2.13.0"
},

Some infomation as follow via the Charles

@FokingGit Can you try debugging over USB instead?
I have a similar issue on an iPhone 6 real device when I try to Debug JS remotely (my app is working fine when I don't when to enable the debugger):
"dependencies": {
"react": "16.4.1",
"react-native": "0.56.0",
"realm": "^2.14.1"
}

Console errors:

I have no problem with Android though, I can debug and see my console logs.
Update:
I found this thread about the Cors error: https://github.com/facebook/react-native/issues/18006
So far the remote js debugger is working with the emulator but not with a real ios device for me.
@Alex-DG Thanks for the link to the RN issue. It indicates that using RN < 0.52 is a good idea - or wait for the fix to be released.
For me, It was solved after connecting the device to the same network although it was connected by USB cable.
hey, so is there any work around this issue ??
I have my device on same the network (iPhone), rn 0.57.8, realm 2.22.0
thanks
Same issue, can't debug a react native application and use realm at the same time. Same error as above.
@palevoo @cristianoccazinsp How do you connect the device? Does it work if you use a simulator?
@kneth Device connected through a USB cable.
As it turns out, I had two issues. First, my device had to be on the same LAN/WiFi. Secondly, my host OS (Mac in my case) and firewall had to enable inbound connections. Oddly enough, not all devices prompted me to allow these connections (reason I didn't notice initially).
After resolving the above two, the error is gone. However, I really don't like the fact that I need to be both connected and to also accept incoming network requests through the WiFi. Why can't Realm just use the cable connection like React?


Facing the same issue when trying to debug using android device connected through usb cable.
Environment:
react-native:0.59.4
realm:^2.26.1
node:10.15.3
Here are some solutions which i tried but not even single solution worked
-> adb forward tcp:8083 tcp:8083
-> adb forward tcp:8082 tcp:8082
-> changing the file rpc.js in node_modules/realm/lib/browser/
The solution provided Selman555 at https://github.com/realm/realm-js/issues/578
-> changing the version of realm to 2.17
and many more but nothing really worked.
Facing the same issue when trying to debug using android device connected through usb cable.
Environment:
react-native:0.59.4
realm:^2.26.1
node:10.15.3Here are some solutions which i tried but not even single solution worked
-> adb forward tcp:8083 tcp:8083
-> adb forward tcp:8082 tcp:8082
-> changing the file rpc.js in node_modules/realm/lib/browser/
The solution provided Selman555 at #578
-> changing the version of realm to 2.17
and many more but nothing really worked.
Same here, I get a few require lifecycle warnings, then there's a pause for about 10 seconds, then "Failed to execute..." message appears
i install microsoft visual studio 2017 with realm ^2.28.1 and it's works for me

@madandrija Is this still an issue for you?
@madandrija Is this still an issue for you?
With:
react-native:0.59.9
realm: 3.0.0-beta.1
doesn't seem so.
@adnkh Came here for the issue and your solution worked like a charm for me. Thanks!
For future reference to anybody reading this.
Try to disable your firewall.
First mentioned from @cristianoccazinsp
Most helpful comment
Does the debugger open in Chrome when you run
react-native run-android? Do you enable remote debugging in your app on the device?