Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot reloading on Android "HMRClient is not a registered callable module" #23788

Closed
AlexMachin1997 opened this issue Mar 6, 2019 · 9 comments
Closed
Labels
Bug Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.

Comments

@AlexMachin1997
Copy link

AlexMachin1997 commented Mar 6, 2019

馃悰 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"

@react-native-bot
Copy link
Collaborator

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.

@AlexMachin1997
Copy link
Author

[skip envinfo]

@AlexMachin1997
Copy link
Author

AlexMachin1997 commented Mar 6, 2019

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

@brentvatne brentvatne changed the title Hot reloading refuses to work Hot reloading on Android "HMRClient is not a registered callable module" Mar 6, 2019
@react-native-bot react-native-bot added the Platform: Android Android applications. label Mar 6, 2019
@brentvatne
Copy link
Collaborator

brentvatne commented Mar 6, 2019

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

@AlexMachin1997
Copy link
Author

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.

@waheed25
Copy link

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.

@waheed25
Copy link

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.

@YajanaRao
Copy link

YajanaRao commented Oct 16, 2019

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

@petergaultney
Copy link

petergaultney commented Dec 21, 2019

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.

@facebook facebook locked as resolved and limited conversation to collaborators Mar 6, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

7 participants