Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Next.js and React

React Native says the application has not been registered

ErrorApplication has not been registered

Short 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.

  • Applies to React Native (current), Expo (managed and bare)
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 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.json
  2. 2Match what you see, then jump to its fix

    1. 1The quoted name in the error is not the string passed to registerComponentThe registered name differs from the native app nameFix
    2. 2package.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. 3Native 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

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/null

2Fix

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-android

Confirmed by reactnative.dev

Did this fix it?

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.json

2Fix

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 start

Confirmed by docs.expo.dev

Did this fix it?

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/null

2Fix

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 main

3Verify

Rebuild the native app and launch it.

npx expo run:android

Confirmed by docs.expo.dev

Did this fix it?

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:

Related fixes

Web 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 fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.