skip to Main Content

I’ve updated quite a few NPM packages in my React Native app and now even though it seems to build fine, it starts and immediately crashes on the iOS simulator. The error that it throws is:

Failed to launch the app on simulator, An error was encountered
processing the command (domain=FBSOpenApplicationServiceErrorDomain,
code=3) The request to open "org.reactjs.native.example.myappname"
failed. THe process did launch, but has since exited or crashed.

Prior to these npm package updates, the app was running fine. I found a few suggestions such as running rm -rf ios/build, cleaning the project, etc. I tried all these but still getting the same error.

Any suggestions on how to fix this issue?
BTW, this is a react-native: "^0.65.1" app and the Xcode version is 12.4.

4

Answers


  1. If there is no recent change in the iOS project files then try:

    1. Reset Content and Settings of the simulator:

    enter image description here

    1. If reseting the simulator content and settings doesn’t work, update Xcode to its latest version.
    Login or Signup to reply.
  2. I encountered this while upgrading a React Native application and found the actual error a few lines above:

    An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22): Failed to install the requested application The application's Info.plist does not contain a valid CFBundleShortVersionString. Ensure your bundle contains a valid CFBundleShortVersionString.

    Then a few lines later error Failed to launch the app on simulator, An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=4):

    Fixing the above error by setting the version correctly in xcode fixed the error for me.

    Login or Signup to reply.
  3. The error was thrown in my case because of the bundle id was copy pasted to xCode and it had space around:

    " com.your.app "
    

    instead of

    "com.your.app"
    
    Login or Signup to reply.
  4. In my case the problem was for xml formatter and when I formatted the file it was added " " before package name.
    check the source after formatting the file.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search