STARTUP JS ERROR in Xcode console with no useful description is preventing my app from rendering

This is the error i’m seeing when running my app from an iOS device.

To Native Cordova ->  Device getDeviceInfo Device1139795215 ["options": []]
⚡️  [log] - onscript loading complete
⚡️  [error] - {}

⚡️  ------ STARTUP JS ERROR ------

⚡️  TypeError: undefined is not an object (evaluating 'e[r].call')
⚡️  URL: capacitor://localhost/static/js/runtime-main.af3e3ac8.js
⚡️  runtime-main.af3e3ac8.js:1:560

⚡️  See above for help with debugging blank-screen issues
⚡️  WebView loaded

I am trying to run my project on my device without live reload. Currently when I run it, it works fine in google chrome with ionic serve as well as running with a liveReload setup with

ionic capacitor run ios -l --external --live-reload --source-map=false

When I run it from xcode without the server option in my capactiro.config.js, however, I just see the capaacitor splashscreen and it never goes away.

I thought I’d put some console.log statements in to see what was being reached, and it turns out none of my code is even running. This leads me to believe it may be a dependency / configuration issue. My capacitor.config.json file looks like this

{
  "appId": "xxx",
  "appName": "xxx",
  "bundledWebRuntime": false,
  "npmClient": "npm",
  "webDir": "build",
  "plugins": {
    "SplashScreen": {
      "launchAutoHide": false
    }
  },
  "cordova": {}
}

(not that I am calling SplashScreen.hide() in my code… but that code is never reached because of the error)
and my package.json looks like this

{
  "name": "xxx",
  "version": "0.0.1",
  "private": true,
  "dependencies": {
    "@capacitor-community/contacts": "0.0.3",
    "@capacitor/core": "^2.4.4",
    "@capacitor/ios": "^2.4.4",
    "@ionic-native/core": "^5.28.0",
    "@ionic-native/device": "^5.30.0",
    "@ionic-native/local-notifications": "^5.28.0",
    "@ionic-native/unique-device-id": "^5.30.0",
    "@ionic/react": "^5.5.2",
    "@ionic/react-router": "^5.5.2",
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.4.0",
    "@testing-library/user-event": "^8.0.3",
    "@types/jest": "^24.0.25",
    "@types/node": "^12.19.8",
    "@types/react": "^16.14.2",
    "@types/react-dom": "^16.9.10",
    "@types/react-router": "^5.1.4",
    "@types/react-router-dom": "^5.1.3",
    "animated-number-react": "^0.1.1",
    "aws-amplify": "^3.3.10",
    "aws-appsync": "^4.0.1",
    "aws-appsync-react": "^4.0.1",
    "axios": "^0.21.0",
    "cordova-plugin-device": "^2.0.3",
    "cordova-plugin-ionic": "5.4.7",
    "cordova-plugin-ionic-keyboard": "^2.2.0",
    "cordova-plugin-uniquedeviceid": "^1.3.2",
    "cordova-plugin-whitelist": "^1.3.4",
    "es6-promise-plugin": "^4.2.2",
    "framer-motion": "^2.9.5",
    "graphql-tag": "^2.11.0",
    "ionicons": "^5.0.0",
    "js-sha256": "^0.9.0",
    "moment": "^2.29.1",
    "node-sass": "^4.14.1",
    "react": "^16.13.0",
    "react-apollo": "^2.5.8",
    "react-circular-progressbar": "^2.0.3",
    "react-confetti": "^6.0.0",
    "react-dom": "^16.13.0",
    "react-router": "^5.1.2",
    "react-router-dom": "^5.1.2",
    "typescript": "3.8.3"
  },
  "scripts": {
    "start": "ionic serve",
    "build": "ionic build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "sync": "ionic build; npx cap sync ios; npx cap open ios;",
    "ios": "ionic capacitor run ios -l --external --live-reload --source-map=false"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "@capacitor/cli": "2.4.2",
    "eslint-plugin-react-hooks": "^4.2.0",
    "react-scripts": "3.4.0"
  },
  "description": "An Ionic project"
}

Any ideas on what i’m doing wrong here would be extremely useful. Thanks guys!

I found out that this was being caused by the amplify configure line that I had when my app started.

import config from 'aws-exports'
Amplify.configure(config)

and aws-exports contained

// WARNING: DO NOT EDIT. This file is automatically generated by AWS Amplify. It will be overwritten.

const awsmobile =  {
    "aws_appsync_graphqlEndpoint": https://MY_AWS_DOMAIN/graphql,
    "aws_appsync_region": MY_REGION,
    "aws_appsync_authenticationType": "API_KEY",
    "aws_appsync_apiKey": MY_API_KEY,
};

export default awsmobile;

A day later, i’m still very confused why this was causing that issue. If anyone has any idea I’d really appreciate your input.

really need to see more code to see what is going on here?

I have the exact same problem. . . any updates ?