1

I am trying to boot up a React Native 0.53.3 app with React 16.2.0 using simulator from Xcode 10.1 on High Sierra.

I previously had some issues that I have since resolved just to get the build to succeed: npm-shrinkwrap.json: Could not install from "node_modules/react-navigation/react-native-tab-view@github:react-navigation/react-native-tab-view

React Native: ":CFBundleIdentifier", Does Not Exist

Now all build succeed even though I continue to get the cfbundleridentifier error:

Check dependencies



** BUILD SUCCEEDED **


Installing build/Build/Products/Debug-iphonesimulator/NFIBEngage.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/NFIBEngage.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Even in Metro Bundler it succeeds:

Metro Bundler ready.

Loading dependency graph, done.
 BUNDLE  [ios, dev] ./index.ios.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1667/1667), done.

 BUNDLE  [ios, dev] ./index.ios.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1/1), done.

 DELTA  [ios, dev] ./index.ios.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1667/1667), done.

 MAP  [ios, dev] ./index.ios.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1667/1667), done.

So I was wondering why my app when launched in simulator would stay stuck in the splashscreen, that usually only happens when an index.ios.js has failed. So I looked at http://localhost:8081/debugger-ui/ and sure enough I saw the following errors:

Module AppRegistry is not a registered callable module (calling runApplication)

Unhandled JS Exception: Cannot read property 'invocationEventNone' of undefined

Unhandled JS Exception: Module AppRegistry is not a registered callable module (calling runApplication)

I don't know where its getting invocationEventNone from, its not anything written in the codebase, I checked.

As far as the `AppRegistry` module, it appears to look fine:

import {AppRegistry} from 'react-native';
import KeyboardManager from 'react-native-keyboard-manager';
import NFIBEngage from './App';

KeyboardManager.setToolbarPreviousNextButtonEnable(true);

AppRegistry.registerComponent('NFIBEngage', () => NFIBEngage);

Has anyone experienced something like this running versions similar to what I am running? What should I be investigating? How to resolve this?

I followed every solution in here: Module AppRegistry is not registered callable module (calling runApplication)

There was nothing in here that could help: React Native Module AppRegistry is not a registered callable module

This was not relevant: React Native(iOS) Module AppRegistry is not a registered callable module (calling runApplication)

Not relevant: React native AppRegistry is not a callable module

I then tried following the solution offered by iDevAmit here: React-Native: Module AppRegistry is not a registered callable module

but it appears my iOS which is what I am interested in running right now, is already linked according to this output:

rnpm-install info Platform 'ios' module appcenter is already linked
rnpm-install info Linking appcenter android dependency
rnpm-install info Platform 'android' module appcenter has been successfully linked
iOS App Secret is '00000000-0000-0000-0000-000000000000' set in ios/NFIBEngage/AppCenter-Config.plist
Added code to initialize iOS AppCenter SDK in ios/NFIBEngage/AppDelegate.m

            Could not install dependencies using CocoaPods.
            Please refer to the documentation to install dependencies manually.

            Error Reason - Could not find "pod" command. Is CocoaPods installed?

Configuring AppCenter Analytics
rnpm-install info Platform 'ios' module appcenter-analytics is already linked
? For the Android app, should user tracking be enabled automatical
ly? (Use arrow keys)
❯ Enable Automatically
  Enable in JavaScript iOS App Secret is '00000000-0000-0000-0000-000000000000' set in ios/NFIBEngage/AppCenter-Config.plist
? For the iOS app, should user tracking be enabled automatically?
(Use arrow keys)
❯ Enable Automatically
  Enable in JavaScript

I did a Ctrl + C to get out and I do not know if the CocoaPods message is related as I have never used it. One time I tried a pod install and zsh could not find pod as a command.

Omar's solution does not work as it gave me Duplicate declaration "appName"

None of the other recommendations were applicable and upgrading React Native is not an option for this project.

In my Xcode 10.1 I have the current configuration inside of Project Settings -> Advanced button:

enter image description here

In this post: React Native IOS Build CFBundleIdentifier Does not Exist

I already have what SUMIT and priyanga recommended.

Daniel
  • 14,004
  • 16
  • 96
  • 156
  • https://stackoverflow.com/a/41854111/1675954 check this First step is to upgrade react-native – Rachel Gallen May 31 '19 at 15:47
  • There are additional recommendations in [this answer](https://stackoverflow.com/a/52814383/1675954) [which also links to the previous link posted] Refer to this [closed issue from Sept 2018](https://github.com/facebook/react-native/issues/21382#issuecomment-425471215) on github if all else fails – Rachel Gallen May 31 '19 at 15:58
  • @RachelGallen, upgrading React Native is not an option for this project. I will clarify that in the post. I also have that configuration for Xcode I will clarify that in the post. – Daniel May 31 '19 at 16:14
  • @RachelGallen, as far as adding `@babel/runtime` I would need to have some idea of how that would fix my problem, I don't just want to start adding packages the project may not need. – Daniel May 31 '19 at 16:38

1 Answers1

0

What resolved this error was by removing the Instabug library and code from App.js file:

export default class appName extends PureComponent {
  constructor() {
    super();
    this._startSentry();
    // if (Platform.OS === "ios") {
    //   const key = base === "prod" ? env.instabug.prod : env.instabug.beta;
    //   Instabug.startWithToken(key, Instabug.invocationEvent.twoFingersSwipe);
    // }
    // Instabug.setIntroMessageEnabled(false);
    // appcenter.trackAppOpened();
  }

as I was also getting invocationEvent undefined along with that AppRegistry error.

Daniel
  • 14,004
  • 16
  • 96
  • 156