realm-js: Unable to debug the app in Chrome, getting error : I Realm : Starting the debugging WebServer, Host: null Port: 8082 (adb logcat error)
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 :
Running application "realm_mobile" with appParams: {"initialProps":{},"rootTag":1}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
POST http://localhost:8082/get_property:1 POST http://localhost:8082/get_property net::ERR_EMPTY_RESPONSE
POST http://localhost:8082/create_realm:1 POST http://localhost:8082/create_realm net::ERR_EMPTY_RESPONSE
Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://localhost:8082/create_realm.
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
adb reverse tcp:8081 tcp:8081
adb forward tcp:8082 tcp:8082
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.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 8
- Comments: 24 (6 by maintainers)
Greetings, I have a working implementation for Android.
Versions
Steps
patch_realm_port.shpatch_realm_port.sh
Run yarn install on your root dir
Build android release
IMPORTANT: run the following adb commands
adb reverse tcp:8081 tcp:8081adb forward tcp:8082 tcp:8082adb forward tcp:8083 tcp:8083Start node server
Launch android debugger & run
For me running the following commands fixed it, thanks to @TGPSKI’s suggestion:
I have this on the IOS Simulator. Seemed to kind of “just started happening”. Worked ok before. And now, I can’t get past it.
I’m 0.14.3
Thanks @TGPSKI. Your steps worked for me on Windows 10 for android. I changed
DEFAULT_PORT to 8083 in RealmReactModule.java WEB_SERVER_PORT to 8083 in RealmReact.mm
Then I used adb to set up the ports: adb reverse tcp:8081 tcp:8081 adb forward tcp:8082 tcp:8082 adb forward tcp:8083 tcp:8083
followed by
gradlew clean (to do a clean build) and react-native run-android
My environment is
I tried adb forward/reverse 8081/8082, no luck. I also tried reversing to an older project snapshot, same problem. Have been getting this. Tried uninstalling via adb and reinstalling again, nothing worked.
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.