react-native-community / upgrade-support

A central community-backed place to request and give help when upgrading your app.
MIT License
261 stars 2 forks source link

Invariant Violation: "Appname" has not been registered #224

Open sandeeptheminery opened 1 year ago

sandeeptheminery commented 1 year ago

React Native ios app - XCode(Version 13.2.1) , Mac M1

react-native info log

warn Package react-native-firebase contains invalid configuration: "dependency.platforms.ios.podspecPath" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this. warn Package rn-fetch-blob contains invalid configuration: "dependency.hooks" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this. info Fetching system and libraries information... (node:10196) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) System: OS: macOS 12.2.1 CPU: (8) x64 Apple M1 Memory: 35.66 MB / 8.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.10.0 - /usr/local/bin/node Yarn: 1.22.17 - /usr/local/bin/yarn npm: 8.19.3 - /opt/homebrew/bin/npm Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3 Android SDK: Not Found IDEs: Android Studio: Not Found Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild Languages: Java: Not Found npmPackages: @react-native-community/cli: ^10.1.3 => 10.1.3 react: 18.2.0 => 18.2.0 react-native: 0.71.1 => 0.71.1 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Things I’ve done to figure out my issue

upgraded from react native 0.61.5 to 0.71.1

Description

After upgrading the ios app build works but while loading on simulator it throws this error

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

I checked appName in AppRegistry.registerComponent its correct and same as before upgrade. I also tried reset cache, removed simulator data and also rebuild the project again but it didn't work, please help!

image

fgarcia92 commented 1 year ago

I'm facing the same issue upgrading to 0.71.1 with M1

feige-2011 commented 1 year ago

I'm facing the same issue upgrading to 0.71.1 with M1

I don't know if you have solved this problem. I hope you can be prompted. Thank you

Ascor52 commented 1 year ago

I had the same error after upgrading from 0.68.2 to 0.71.3 The Appname is case sensitive, so check all Appname strings in the code.

In my case it was the new line (9) in AppDelegate.mm self.moduleName = @"Appname"; ==> self.moduleName = @"appname";

theambidextrous commented 1 year ago

Am stuck with this issue... anyone with a solution?

renopp commented 1 year ago

try to upgrade react-native-reanimated

"react-native-reanimated": "3.0.2"

I fix this error at android platform

renopp commented 1 year ago

Am stuck with this issue... anyone with a solution?

@theambidextrous Have you tried to use the JSC engine? I solve the issue by disabling hermes engine and using JSC, after switching to JSC engine the error showed and it was caused by react-native-reanimated

ARIPRASATH4664 commented 1 year ago

Appname is case sensitive, so c

This Worked 💯

Pratik-2102 commented 1 year ago

I dont have AppDelegate.mm file in folder structure

ARIPRASATH4664 commented 1 year ago

I dont have AppDelegate.mm file in folder structure

@Pratik-2102 Do you have AppDelegate.m in the folder ?

Pratik-2102 commented 1 year ago

yes. I have this file

I dont have AppDelegate.mm file in folder structure

@Pratik-2102 Do you have AppDelegate.m in the folder ?

ARIPRASATH4664 commented 1 year ago

@Pratik-2102 Perfect please do change the name as per your Module name in AppDelegate.m 👍🏼 Hope that Works

GusCarreno commented 7 months ago

Also you can try signing & Capabilities and adding a team

prox2 commented 4 months ago

for me the issue happen after upgrading from 0.63 to 0.68, fixed by updating this line in AppDelegate.mm

UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"appName", nil);

@"appName" => must match the name in package.json

onurravli commented 3 months ago

Also, you should check the name prop in app.json file.

grishkovelli commented 3 months ago

After I updated all packages with yarn-upgrade-all I got two errors:

  1. middleware is not a function (it is undefined), js engine: hermes is related to redux
  2. Invariant Violation: "MyAppName" has not been registered

In my case importing of thunk was changed, so to solve the problem I replaced

import thunk from 'redux-thunk' // 2.4.2

with

import { thunk } from 'redux-thunk' // 3.1.0

and no more errors.