React-native: Hot reloading on Android "HMRClient is not a registered callable module"

Created on 6 Mar 2019  路  9Comments  路  Source: facebook/react-native

馃悰 Bug Report

When hot-reloading is enabled I receive the following errors (See attached image)
screenshot_20190306_123825_com awesomeproject

When I disable it, the app goes back to normal, but Hot-Reloading is a necessity in modern day web development. Live-reloading is fine for now, but when I start to build more complex applications, it will be required.

To Reproduce

1) Install react-native cli
2) Install expo cli
3) expo init AwesomeProject
4) react-native run-android
5) Dev tools: Live reloading, hot reloading, dev mode set to true, use deltas
6) The error will appear on the device's screen

Expected Behavior

The application should reload reflecting the new changes, without seeing the error provided above.

Environment

image

"react-native": "0.58.6"

Bug Android Locked

Most helpful comment

Ahhh this issue occurs if we uncheck "JS Dev Mode" in Dev settings and then try to enable the hot reload enabling the "JS Dev Mode" works for me.

All 9 comments

Can you run react-native info and edit your issue to include these results under the Environment section?

If you believe this information is irrelevant to the reported issue, you may write [skip envinfo] alongside an explanation in your Environment: section.

[skip envinfo]

So I've tested this on my android studio emulator and it's fine, but on my phone, I still get the error even though they are exactly the same settings essentially.

Heres a demo repo https://github.com/AlexMachin1997/React-Native-Demo

I can't actually repro this, it worked fine for me. You might want to disable live reloading, it doesn't make much sense to use that with hot reloading (you should use one or the other and not both at the same time)

maybe make sure you run adb reverse? https://facebook.github.io/react-native/docs/running-on-device#method-1-using-adb-reverse-recommended

Oh ok, so I ran the ADB reverse command and just enabled hot reloading. Test it twice to see if it wasn't a fluke and it wasn't it's all working now.

Hmm, I thought you could use both together, my bad. Thanks for the assistance Brentvatne 馃憤 馃挴

I will be sure to update my development notes to note of this.

Not works for me i have upgraded my version 0.57.8 to 0.59.3 after that i am facing this issue running "adb reverse tcp:8081 tcp:8081" still not works.

Ahhh this issue occurs if we uncheck "JS Dev Mode" in Dev settings and then try to enable the hot reload enabling the "JS Dev Mode" works for me.

I am facing the same issue with react native 0.61.2 and for me the solution was to update metro version from 0.55 to 0.56

I also have this issue when enabling Hot Reloading but having JS Dev Mode unchecked. It's very difficult to discover and means that you can't do proper performance profiling while also having Hot Reload enabled. We're on React-Native 0.59 and it seems I have metro-core 0.51.1.

Was this page helpful?
0 / 5 - 0 ratings