Realm-js: DOMException: Failed to execute 'open' on 'XMLHttpRequest': Invalid URL

Created on 20 Jul 2017  路  8Comments  路  Source: realm/realm-js

Goals

Run Android app in emulator or on device (works fine on iOS)

Expected Results

The app should start. It used to work, but now it isn't for no particular reason.

Actual Results

ExceptionsManager.js:71 DOMException: Failed to execute 'open' on 'XMLHttpRequest': Invalid URL
    at makeRequest (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:98069:18)
    at sendRequest (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:98093:20)
    at Object.createSession (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:97915:17)
    at http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:97608:41
    at loadModuleImplementation (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:109:5)
    at guardedLoadModule (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:70:12)
    at _require (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:54:60)
    at http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:97382:28
    at loadModuleImplementation (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:109:5)
    at guardedLoadModule (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:70:12)


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.

Version of Realm and Tooling

  • Realm JS SDK Version: 1.10
  • Node or React Native: 0.45.1
  • Client OS & Version: MacOS 10.12.5
  • Which debugger for React Native: Chrome

Most helpful comment

I got the same issue there was "/" missing in my case. Do check your endpoint properly

All 8 comments

I fixed it but I am not entirely sure how. Most likely it had something to do with the network.

How did you fixed this issue?

how its fixed? I have got same error.

I don't remember, sorry. But I really think it had to do with some network configuration. As the error states "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."

+1 I can't get my app to run when I build the project on my iPhone. I have the same error as above. I believe it's probably because Realm is pointing to 127.0.0.1, but the app is running from my phone, so it's invalid

I had the same problem. I was developing an app with quasar and vue and it was working fine. But when I've built into an electron app my axios requests stopped working.

In dev, I was pointing to localhost. I've just changed to 127.0.0.1 and restarted to work.

I got the same issue there was "/" missing in my case. Do check your endpoint properly

I confirm that I got the same issue there was "/" missing in my case. Do check your URL endpoint properly

Was this page helpful?
0 / 5 - 0 ratings