1

While running my react native app in debug mode, the app will periodically freeze up or if there is a breaking error the app will freeze.

reload with Metro will not resolve the issue. I end up stopping metro and Xcode and restarting. This is getting tiresome to deal with so I am hoping I can find out what is causing the issue.

I am running a React Native App in Xcode 14.0 and using Flipper 0.164.0 (50.0.0) for debugging.

Active Plugins: hermes Debugger(RN), Logs, Network, Redux Debugger, React DevTools

When the App freezes on the IPad I can see the following errors. These don't necessarily happen at the time of the app freezing.

In Flipper I get the following Error:

Failed while retrieving marketplace plugins SyntaxError: Unexpected token < in JSON at position 0

[conn] Disconnected: SalesTrak on <device id>. 
app: "SalesTrak"
os: "iOS"
device: "Michael’s iPad"
device_id: "<device id>"
sdk_version: 4
medium: "FS_ACCESS"
rsocket: undefined

I found a way to debug flipper in Chrome. Found the rest of error message. Still not that useful to me yet.

bundle.js:formatted:444514 Failed while retrieving marketplace plugins SyntaxError: Unexpected token < in JSON at position 0
TargetConsole.<computed> @ bundle.js:formatted:444514
loadAvailablePlugins @ bundle.js:formatted:450215
await in loadAvailablePlugins (async)
loadPluginsFromMarketplace @ bundle.js:formatted:450108
refreshMarketplacePlugins @ bundle.js:formatted:450119

In Xcode, in the logs I also found this Error that appears to coincide with the time that the app freezes.

terminating with uncaught exception of type facebook::jsi::JSError: Restricted in strict mode

TypeError: Restricted in strict mode
    at anonymous (native)
    at __tickleJs (__tickleJsHackUrl:1:43)
libc++abi.dylib: terminating with uncaught exception of type facebook::jsi::JSError: Restricted in strict mode
TypeError: Restricted in strict mode
    at anonymous (native)
    at __tickleJs (__tickleJsHackUrl:1:43)

Here is the contents of package.json from the project:

"scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "@fortawesome/fontawesome-svg-core": "^1.3.0",
    "@fortawesome/free-solid-svg-icons": "^6.0.0",
    "@fortawesome/react-native-fontawesome": "^0.2.7",
    "@react-native-community/async-storage": "^1.12.1",
    "@react-native-community/checkbox": "^0.5.9",
    "@react-native-community/datetimepicker": "^3.5.2",
    "@react-native-community/geolocation": "^2.0.2",
    "@react-native-community/hooks": "^2.8.1",
    "@react-native-community/netinfo": "^7.1.2",
    "@react-native-masked-view/masked-view": "^0.2.6",
    "@react-native-picker/picker": "^2.4.1",
    "@react-navigation/bottom-tabs": "^6.0.9",
    "@react-navigation/drawer": "^6.1.8",
    "@react-navigation/material-top-tabs": "^6.0.6",
    "@react-navigation/native": "^6.0.6",
    "@react-navigation/stack": "^6.0.11",
    "@terrylinla/react-native-sketch-canvas": "^0.8.0",
    "axios": "^0.25.0",
    "formik": "^2.2.9",
    "moment": "^2.29.1",
    "rbush": "^3.0.1",
    "react": "17.0.2",
    "react-native": "0.66.3",
    "react-native-anchor-carousel": "^4.0.1",
    "react-native-bouncy-checkbox": "^2.1.10",
    "react-native-device-info": "^8.4.8",
    "react-native-draganddrop-board": "^1.0.4",
    "react-native-dropdown-picker": "^5.3.0",
    "react-native-error-boundary": "^1.1.12",
    "react-native-fast-image": "^8.5.11",
    "react-native-flipper": "^0.144.0",
    "react-native-fs": "^2.18.0",
    "react-native-geocoding": "^0.5.0",
    "react-native-gesture-handler": "^1.10.3",
    "react-native-image-crop-picker": "^0.37.3",
    "react-native-image-pan-zoom": "^2.1.12",
    "react-native-image-picker": "^4.3.0",
    "react-native-image-zoom-viewer": "^3.0.1",
    "react-native-maps": "^0.29.4",
    "react-native-mask-input": "^1.1.0",
    "react-native-modal-datetime-picker": "^13.0.0",
    "react-native-pager-view": "^5.4.9",
    "react-native-permissions": "^3.1.0",
    "react-native-picker-select": "^8.0.4",
    "react-native-reanimated": "^2.2.4",
    "react-native-render-html": "^6.3.4",
    "react-native-safe-area-context": "^3.3.2",
    "react-native-screens": "^3.9.0",
    "react-native-select-multiple": "^2.1.0",
    "react-native-signature-capture": "^0.4.12",
    "react-native-svg": "^12.3.0",
    "react-native-tab-view": "^3.1.1",
    "react-native-toast-message": "^2.1.5",
    "react-native-vector-icons": "^9.1.0",
    "react-redux": "^7.2.6",
    "redux-devtools-extension": "^2.13.9",
    "redux-middleware-flipper": "^1.0.9",
    "redux-persist": "^6.0.0",
    "redux-thunk": "^2.4.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^2.0.0",
    "babel-jest": "^26.6.3",
    "eslint": "7.14.0",
    "jest": "^26.6.3",
    "metro-react-native-babel-preset": "^0.66.2",
    "react-devtools-core": "^4.24.5",
    "react-test-renderer": "17.0.2"
  },
  "jest": {
    "preset": "react-native"
  }
}```
Christian
  • 51
  • 7

0 Answers0