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 AppRegistry is not a registered callable module #20296

Closed
jsina opened this issue Jul 19, 2018 · 9 comments
Closed

Module AppRegistry is not a registered callable module #20296

jsina opened this issue Jul 19, 2018 · 9 comments
Labels
Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.

Comments

@jsina
Copy link

jsina commented Jul 19, 2018

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

OS: macOS High Sierra 10.13.4
Node: 9.11.2
Yarn: 0.27.5
npm: 5.6.0
Watchman: 4.7.0
Xcode: Xcode 9.4 Build version 9F1027a
Android Studio: Not Found

Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.2 => 0.55.2

Steps to Reproduce

1- For Android, setup release configurations.
2- react-native run-android --variant=releaseStaging
3- After the build is successful, the app is deployed to the connected device, then crashes with the following message (from cat logs):

--------- beginning of crash
false is not a function (evaluating 't(d)')
07-19 21:52:15.038  7212  7252 E ReactNativeJS: Module AppRegistry is not a registered callable module (calling runApplication)
AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
AndroidRuntime: Process: com.teambo, PID: 7212
AndroidRuntime: com.facebook.react.common.JavascriptException: false is not a function (evaluating 't(d)'), stack:
AndroidRuntime: <unknown>@343:502
AndroidRuntime: <unknown>@343:481
AndroidRuntime: e@327:267
AndroidRuntime: <unknown>@352:369
AndroidRuntime: d@2:768
AndroidRuntime: n@2:409
AndroidRuntime: t@2:262
AndroidRuntime: <unknown>@315:218
AndroidRuntime: d@2:768
AndroidRuntime: n@2:409
AndroidRuntime: t@2:262
AndroidRuntime: <unknown>@12:92
AndroidRuntime: d@2:768
AndroidRuntime: n@2:339
AndroidRuntime: t@2:262
AndroidRuntime: global code@883:8
AndroidRuntime: 
AndroidRuntime: 	at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:54)
AndroidRuntime: 	at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:38)
AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
AndroidRuntime: 	at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
AndroidRuntime: 	at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
AndroidRuntime: 	at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:739)
AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:95)
AndroidRuntime: 	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
AndroidRuntime: 	at android.os.Looper.loop(Looper.java:158)
AndroidRuntime: 	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
AndroidRuntime: 	at java.lang.Thread.run(Thread.java:818)
ActivityManager:   Force finishing activity com.teambo/.MainActivity

4- Following are the dependencies in package.json file:

"dependencies": {
    "@mapbox/react-native-mapbox-gl": "git+https://github.com/mapbox/react-native-mapbox-gl#release/6.1.2",
    "@ptomasroos/react-native-multi-slider": "^1.0.0",
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "moment": "^2.22.1",
    "moment-jalaali": "^0.7.2",
    "prop-types": "^15.6.1",
    "react": "16.3.1",
    "react-native": "0.55.2",
    "react-native-code-push": "^5.3.3",
    "react-native-dropdownalert": "^3.4.0",
    "react-native-elements": "^0.19.1",
    "react-native-google-analytics-bridge": "^5.6.3",
    "react-native-image-picker": "^0.26.7",
    "react-native-splash-screen": "3.0.6",
    "react-native-swiper": "^1.5.13",
    "react-native-vector-icons": "^4.6.0",
    "react-navigation": "^1.5.11",
    "react-navigation-redux-helpers": "^1.0.5",
    "react-redux": "^5.0.7",
    "redux": "^3.7.2",
    "redux-logger": "^3.0.6",
    "redux-promise-middleware": "^5.0.0",
    "redux-thunk": "^2.2.0",
    "rn-viewpager": "^1.2.9"
  },

5- actually I'm using code-push for my app. here is my index.js

import codePush from 'react-native-code-push';
import { AppRegistry } from 'react-native';
import App from './src/App/App';

const codePushOptions = {
  checkFrequency: codePush.CheckFrequency.ON_APP_RESUME,
  installMode: codePush.InstallMode.ON_NEXT_RESUME,
};

const pushedApp = codePush(codePushOptions)(App);

AppRegistry.registerComponent('Teambo', () => pushedApp);

Expected Behavior

Application should run on the device without any crashes (in release mode).

Actual Behavior

Application works fine when using react-native run-android but when I try to release it application builds successfully and deploys onto device. Then the app crashes once it opens.

Reproducible Demo

Unable to create a reproducible demo.

@react-native-bot

This comment has been minimized.

@jsina

This comment has been minimized.

@hramos hramos added Platform: Android Android applications. and removed 📋No Environment Info labels Jul 19, 2018
@hramos hramos changed the title application crash on releasing Module AppRegistry is not a registered callable module Jul 19, 2018
@hramos
Copy link
Contributor

hramos commented Jul 19, 2018

#18179 might be related. I'm closing this issue as there is no minimal repro, and this appears to be unique to your particular application.

@hramos hramos closed this as completed Jul 19, 2018
@Akashsystematix
Copy link

simulator screen shot - iphone 6 - 2019-01-03 at 12 48 50

@Matrixbirds
Copy link

Matrixbirds commented Jan 28, 2019

I got same issue when using react-natve: 0.57.8 react: 16.6.3 when i imported an typescript react-native component
ENV:

React Native Environment Info:
    System:
      OS: macOS 10.14.2
      CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
      Memory: 45.46 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.15.0 - ~/.nvm/versions/node/v10.15.0/bin/node
      Yarn: 1.12.3 - ~/.nvm/versions/node/v10.15.0/bin/yarn
      npm: 6.5.0 - ~/.nvm/versions/node/v10.15.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        API Levels: 23, 27, 28
        Build Tools: 23.0.1, 27.0.3, 28.0.3
    IDEs:
      Android Studio: 3.2 AI-181.5540.7.32.5056338
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.3 => 16.6.3
      react-native: 0.57.8 => 0.57.8

@brave-coder9
Copy link

brave-coder9 commented Jun 2, 2019

I have upgraded the React Native to 0.59.8
And using codepush
I am getting the same error on both Android and iOS...

[fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Module AppRegistry is not a registered callable module (calling runApplication)

Please help me.

@ibnekhan
Copy link

After upgraded react native version 0.59.9 and i'm facing the same issue on both android and ios.

@madelinecameron
Copy link

madelinecameron commented Jun 19, 2019

Same. React-native 0.59.9, macOS 10.14.5, xcode 10.2.1, node 10.15.3

I have tried react-native link, --reset-cache, rebuilding.

Here is my index.js:

/**
 * @format
 */

import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
import PushNotification from 'react-native-push-notification';

PushNotification.configure({

    // (optional) Called when Token is generated (iOS and Android)
    onRegister: function(token) {
        console.log( 'TOKEN:', token );
    },

    // (required) Called when a remote or local notification is opened or received
    onNotification: function(notification) {
        console.log( 'NOTIFICATION:', notification );

        // process the notification

        // required on iOS only (see fetchCompletionHandler docs: https://facebook.github.io/react-native/docs/pushnotificationios.html)
        notification.finish(PushNotificationIOS.FetchResult.NoData);
    },

    // ANDROID ONLY: GCM or FCM Sender ID (product_number) (optional - not required for local notifications, but is need to receive remote push notifications)

    // IOS ONLY (optional): default: all - Permissions to register.
    permissions: {
        alert: true,
        badge: true,
        sound: true
    },

    // Should the initial notification be popped automatically
    // default: true
    popInitialNotification: false,

    /**
      * (optional) default: true
      * - Specified if permissions (ios) and token (android and ios) will requested or not,
      * - if not, you must call PushNotificationsHandler.requestPermissions() later
      */
    requestPermissions: true,
});

AppRegistry.registerComponent(appName, () => App);

@alouiseq
Copy link

@hramos this issue seems to be occurring lately. Should we reopen?

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

No branches or pull requests

9 participants