-
Notifications
You must be signed in to change notification settings - Fork 582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to debug the app in Chrome, getting error : I Realm : Starting the debugging WebServer, Host: null Port: 8082 (adb logcat error) #465
Comments
@vidyuthd I apologized for taking awhile to respond. The Chrome debug mode works by the JS running in Chrome making synchronous HTTP calls to an embedded web server running in the app. It looks by |
Hi @appden , Nope I don't see any more errors in adb logcat other than this message : I Realm : Starting the debugging WebServer, Host: null Port: 8082 . |
Are you using the stock emulator or Genymotion? I suspect there's a routing or firewall issue that's blocking Chrome from being able to make requests to the app running in the emulator. Will you try switching emulators to see if it works there? That would help us figure out the problem you're seeing. Thanks. |
Any luck getting things working @vidyuthd ? |
Hi @appden I am using stock emulator as well as device directly. I have tried with geny motion. What I have observed is with very less data(< 10 entries for each obj) things are fine, and debugging seems to happen fine across all emulators. But if we are dealing with a larger amount of data, lets say 1500 objs and processing on them in js. The use case I wanted was to show result of join between two different entities, and for that I had to write the process in js after retreiving objs. I'm not sure if this maybe the cause but just giving you guys idea so that you can try out. So currently we are on sqlite, hence took time for me to test things. |
I suspect you're seeing this issue because Chrome debug mode in the Android emulator is especially slow (see #491). If you just leave it alone, does it ever finally end up finishing processing all those objects? |
Any luck here? Were you able to resolve this? |
I'm getting the same error:
This is being dumped to the device's stderr
In the device I'm getting: Failed to execute 'send on 'XMLHttpRequest': Failed to load 'http://100.101.17.110:8082/create_session'. The IP belongs to google... Digging a little more, with the Wifi on it's trying to get the wrong IP again, 192.168.1.5:8082, that is the device's IP address in my local network, it should be pointing to 192.168.1.4 which is the address of the development server, my machine I think there might be some work to do in this file https://github.com/realm/realm-js/blob/v0.14.2-rc/react-native/android/src/main/java/io/realm/react/RealmReactModule.java After trying many different things, including plugging/unplugging the device, ./adb reverse tcp:8082 tcp:8082, restarting the server, (all of this many times) it fixed itself automagically, but there has to be a way to avoid all this problems. |
Unfortunately I think chrome debugging is completely broken on device for the time being and I think you are right that some work needs to be done to fix this. Hopefully in the meantime you can debug using an emulator or genymotion. |
Same. Exact problem on Android. Was working fine just a few days ago and BOOM. this shows up. |
Is very frustrating because it also seems to interfere with fetch GET/POST. I can't tell for sure thou, since remote debugger doesn't work |
Same issue, it just happened... it worked fine before... any news? |
im seeing this issue now too and really need to debug on device (for camera related features). is there a workaround or fix schedued as is a blocker for us at mom.? |
We are getting this error and also MUST be able to debug on device for bluetooth related feature. |
Hi everyone, I've managed to fix Chrome Debugging on Android and RN (react v16.0.0-alpha.12 and react-native v0.46). I've been running in this issue and after reading a comment on a related issue I connected my laptop Wifi straight to my mobile device using it as a Mobile Hotspot. It's a bit annoying as I have to switch back to my wifi if I need to use the web (I don't want to run out of data) but at least I can see the state, actions, and console messages. I tried on my iPhone but couldn't get it working. |
Greetings, I have a working implementation for Android. Versions
Steps
...
"postinstall": "bash ./scripts/patch_realm_port.sh",
...
patch_realm_port.sh #!/bin/bash
# android
perl -0777 -i -pe 's/(?mi-s)(private static final int DEFAULT_PORT = 8082;)/ private static final int DEFAULT_PORT = 8083;/g' "./node_modules/realm/android/src/main/java/io/realm/react/RealmReactModule.java"
# ios
perl -0777 -i -pe 's/(?mi-s)(#define WEB_SERVER_PORT 8082)/#define WEB_SERVER_PORT 8083/g' "./node_modules/realm/android/src/main/java/io/realm/react/RealmReactModule.java"
|
Thanks @TGPSKI. Your steps worked for me on Windows 10 for android. I changed DEFAULT_PORT to 8083 in RealmReactModule.java Then I used adb to set up the ports: followed by gradlew clean (to do a clean build) and My environment is
|
Is the install script for iOS sound? I see this location
Should it be pointing to this file? Also, what is the solution if you don't rely on Android Studio at all? |
On Windows 8.1, the above changes, settings and configurations did not work. I have since had to resign myself to not being able to use the Chrome Debugger with react native. On a different thread, I read an excellent description about why Realm & the Chrome debugger do not co-exist nicely. The best proposed solution was a "proper" debugger for react-native that did not rely on the javascript capabilities of Chrome. That made a lot of sense to me. I for one, really LOVE what Realm gives me and I'd rather have those features! |
Could somebody explain to me which things are running and where? I'm running an unconventional setup and need to know which port to redirect |
Well, I was able to do some proper network redirection for my unconventional setup. For those who need it: #1732 (comment) |
For me running the following commands fixed it, thanks to @TGPSKI's suggestion:
|
Hi I m unable to debug my app which has realm db, I see a white screen with nothing else, and also when I hit reload on the emulator, I m getting the following error while debugging in chrome console :
When the debugger is removed, the code runs as its expected. I have checked the other issues raised with similar behaviour issue-276. I have tried manually port reverse & forward
I see the following error in adb logcat - I Realm : Starting the debugging WebServer, Host: null Port: 8082
I am using the following react(15.0.2), react-native(0.26.1), realm(0.13.0) versions. Is this supported ? Any help here from the logs attached and errors above would be appreciated.
Update : I have tried this on my android device also with same result. Without debugger, things work fine but once debugger is attached we get the white screen
Edit 1: Can you please look at this issue as it is blocking us badly. Thanks in advance.
The text was updated successfully, but these errors were encountered: