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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module HMRClient is not a registered callable module (calling enable) #916

Closed
danstepanov opened this issue Nov 4, 2017 · 32 comments
Closed
Assignees
Labels
needs more info To be used when awaiting reporter response

Comments

@danstepanov
Copy link
Contributor

danstepanov commented Nov 4, 2017

After upgrading to Expo SDK 22.0.0 per the blog post, I run into this error while running the app in the simulator with hot reloading enabled. I use yarn and ran yarn cache clean prior to starting the server.
screen shot 2017-11-04 at 12 25 52 pm

Workaround: After toggling remote debugging, the issue seems to go away and hot reloading seems to work just fine.

@ghost
Copy link

ghost commented Nov 7, 2017

I am getting this issue for published builds after going to SDK 22 and reverting back to 21, still get it.

@terribleben
Copy link
Contributor

Hi, HMR works for me if I download the Expo SDK 22 tabs template, enable HMR, and start changing things. The changes are reflected in my simulator/device as expected. Is it possible for you to provide a repro project?

@terribleben terribleben added the needs more info To be used when awaiting reporter response label Nov 7, 2017
@danstepanov
Copy link
Contributor Author

@terribleben I am no longer having this issue

@anp
Copy link
Contributor

anp commented Nov 7, 2017

@orloffmarket what's the URL you published to? I'm surprised HMR is ending up in your production bundle.

@ghost
Copy link

ghost commented Nov 7, 2017

no you are correct, my issue is Module AppRegistry is not a registered callable

@anp
Copy link
Contributor

anp commented Nov 9, 2017

@orloffmarket could you open a separate issue if you're still having this problem? Thanks!

@anp anp closed this as completed Nov 9, 2017
@ghost
Copy link

ghost commented Nov 9, 2017

My issue is resolved, it was due to SDK 22 updates and not related to this. Thanks

@Irosshipaz
Copy link

Irosshipaz commented Dec 5, 2017

I'm facing this problem right now, only on iOS, just after publish an application. Don't know what's happening.
asd

@Awais00094
Copy link

just add in index.ios.js
var RCTLog = require('RCTLog');

@anp
Copy link
Contributor

anp commented Jan 2, 2018

@Irosshipaz you can run your code locally the same way it happens when published by turning dev mode off. You should be able to reproduce the problem there, and you can look into version mismatches or other potential causes.

@ishraqe
Copy link

ishraqe commented Jan 18, 2018

facing this issue when running my android project...

@ide
Copy link
Member

ide commented Jan 18, 2018

"X is not a registered callable module" happens when the native side of React Native tries to invoke a method of a JS module that hasn't been loaded. One reason this can happen is if your bundle fails to load e.g. because of a syntax error in it, or a JS error that happens early on during module initialization. This is something that tends to be different to each specific project and debugged individually.

@ermarkar
Copy link

any solution to this?

@himanshuagrawal5947
Copy link

It works fine for me after enabling "hot reloading" can try the same.

@ITsolution-git
Copy link

Is there any solution to solve this issue?
What is this problem mainly related.

Anyone please help me. Thank you in advance.

@brentvatne
Copy link
Member

rm -rf node_modules && rm yarn.lock && rm package-lock.json && yarn

@otaviogaiao
Copy link

otaviogaiao commented Mar 6, 2018

I'm having the same issue when running my app on my iPhone with development mode off. I tried removing my node_modules component many times, I cleaned the yarn cache and reload watchman. Nothing worked.

EDIT: I just tested on the iOS simulator and the problem does not occur.

My package.json file is as follow:

{
  "name": "comissarios-react",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "babel-eslint": "^8.2.2",
    "eslint": "^4.18.2",
    "eslint-config-airbnb": "^16.1.0",
    "eslint-config-prettier": "^2.9.0",
    "eslint-plugin-import": "^2.9.0",
    "eslint-plugin-jsx-a11y": "^6.0.3",
    "eslint-plugin-react": "^7.7.0",
    "jest-expo": "^25.0.0",
    "prettier-eslint": "^8.8.1",
    "react-native-scripts": "1.8.1",
    "react-test-renderer": "16.0.0"
  },
  "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
  "scripts": {
    "start": "react-native-scripts start",
    "eject": "react-native-scripts eject",
    "android": "react-native-scripts android",
    "ios": "react-native-scripts ios",
    "test": "node node_modules/jest/bin/jest.js --watch"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo/vector-icons": "^6.3.1",
    "axios": "^0.17.1",
    "date-fns": "v2.0.0-alpha.7",
    "expo": "^25.0.0",
    "promise": "^8.0.1",
    "prop-types": "^15.6.0",
    "react": "16.2.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-25.0.0.tar.gz",
    "react-native-modal": "^5.0.0",
    "react-navigation": "^1.4.0",
    "react-navigation-redux-helpers": "^1.0.1",
    "react-redux": "^5.0.6",
    "redux": "^3.7.2",
    "redux-thunk": "^2.2.0"
  }
}

@otaviogaiao
Copy link

Any Idea @brentvatne ?

@Demuzx
Copy link

Demuzx commented Apr 25, 2018

Just open "Dev Settings" in your app and set "JS Dev Mode to true". It works for me.

@gersonmontenegro
Copy link

I closed the message and my application works normally, and I disabled hot reloading, and the message did not appear again

@bishoymelek-zz
Copy link

cd android && ./gradlew clean
then cd .. && react-native run-android

@nosykretts
Copy link

This error happen when I try runnng expo in dev mode exp start after checking out performance mode with exp start --no-dev.

So if you need development mode back. exp start not enough. Need to force with exp start --dev then error is gone.

@ruk91
Copy link

ruk91 commented Aug 6, 2018

@Demuzx It worked. Thank you

@Fea-Sin
Copy link

Fea-Sin commented Aug 8, 2018

open "Dev setting" and reset "JS Dev Mode" is true,it works.

if you use react-native cli
the solution is:
cd android
./gradlew clean

@v-stickykeys
Copy link

If you got this error when trying to test with expo metro bundler in "production mode", switch back to dev mode and turn off hot reloading and live reload. Then try again in production mode and it should work fine.

@anandkumarpathak
Copy link

anandkumarpathak commented Oct 20, 2018

It was happening with me if I enable hot reloading/live reloading. Just disabled it and error does not occur.

@ManigandanRaamanathan
Copy link

Disable hot reloading, it will work fine

@batuhanorhn
Copy link

rm -rf .expo
restart package
and resolved

@eddietex
Copy link

eddietex commented Dec 5, 2018

I was having the same problem and solved it by stopping the npm packager, deleting the Expo app from the iPhone simulator and running the packager again on the simulator (which made it install the latest version of the Expo app).

@AkshayBaldia
Copy link

This has a simple solution. Just uninstall the current app from device and install again.

@daniel
Copy link

daniel commented May 7, 2019

I have started getting this error when I start a published app or run the app in production mode locally. Haven't seen this before, but I recently upgraded a few npm packages so I'm suspecting it might have something to do with that.

@mulholo
Copy link

mulholo commented May 18, 2019

The hot module reloading options were disabled for me. Turned out my error was that I had accidentally switched production mode on in my Development Tools browser tab. Simply turning off and restarting the server fixed the issue.

image

@lock lock bot added the outdated label Nov 14, 2019
@lock lock bot locked and limited conversation to collaborators Nov 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs more info To be used when awaiting reporter response
Projects
None yet
Development

No branches or pull requests