React Native iOS build release: RangeError: 超出最大调用堆栈大小



我使用的是 react native 0.62.3,昨天一切正常。

  • 安装 react-native-stripe-terminal 软件包后,我恢复了所有内容,删除了node_modules、Pods 文件夹,重新安装并使用发布方案构建到我的 iOS 设备。
  • 该应用程序已安装,但在加载 Metro 捆绑包之前在启动屏幕上崩溃。
  • 我试图签出以前的稳定提交,但出现相同的错误。
  • 我尝试在 3 个 mac 设备中使用发布方案进行构建,但出现相同的错误(调试模式没有任何限制)。

谁能帮助我知道我的项目发生了什么或有同样的错误或哪个包导致问题?谢谢!

这是我的软件包列表:

"dependencies": {
"@dooboo-ui/native-switch-toggle": "^0.3.3",
"@react-native-async-storage/async-storage": "^1.15.5",
"@react-native-community/clipboard": "^1.2.2",
"@react-native-community/datetimepicker": "^2.1.0",
"@react-native-community/geolocation": "^2.0.2",
"@react-native-community/netinfo": "6.0.0",
"@react-native-community/push-notification-ios": "^1.8.0",
"@react-native-community/viewpager": "^4.0.1",
"@react-native-firebase/app": "^12.4.0",
"@react-native-firebase/auth": "^12.7.3",
"@react-native-firebase/crashlytics": "^12.4.0",
"@react-native-firebase/firestore": "^12.4.0",
"@react-native-firebase/messaging": "^12.4.0",
"@react-native-mapbox-gl/maps": "^8.2.1",
"appcenter": "4.0.0",
"appcenter-analytics": "4.0.0",
"appcenter-crashes": "4.0.0",
"axios": "^0.21.1",
"base-64": "^0.1.0",
"buffer": "^6.0.3",
"card-validator": "^6.2.0",
"dayjs": "^1.10.6",
"emoji-datasource": "^6.0.0",
"engine.io-client": "3.4.4",
"html-entities": "^1.3.1",
"lodash": "^4.17.15",
"lodash.compact": "^3.0.1",
"lodash.every": "^4.6.0",
"lodash.pick": "^4.4.0",
"lodash.values": "^4.3.0",
"moment": "^2.24.0",
"prop-types": "^15.7.2",
"react": "16.11.0",
"react-native": "0.62.3",
"react-native-autoheight-webview": "^1.5.8",
"react-native-background-timer": "^2.4.0",
"react-native-big-calendar": "^0.1.32",
"react-native-calendar-picker": "^6.1.2",
"react-native-calendars": "^1.260.0",
"react-native-camera": "^4.0.0",
"react-native-cardview": "^2.0.5",
"react-native-code-push": "^7.0.4",
"react-native-device-info": "^8.1.3",
"react-native-document-picker": "^4.1.0",
"react-native-elements": "^1.2.1",
"react-native-fast-image": "^8.3.4",
"react-native-file-viewer": "^2.0.0",
"react-native-fontawesome": "^5.7.0",
"react-native-fs": "2.15.2",
"react-native-geolocation-service": "^5.3.0-beta.3",
"react-native-gesture-handler": "^1.4.1",
"react-native-gps-state": "^2.0.3",
"react-native-highlight-words": "^1.0.1",
"react-native-hyperlink": "^0.0.19",
"react-native-i18n": "^2.0.15",
"react-native-image-crop-picker": "^0.25.3",
"react-native-image-pan-zoom": "^2.1.12",
"react-native-image-picker": "^1.1.0",
"react-native-intercom": "13.2.0",
"react-native-linear-gradient": "^2.5.6",
"react-native-media-controls": "^2.2.0",
"react-native-mixpanel": "^1.2.5",
"react-native-modal": "^11.5.6",
"react-native-modalbox": "^2.0.2",
"react-native-orientation-locker": "^1.3.1",
"react-native-permissions": "^2.1.1",
"react-native-popup-menu": "^0.15.9",
"react-native-progress": "^5.0.0",
"react-native-push-notification": "^7.4.0",
"react-native-qrcode-scanner": "^1.5.4",
"react-native-raw-bottom-sheet": "^2.0.2",
"react-native-reanimated": "^1.4.0",
"react-native-responsive-screen": "^1.2.2",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "^2.8.0",
"react-native-signature-capture": "^0.4.10",
"react-native-signature-pad": "^0.1.0",
"react-native-slider": "^0.11.0",
"react-native-splash-screen": "^3.2.0",
"react-native-square-in-app-payments": "^1.5.0",
"react-native-svg": "^9.13.3",
"react-native-svg-transformer": "^0.14.2",
"react-native-swipe-list-view": "^3.1.0",
"react-native-vector-icons": "^7.1.0",
"react-native-video": "^5.1.1",
"react-native-view-overflow": "0.0.4",
"react-native-webview": "11.4.4",
"react-navigation": "^3.12.1",
"react-navigation-animated-switch": "^0.4.1",
"react-redux": "^7.1.1",
"reanimated-bottom-sheet": "^1.0.0-alpha.20",
"redux": "^4.0.4",
"redux-saga": "^1.1.3",
"socket.io-client": "2.4.0",
"tipsi-stripe": "^7.5.3"
},
"devDependencies": {
"@babel/core": "7.6.2",
"@babel/runtime": "7.6.2",
"@react-native-community/eslint-config": "0.0.3",
"babel-jest": "^24.9.0",
"babel-plugin-module-resolver": "^4.0.0",
"babel-plugin-transform-remove-console": "^6.9.4",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
"eslint": "^6.5.1",
"eslint-config-prettier": "^6.10.1",
"eslint-config-standard": "^14.1.1",
"eslint-import-resolver-babel-module": "^5.1.2",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^4.0.4",
"eslint-plugin-react-native": "^3.8.1",
"eslint-plugin-standard": "^4.0.1",
"jest": "^24.9.0",
"jetifier": "^1.6.4",
"metro-react-native-babel-preset": "^0.58.0",
"prettier": "^2.0.4",
"react-test-renderer": "16.11.0"
},
"jest": {
"preset": "react-native",
"setupFiles": [
"./path/to/jestSetupFile.js"
]
}

Xcode 控制台显示此内容

objc[35818]: Class MGLFaux3DUserLocationAnnotationView is implemented in both /private/var/containers/Bundle/Application/9F15A17B-0A62-4055-80B0-24F845FC70CC/MyApp.app/Frameworks/Mapbox.framework/Mapbox (0x109927f90) and /private/var/containers/Bundle/Application/9F15A17B-0A62-4055-80B0-24F845FC70CC/MyApp.app/MyApp (0x103aa7068). One of the two will be used. Which one is undefined.
objc[35818]: Class MGLUserLocationHeadingArrowLayer is implemented in both /private/var/containers/Bundle/Application/9F15A17B-0A62-4055-80B0-24F845FC70CC/MyApp.app/Frameworks/Mapbox.framework/Mapbox (0x109928620) and /private/var/containers/Bundle/Application/9F15A17B-0A62-4055-80B0-24F845FC70CC/MyApp.app/MyApp (0x103aa71a8). One of the two will be used. Which one is undefined.
objc[35818]: Class MGLUserLocationHeadingBeamLayer is implemented in both /private/var/containers/Bundle/Application/9F15A17B-0A62-4055-80B0-24F845FC70CC/MyApp.app/Frameworks/Mapbox.framework/Mapbox (0x109929520) and /private/var/containers/Bundle/Application/9F15A17B-0A62-4055-80B0-24F845FC70CC/MyApp.app/MyApp (0x103aa71f8). One of the two will be used. Which one is undefined.
2021-12-17 14:08:04.728837+0700 MyApp[35818:1435990] 8.0.0 - [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add `[FIRApp configure];` (`FirebaseApp.configure()` in Swift) to your application initialization. Read more.
2021-12-17 14:08:04.729565+0700 MyApp[35818:1435808] [Firebase/Crashlytics] Version 8.0.0
2021-12-17 14:08:04.913803+0700 MyApp[35818:1435808] [AppCenterCrashes] WARNING: -[MSACCrashes configureCrashReporterWithUncaughtExceptionHandlerEnabled:]/731 Detecting crashes is NOT enabled due to running the app with a debugger attached.
2021-12-17 14:08:04.933688+0700 MyApp[35818:1435808] 
[CodePush] Loading JS bundle from file:///private/var/containers/Bundle/Application/9F15A17B-0A62-4055-80B0-24F845FC70CC/MyApp.app/main.jsbundle
2021-12-17 14:08:05.148221+0700 MyApp[35818:1436001] 8.0.0 - [Firebase/Messaging][I-FCM001000] FIRMessaging Remote Notifications proxy enabled, will swizzle remote notification receiver handlers. If you'd prefer to manually integrate Firebase Messaging, add "FirebaseAppDelegateProxyEnabled" to your Info.plist, and set it to NO. Follow the instructions at:
firebase/ios/client#method_swizzling_in_firebase_messaging
to ensure proper integration.
2021-12-17 14:08:05.149318+0700 MyApp[35818:1436001] 8.0.0 - [Firebase/Messaging][I-FCM002022] APNS device token not set before retrieving FCM Token for Sender ID '126625914542'. Notifications to this FCM Token will not be delivered over APNS.Be sure to re-retrieve the FCM token once the APNS device token is set.
2021-12-17 14:08:05.175 [error][tid:com.facebook.react.JavaScript] RangeError: Maximum call stack size exceeded.
2021-12-17 14:08:05.178 [error][tid:com.facebook.react.JavaScript] Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
2021-12-17 14:08:05.188 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: RangeError: Maximum call stack size exceeded.
2021-12-17 14:08:05.189107+0700 MyApp[35818:1435997] *** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: RangeError: Maximum call stack size exceeded.', reason: 'Unhandled JS Exception: RangeError: Maximum call stack size exceeded., stack:
<unknown>@(null):(null)
v@2:1267
<unknown>@454.js:1:101
v@2:1473
<unknown>@453.js:1:127
v@2:1473
<unknown>@439.js:1:140
v@2:1473
<unknown>@405.js:1:650
v@2:1473
<unknown>@1.js:1:57
v@2:1473
d@2:875
global code@7:3
'
*** First throw call stack:
(0x181cf5c9c 0x198ea9758 0x102f365ec 0x102fb0bd0 0x102fb14f8 0x181c848d0 0x181ca05a8 0x181cd480c 0x102f650d4 0x102f67280 0x102f66ff0 0x1050e0718 0x1050e1f94 0x1050e9150 0x1050e9dd4 0x1050f54e8 0x1dbcc1e84 0x1dbcc19f0)
libc++abi: terminating with uncaught exception of type NSException
dyld4 config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/GPUTools.framework/libglInterpose.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
*** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: RangeError: Maximum call stack size exceeded.', reason: 'Unhandled JS Exception: RangeError: Maximum call stack size exceeded., stack:
<unknown>@(null):(null)
v@2:1267
<unknown>@454.js:1:101
v@2:1473
<unknown>@453.js:1:127
v@2:1473
<unknown>@439.js:1:140
v@2:1473
<unknown>@405.js:1:650
v@2:1473
<unknown>@1.js:1:57
v@2:1473
d@2:875
global code@7:3
'
terminating with uncaught exception of type NSException
(lldb) 

截图

我在安装"@react-本机异步存储/异步存储"后立即开始遇到此问题,我看到您也有这个包

我不能保证这会解决您的问题,但它可能会有所帮助。

由于您删除了所有内容,因此可能需要重新安装软件包。

为此,请尝试以下操作:

在终端中,在项目的根目录中,运行npm iyarn.然后

cd ios

pod install.

然后在 XCode 中打开 xcworkspace 并按 Command-Shift-K 进行完全清理。

然后,您可以再次运行 iOS 构建任务,看看它是否有效。

最新更新