Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
This repository was archived by the owner on May 20, 2025. It is now read-only.

CodePush is not work Expo 46.0.16 react-native 0.69.6 #2366

@augustovogt

Description

@augustovogt

Hi All,
I am new in Code Push, I have following error in Android with Simulator or Devices:
I am followin guide: https://github.com/microsoft/react-native-code-push/blob/HEAD/docs/setup-android.md seccion: 'Plugin Installation and Configuration for React Native 0.60 version and above (Android)'
and also https://learn.microsoft.com/en-us/appcenter/sdk/getting-started/react-native for

Error:
The CodePush module doesn't appear to be properly installed. Please double-check that everything is setup correctly.

TypeError: undefined is not an object (evaluating 'CodePush.CheckFrequency')
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:95:17 in reportException
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:141:19 in handleException
at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:39 in handleError
at node_modules/expo/build/errors/ExpoErrorManager.js:25:19 in errorHandler
at node_modules/expo/build/errors/ExpoErrorManager.js:30:24 in
at node_modules/@react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError
at node_modules/metro-runtime/src/polyfills/require.js:203:40 in guardedLoadModule
at http://192.168.1.48:19000/index.bundle?platform=android&dev=true&hot=false&strict=false&minify=false:null in global code

Invariant Violation: "main" has not been registered. This can happen if:

  • Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
  • A module failed to load due to an error and AppRegistry.registerComponent wasn't called.
    at node_modules/react-native/Libraries/Core/ExceptionsManager.js:95:17 in reportException
    at node_modules/react-native/Libraries/Core/ExceptionsManager.js:141:19 in handleException
    at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:39 in handleError
    at node_modules/expo/build/errors/ExpoErrorManager.js:25:19 in errorHandler
    at node_modules/expo/build/errors/ExpoErrorManager.js:30:24 in
    at node_modules/@react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError

Extract My App,js

import CodePush from "react-native-code-push"

codePushOptions = { checkFrequency: CodePush.CheckFrequency.MANUAL };

App = CodePush(codePushOptions)(App);

export default App;

My package.json:

"dependencies": {
"appcenter": "4.4.5",
"appcenter-analytics": "4.4.5",
"appcenter-crashes": "4.4.5",
"expo": "~46.0.16",
"expo-splash-screen": "~0.16.2",
"expo-status-bar": "~1.4.0",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-native": "0.69.6",
"react-native-code-push": "^7.0.5",
"react-native-web": "~0.18.7"
},
"devDependencies": {
"@babel/core": "^7.12.9"
},
"private": true

I have tried different options and nothing

Can I use code push with expo?

Could someone please give me some guidance?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions