React Native says the application has not been registered
Application has not been registeredShort answer
The native side asks JavaScript to run an app name that JavaScript never registered. Check that the name given to AppRegistry.registerComponent matches the name in the native project. In Expo with a custom entry file, call registerRootComponent in the file that package.json main points to.
Fix it fast
1Find out which cause you have
Print the registered app names and compare them with the name the native project starts.
grep -rn "registerComponent\|registerRootComponent" index.js index.ts App.js App.tsx 2>/dev/null grep -n "\"main\"" package.json2Match what you see, then jump to its fix
- 1
The quoted name in the error is not the string passed to registerComponentThe registered name differs from the native app nameFix - 2
package.json main points to your own file, and that file only has export default AppExpo project with a custom entry file that never registers the rootFix - 3
Native code starts one name while the entry file registers another, in a bare Expo projectBare project: native code asks for a name other than main (Expo)Fix
- 1
What does the error look like?
Application has not been registered
Cause 1 of 3
The registered name differs from the native app name
1Check
The React Native docs say the appKey is the name the native side uses to find the app, and it must match the app name in your native project. AppRegistry.getAppKeys() lists what was registered.
grep -rn "registerComponent" index.js index.ts 2>/dev/null2Fix
Use the same string in both places, or change the native module name to the registered one.
// index.js
import {AppRegistry} from 'react-native';
import App from './App';
AppRegistry.registerComponent('MyApp', () => App);3Verify
Rebuild the native app, then restart Metro and open it.
npx react-native run-androidConfirmed by reactnative.dev
Cause 2 of 3
Expo project with a custom entry file that never registers the root
1Check
Expo documents that export default does not make a component the root when you use a custom entry file. The file that main points to has to call registerRootComponent.
grep -n "main" package.json2Fix
Call registerRootComponent in the entry file and keep main pointing to it.
// src/main.jsx (package.json main points here)
import {registerRootComponent} from 'expo';
import App from './App';
registerRootComponent(App);3Verify
Restart the dev server and reopen the app.
npx expo startConfirmed by docs.expo.dev
Cause 3 of 3
Bare project: native code asks for a name other than main (Expo)
1Check
Expo says registerRootComponent calls AppRegistry.registerComponent with the name main. On Android getMainComponentName returns main, and on iOS the module name is main.
grep -rn "getMainComponentName" android/app/src/main 2>/dev/null
grep -rn "moduleName" ios/*/AppDelegate.* 2>/dev/null2Fix
Make the native module name main when the entry uses registerRootComponent, or register your own name with AppRegistry and use that on both sides.
// Android MainActivity: return "main"
// iOS: use the module name main3Verify
Rebuild the native app and launch it.
npx expo run:androidConfirmed by docs.expo.dev
How do I stop it coming back?
- Rename the app in one step: registered name, Android and iOS native names, and app config together.
- Keep one entry file and one registration call.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- TaxiDexMy own multi-tenant taxi dispatch SaaS: API, dispatcher portal, driver and passenger apps, and the servers underneath.
- QistLockA NestJS and React SaaS driving an Android Device Owner agent that locks financed phones when payments lapse.
- TaskvareA task and project-management suite: React on the web, Flutter on mobile, TypeScript underneath.
Related fixes
Web apps
Axios get works with a URL string but ignores the object passed as the second argument
The server log shows a GET with no query string
axios.get takes a URL and an optional config object.
3 causes, each with a fixWeb apps
Expo app never leaves the splash screen
App shows the splash screen forever and no error appears
After SplashScreen.preventAutoHideAsync() the splash stays until you hide it yourself.
3 causes, each with a fixWeb apps
NativeViewGestureHandler must be used as a descendant of GestureHandlerRootView
Error: NativeViewGestureHandler must be used as a descendant of GestureHandlerRootView. Otherwise the gestures will not be recognized.
react-native-gesture-handler only recognises gestures inside GestureHandlerRootView.
3 causes, each with a fixWeb apps
React Hook "useState" cannot be called at the top level, or in a function that is not a component
The lint points at a useState line inside a helper function, an onClick handler or the top of a module
The lint rule found a hook outside a component or custom hook.
3 causes, each with a fixWeb apps
React: Maximum update depth exceeded or Too many re-renders
Maximum update depth exceeded
React stops a component that sets state again and again without end.
3 causes, each with a fixWeb apps
TypeScript marks className as an error on React Native components
Property 'className' does not exist on type
React Native components have no className prop in their own types.
3 causes, each with a fix