Realm-js: Still Unable To Use Remote JS Debugging For Android Emulator

Created on 18 Nov 2016  路  6Comments  路  Source: realm/realm-js

When I try to enable Remote JS Debugging I am encountering "Error: Failed to load 'http://localhost:8082/create_session'".

It seems like this issue has been covered several times (#276, #284) and I'm wondering if there is a fix in the works, or one I haven't yet discovered.

I remain unable to effectively debug in an Android emulator. I have just updated to Realm v0.15.0 and the issue persists. I find that if I run the suggested command adb reverse tcp:8081 tcp:8081 followed by adb forward tcp:8082 tcp:8082 that this will allow me to load my app and continue working, but as soon as I hit an error or reload I'm back to square one with the same error message and have to run the two adb commands again.

If sharing information about my project or process will help resolve this issue please let me know and I will gladly pass it along.

O-Community T-Bug

All 6 comments

@flyingace we're sorry that this issue remains. We will look into it as soon as we can but a couple of things have higher priority at the moment.

Hi @flyingace

Is it possible to share your project (even privately at [email protected])

The Android app start an Http Server (listening on 8082) to process commands from Chrome debugger, ex: create_realm, call_method etc. (hence the adb port reverse)

I think when your app crashes it doesn't start the Http server correctly...

Can you share the Logcat? do you see the Starting the debugging WebServer, Stopping the webserver or setupChromeDebugModeRealmJsContext messages?

Cheers

facing the same issue with both android genymotion emulator and real device. Developing on Mac.
Realm 0.15.0
RN 0.40.0

screen shot 2017-02-09 at 10 50 05 am

+1, having similar issue on android gennymotion
React: 15.3.2
React native: 0.33.1
Realm: 1.0.2

untitled

Similar here. I am using

react 16.0.0
react-native 0.49.2
realm 1.13.0

As soon as I start the JS debugger in genymotion, the promise generated by Realm.open does not succeed nor throw an error. So basically, nothing happens. Has this ever worked flawlessly?

I have two options now:

  1. create my own Realm mock which will be used whenever I want to debug something
  2. ditch Realm altogether which seems to be a viable option, given the time I have been wasting with Realm's issues when doing basic tasks

Is adb logcat the * only * way to debug if your app uses realm-js ?

I cannot use Chrome debugger at all. I use a mixture of Genymotion and real devices for Android development.

How to Debug Your App If You Use Realm

1) Stare at your white screen emulator waiting for app load. ( It literally takes 5 minutes )
2) Make quick code change
3) Press Reload to test, go to step 1 and wait 5 minutes, repeat

"react": "^16.0.0", "react-native": "^0.50.3", "realm": "^2.0.12",

Work-Around:

None.

react-native-debugger still takes 5 minutes to load.

However, you can watch thousands of ~50 millisecond getProperty calls scroll by in the Network tab while you wait to test your code change.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fever324 picture fever324  路  4Comments

gwanjar picture gwanjar  路  3Comments

kevinnguy picture kevinnguy  路  3Comments

bdebout picture bdebout  路  3Comments

timanglade picture timanglade  路  3Comments