ios simulator not launching in expo react native project

Viewed 592

I know there are a lot of posts about this question and I have gone through all of the solutions. I installed Xcode updates. i updated expo to the latest version. I reset the simulator completely. Im not sure what there is left to do...

(node:89825) UnhandledPromiseRejectionWarning: Error: xcrun exited with non-zero code: 4 at ChildProcess.completionListener (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:65:13) at Object.onceWrapper (events.js:422:26) at ChildProcess.emit (events.js:315:20) at maybeClose (internal/child_process.js:1048:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) ... at spawnAsync (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:26:19) at xcrunAsync (/@expo/xdl@59.0.5/src/SimControl.ts:335:18) at Object.bootAsync (/@expo/xdl@59.0.5/src/SimControl.ts:137:11) at action (/@expo/xdl@59.0.5/src/Simulator.ts:310:25) at waitForActionAsync (/@expo/xdl@59.0.5/src/Simulator.ts:292:22) at ensureSimulatorOpenAsync (/@expo/xdl@59.0.5/src/Simulator.ts:207:24) at Object.openProjectAsync (/@expo/xdl@59.0.5/src/Simulator.ts:653:14) at ReadStream.handleKeypress (/usr/local/lib/node_modules/expo-cli/src/commands/start/TerminalUI.ts:224:11) (node:89825) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 13)

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@react-native-community/masked-view": "^0.1.10",
    "@react-navigation/native": "^5.8.10",
    "expo": "~39.0.2",
    "expo-status-bar": "~1.0.2",
    "lottie-ios": "^3.1.8",
    "lottie-react-native": "^3.5.0",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-39.0.4.tar.gz",
    "react-native-gesture-handler": "~1.7.0",
    "react-native-reanimated": "~1.13.0",
    "react-native-safe-area-context": "3.1.4",
    "react-native-screens": "~2.10.1",
    "react-native-web": "~0.13.12",
    "react-navigation": "^4.4.3",
    "react-navigation-stack": "^2.10.2"
  },
  "devDependencies": {
    "@babel/core": "~7.9.0"
  },
  "private": true
}
1 Answers

FOUND THE SOLUTION!

I had to change the ownership of .expo to me. I fixed the issue with the following command

sudo chown -R MYUSERNAME /Users/MYUSERNAME/.expo/

Related