'IOS App Crashes with EXC_BREAKPOINT (SIGTRAP) After React Native Upgrade

We have an app built with React Native, and recently the version was upgraded to 0.67.2, including some dependencies of the package.json.

The problem is that many users started complaining about that the app crashed after this upgrade.

We have implemented Dynatrace in the app, that it helps us to monitoring the user experience and give us some feedback about the possible real time crashes. Thanks to this tool we know that the crash only happens on IOS devices, and only to the 2% or 3% of the users (hundreds of users use the app). so you can imagine the situation, at this moment this crash has been impossible to replicate by developers and QA´s, even if we try to replicate the same exactly flow that the user followed.

This is the crash that we got:

Signal: SIGTRAP
EXC_BREAKPOINT (SIGTRAP): EXC_BREAKPOINT (SIGTRAP)
JavaScriptCore
0x18f085000 + 2457076
JavaScriptCore
WTF::StringBuilder::reifyString() const + 580
JavaScriptCore
0x18f085000 + 13329104
JavaScriptCore
0x18f085000 + 13485268
JavaScriptCore
0x18f085000 + 2648464
JavaScriptCore
0x18f085000 + 2636188
JavaScriptCore
0x18f085000 + 2636188
JavaScriptCore
0x18f085000 + 2636036
JavaScriptCore
0x18f085000 + 2636188
JavaScriptCore
0x18f085000 + 2636036
JavaScriptCore
0x18f085000 + 2636188
JavaScriptCore
0x18f085000 + 2636188
JavaScriptCore
0x18f085000 + 2636036
JavaScriptCore
0x18f085000 + 2641000
JavaScriptCore
0x18f085000 + 2636188
JavaScriptCore
0x18f085000 + 2636036
JavaScriptCore
0x18f085000 + 2636036
JavaScriptCore
0x18f085000 + 2636036
JavaScriptCore
0x18f085000 + 2636036
JavaScriptCore
0x18f085000 + 2636188
JavaScriptCore
0x18f085000 + 2636036
JavaScriptCore
0x18f085000 + 2483952
JavaScriptCore
0x18f085000 + 9777056
JavaScriptCore
0x18f085000 + 12906872
JavaScriptCore
0x18f085000 + 2648464
JavaScriptCore
0x18f085000 + 2483952
JavaScriptCore
0x18f085000 + 9777056
JavaScriptCore
0x18f085000 + 12906872
JavaScriptCore
0x18f085000 + 2484380
JavaScriptCore
0x18f085000 + 9777096
JavaScriptCore
JSC::profiledCall(JSC::JSGlobalObject*, JSC::ProfilingReason, JSC::JSValue, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 156
JavaScriptCore
JSObjectCallAsFunction + 560
jsi
facebook::jsc::JSCRuntime::call(facebook::jsi::Function const&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) + 172
jsireact
facebook::react::JSIExecutor::invokeCallback(double, folly::dynamic const&) + 180
cxxreact
std::__1::__function::__func<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8, std::__1::allocator<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8>, void ()>::operator()() + 60
React
facebook::react::tryAndReturnError(std::__1::function<void ()> const&) + 32
React
facebook::react::RCTMessageThread::tryFunc(std::__1::function<void ()> const&) + 24
React
invocation function for block in facebook::react::RCTMessageThread::runAsync(std::__1::function<void ()>) + 44
CoreFoundation
0x18487f000 + 446860
CoreFoundation
0x18487f000 + 450480
CoreFoundation
0x18487f000 + 44220
CoreFoundation
CFRunLoopRunSpecific + 572
React
0x104e80000 + 104548
Foundation
0x185f8e000 + 412972
libsystem_pthread.dylib
_pthread_start + 116

And this the current dependencies of the package.json:

"dependencies": {
    "@dynatrace/react-native-plugin": "^2.217.1",
    "@emotion/core": "^11.0.0",
    "@emotion/native": "^11.0.0",
    "@emotion/react": "^11.1.1",
    "@fortawesome/fontawesome-svg-core": "^1.2.32",
    "@fortawesome/free-brands-svg-icons": "^5.15.1",
    "@fortawesome/free-regular-svg-icons": "^5.15.1",
    "@fortawesome/free-solid-svg-icons": "^5.15.1",
    "@fortawesome/react-fontawesome": "^0.1.13",
    "@herbalifedev/ncx-payment-cashregister-library": "0.0.8-beta.1",
    "@react-native-community/async-storage": "^1.12.1",
    "@react-native-community/blur": "^3.6.0",
    "@react-native-community/hooks": "^2.6.0",
    "@react-native-community/netinfo": "^5.9.9",
    "@react-native-community/progress-bar-android": "^1.0.4",
    "@react-native-community/progress-view": "^1.3.1",
    "@react-native-community/push-notification-ios": "^1.8.0",
    "@react-native-community/toolbar-android": "^0.2.1",
    "@react-native-cookies/cookies": "6.0.11",
    "@reduxjs/toolkit": "^1.5.0",
    "@svgr/cli": "^5.5.0",
    "accordion-collapse-react-native": "^0.4.0",
    "add": "2.0.6",
    "alpha-scroll-flat-list": "^0.2.20",
    "apollo-cache-inmemory": "^1.6.6",
    "apollo-client": "^2.4.12",
    "apollo-link-state": "^0.4.2",
    "appcenter": "4.4.3",
    "appcenter-analytics": "4.4.3",
    "appcenter-crashes": "4.4.3",
    "async": "^3.2.0",
    "await-timeout": "^1.1.1",
    "axios": "^0.24.0",
    "babel-plugin-inline-import": "^3.0.0",
    "base-64": "^1.0.0",
    "bind-decorator": "^1.0.11",
    "capitalize": "^2.0.3",
    "crypto-js": "3.1.9-1",
    "currency.js": "^2.0.3",
    "enzyme": "^3.11.0",
    "fbjs": "^3.0.2",
    "glamorous-native": "^2.0.0",
    "graphql": "^15.4.0",
    "graphql-tag": "^2.11.0",
    "graphql-tools": "^4.0.4",
    "immutability-helper": "^3.1.1",
    "invariant": "^2.2.4",
    "jetifier": "^1.6.6",
    "jsc-android": "^250230.2.1",
    "jsdom-global": "^3.0.2",
    "lodash": "^4.17.20",
    "lodash.debounce": "^4.0.8",
    "lottie-ios": "3.2.3",
    "lottie-react-native": "^5.0.1",
    "memoize-one": "^5.1.1",
    "moment": "^2.29.1",
    "moment-timezone": "^0.5.32",
    "node-forge": "^0.10.0",
    "numeral": "^2.0.6",
    "payform": "^1.4.0",
    "prop-types": "^15.7.2",
    "react": "17.0.2",
    "react-apollo": "^3.1.5",
    "react-art": "^17.0.1",
    "react-currency-format": "^1.0.0",
    "react-devtools": "^4.10.0",
    "react-dom": "^17.0.1",
    "react-localization": "^1.0.15",
    "react-native": "0.67.2",
    "react-native-app-intro-slider": "^2.0.1",
    "react-native-background-timer": "^2.4.1",
    "react-native-blob-util": "^0.15.0",
    "react-native-calendars": "^1.1266.0",
    "react-native-camera": "^3.42.0",
    "react-native-circular-progress": "^1.3.6",
    "react-native-code-push": "7.0.4",
    "react-native-country-picker-modal": "^2.0.0",
    "react-native-datepicker": "^1.7.2",
    "react-native-debugger": "^1.1.0",
    "react-native-device-info": "7.3.1",
    "react-native-draggable-flatlist": "^2.5.1",
    "react-native-event-bus": "^1.0.0",
    "react-native-event-listeners": "^1.0.7",
    "react-native-exception-handler": "^2.10.9",
    "react-native-exit-app": "^1.1.0",
    "react-native-fast-image": "^8.5.11",
    "react-native-flags": "^1.0.0",
    "react-native-fs": "^2.16.6",
    "react-native-gesture-handler": "^1.6.1",
    "react-native-get-location": "^2.1.1",
    "react-native-html-to-pdf": "^0.8.0",
    "react-native-htmlview": "^0.16.0",
    "react-native-indicators": "^0.17.0",
    "react-native-keyboard-aware-scroll-view": "^0.9.3",
    "react-native-keyboard-spacer": "^0.4.1",
    "react-native-keychain": "^6.2.0",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-localization": "^2.1.6",
    "react-native-mail": "^4.1.0",
    "react-native-material-textfield": "^0.16.1",
    "react-native-material-textfield-gm": "^0.0.5",
    "react-native-materialui-textfield": "^0.13.2",
    "react-native-modal": "^13.0.0",
    "react-native-orientation": "^3.1.3",
    "react-native-pdf": "^6.5.0",
    "react-native-permissions": "3.2.0",
    "react-native-picker-select": "^8.0.4",
    "react-native-popup-menu": "^0.15.11",
    "react-native-print": "^0.7.0",
    "react-native-progress": "5.0.0",
    "react-native-push-notification": "^7.3.1",
    "react-native-reanimated": "^1.13.2",
    "react-native-restart": "^0.0.17",
    "react-native-safe-area-context": "^3.1.9",
    "react-native-safe-area-view": "^1.1.1",
    "react-native-section-list-get-item-layout": "^2.2.3",
    "react-native-sfsafariviewcontroller": "^0.2.6",
    "react-native-share": "^5.1.1",
    "react-native-simple-radio-button": "^2.7.4",
    "react-native-smooth-pincode-input": "^1.0.9",
    "react-native-sqlite-storage": "^5.0.0",
    "react-native-super-grid": "^4.0.3",
    "react-native-svg": "12.1.0",
    "react-native-swipeout": "^2.3.6",
    "react-native-switch": "^1.5.1",
    "react-native-tab-view": "^2.15.2",
    "react-native-table-component": "^1.2.1",
    "react-native-toast-message": "^1.4.9",
    "react-native-uuid": "^2.0.1",
    "react-native-vector-icons": "9.1.0",
    "react-native-vitals": "^2.0.1",
    "react-native-webview": "11.14.3",
    "react-native-xml2js": "^1.0.3",
    "react-redux": "^7.2.2",
    "react-router": "4.3.1",
    "react-router-native": "5.2.1",
    "react-router-native-stack": "^0.0.15",
    "react-timer-mixin": "^0.13.4",
    "react-xml-parser": "^1.1.8",
    "realm": "10.9.0",
    "recyclerlistview": "^3.0.0",
    "rn-fetch-blob": "^0.12.0",
    "shortid": "^2.2.16",
    "styled-components": "^5.2.1",
    "tty": "^1.0.1",
    "watchman": "^1.0.0",
    "yarn": "1.22.17"
  }

If any one has an idea what is this crash about or some a clue that help me to continue looking for the specific root issue, I would really appreciate it a lot.

Thanks!!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source