在 ios 模拟器上构建的 Expo-dev-client EAS 在打开时立即崩溃

问题描述 投票:0回答:1

我正在构建一个 expo 应用程序,并尝试将 expo-dev-client 与 eas build 一起使用。当我在 ios 模拟器上使用 eas build 打开应用程序时,应用程序在项目打开后立即崩溃。我已附上苹果的错误日志、eas.json 和我的依赖项。

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Incident Identifier: EA27B8E3-458F-4B45-A90E-D74F34F761D0
CrashReporter Key:   EA2196FB-0472-2775-2FE6-6A6F48C15F3F
Hardware Model:      MacBookPro16,3
Process:             globalPuzzle [54390]
Path:                /Users/USER/Library/Developer/CoreSimulator/Devices/96E7EA7F-1EC1-4ADE-B9D4-E6DFA6236892/data/Containers/Bundle/Application/C64DD523-AB75-4717-9610-9D5AFEB95C64/globalPuzzle.app/globalPuzzle
Identifier:          com.itayglobal.globalPuzzle
Version:             1.0.0 (1)
Code Type:           X86-64 (Native)
Role:                Foreground
Parent Process:      launchd_sim [53340]
Coalition:           com.apple.CoreSimulator.SimDevice.96E7EA7F-1EC1-4ADE-B9D4-E6DFA6236892 [41593]
Responsible Process: SimulatorTrampoline [928]

Date/Time:           2023-05-18 18:55:31.0851 -0500
Launch Time:         2023-05-18 18:55:23.4758 -0500
OS Version:          macOS 13.3.1 (22E772610a)
Release Type:        User
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread:  0

Last Exception Backtrace:
0   CoreFoundation                      0x7ff80045477b __exceptionPreprocess + 226
1   libobjc.A.dylib                     0x7ff80004db73 objc_exception_throw + 48
2   Foundation                          0x7ff800b42f64 _userInfoForFileAndLine + 0
3   globalPuzzle                           0x10906aa97 -[RNHomeIndicator getHomeIndicatorViewController] + 311
4   globalPuzzle                           0x10906a908 -[RNHomeIndicator setPrefersAutoHidden:] + 40
5   globalPuzzle                           0x10906a883 -[RNHomeIndicator init] + 35
6   globalPuzzle                           0x108afe274 __115-[RCTModuleData initWithModuleClass:bridge:moduleRegistry:viewRegistry_DEPRECATED:bundleManager:callableJSModules:]_block_invoke + 36
7   globalPuzzle                           0x108afef11 -[RCTModuleData setUpInstanceAndBridge:] + 1553
8   globalPuzzle                           0x108b0156a __25-[RCTModuleData instance]_block_invoke + 42
9   globalPuzzle                           0x108b77298 RCTUnsafeExecuteOnMainQueueSync + 56
10  globalPuzzle                           0x108b010e2 -[RCTModuleData instance] + 962
11  globalPuzzle                           0x108a9cf58 __49-[RCTCxxBridge _prepareModulesWithDispatchGroup:]_block_invoke + 184
12  libdispatch.dylib                   0x7ff80013be40 _dispatch_call_block_and_release + 12
13  libdispatch.dylib                   0x7ff80013d0d9 _dispatch_client_callout + 8
14  libdispatch.dylib                   0x7ff80014cc32 _dispatch_main_queue_drain + 1502
15  libdispatch.dylib                   0x7ff80014c646 _dispatch_main_queue_callback_4CF + 31
16  CoreFoundation                      0x7ff8003b26cc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
17  CoreFoundation                      0x7ff8003acfbe __CFRunLoopRun + 2429
18  CoreFoundation                      0x7ff8003ac264 CFRunLoopRunSpecific + 560
19  GraphicsServices                    0x7ff809b4024e GSEventRunModal + 139
20  UIKitCore                              0x1197b57bf -[UIApplication _run] + 994
21  UIKitCore                              0x1197ba5de UIApplicationMain + 123
22  globalPuzzle                           0x1087c5ad0 main + 96
23  dyld_sim                               0x10b682384 start_sim + 10
24  dyld                                   0x11247f41f start + 1903

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib              0x7ff8376f41f2 __pthread_kill + 10
1   libsystem_pthread.dylib             0x7ff83774cee6 pthread_kill + 263
2   libsystem_c.dylib                   0x7ff800131e58 abort + 130
3   libc++abi.dylib                     0x7ff80025a5f2 abort_message + 241
4   libc++abi.dylib                     0x7ff80024c7cb demangling_terminate_handler() + 267
5   libobjc.A.dylib                     0x7ff800032182 _objc_terminate() + 96
6   libc++abi.dylib                     0x7ff800259a4b std::__terminate(void (*)()) + 6
7   libc++abi.dylib                     0x7ff800259a06 std::terminate() + 54
8   libdispatch.dylib                   0x7ff80013d0ed _dispatch_client_callout + 28
9   libdispatch.dylib                   0x7ff80014cc32 _dispatch_main_queue_drain + 1502
10  libdispatch.dylib                   0x7ff80014c646 _dispatch_main_queue_callback_4CF + 31
11  CoreFoundation                      0x7ff8003b26cc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
12  CoreFoundation                      0x7ff8003acfbe __CFRunLoopRun + 2429
13  CoreFoundation                      0x7ff8003ac264 CFRunLoopRunSpecific + 560
14  GraphicsServices                    0x7ff809b4024e GSEventRunModal + 139
15  UIKitCore                              0x1197b57bf -[UIApplication _run] + 994
16  UIKitCore                              0x1197ba5de UIApplicationMain + 123
17  globalPuzzle                           0x1087c5ad0 main + 96
18  dyld_sim                               0x10b682384 start_sim + 10
19  dyld                                   0x11247f41f start + 1903

Thread 1:
0   libsystem_pthread.dylib             0x7ff837748bb0 start_wqthread + 0

Thread 2::  Dispatch queue: com.apple.cfnetwork.ats.metrics
0   libsystem_kernel.dylib              0x7ff8376ed5b2 mach_msg2_trap + 10
1   libsystem_kernel.dylib              0x7ff8376fb72d mach_msg2_internal + 78
2   libsystem_kernel.dylib              0x7ff8376f45e4 mach_msg_overwrite + 692
3   libsystem_kernel.dylib              0x7ff8376ed89a mach_msg + 19
4   libdispatch.dylib                   0x7ff800159fbc _dispatch_mach_send_and_wait_for_reply + 574
5   libdispatch.dylib                   0x7ff80015a3be dispatch_mach_send_with_result_and_wait_for_reply + 55
6   libxpc.dylib                        0x7ff800084e6a xpc_connection_send_message_with_reply_sync + 219
7   Security                            0x7ff8018ef274 securityd_message_with_reply_sync + 102
8   Security                            0x7ff8018f01f5 securityd_send_sync_and_do + 68
9   Security                            0x7ff8019cf339 SecTrustReportNetworkingAnalytics + 480
10  CFNetwork                           0x7ff80426e9b8 0x7ff8040f8000 + 1534392
11  libdispatch.dylib                   0x7ff80013be40 _dispatch_call_block_and_release + 12
12  libdispatch.dylib                   0x7ff80013d0d9 _dispatch_client_callout + 8
13  libdispatch.dylib                   0x7ff800144b23 _dispatch_lane_serial_drain + 1008
14  libdispatch.dylib                   0x7ff800145826 _dispatch_lane_invoke + 455
15  libdispatch.dylib                   0x7ff800152475 _dispatch_workloop_worker_thread + 873
16  libsystem_pthread.dylib             0x7ff837749c55 _pthread_wqthread + 327
17  libsystem_pthread.dylib             0x7ff837748bbf start_wqthread + 15

eas.json

{
  "cli": {
    "version": ">= 3.1.0"
  },
  "build": {
    "development-simulator": {
      "developmentClient": true,
      "distribution": "internal",
      "ios": {
        "simulator": true
      }
    }
  },
  "submit": {
    "production": {}
  }
}

依赖关系

"dependencies": {
    "@babel/preset-env": "^7.1.6",
    "@react-native-async-storage/async-storage": "1.17.11",
    "@react-navigation/native": "^6.1.6",
    "@react-navigation/native-stack": "^6.9.12",
    "emoji-utils": "^1.0.1",
    "expo": "~48.0.4",
    "expo-dev-client": "~2.2.1",
    "expo-haptics": "~12.2.1",
    "expo-image-picker": "~14.1.1",
    "expo-linear-gradient": "~12.1.2",
    "expo-notifications": "~0.18.1",
    "expo-status-bar": "~1.4.4",
    "immer": "^10.0.0",
    "react": "18.2.0",
    "react-native": "0.71.8",
    "react-native-home-indicator": "^0.2.10",
    "react-native-round-flags": "^1.0.4",
    "react-native-safe-area-context": "4.5.0",
    "react-native-screens": "~3.20.0",
    "react-native-webview": "11.26.0",
    "tinycolor2": "^1.6.0"
  },

以这种方式使用 eas-build 和 dev-client 对我的应用程序非常重要,所以请问我如何解决这个问题并在我的模拟器上使用 eas-build 和 expo-dev-client 而不会崩溃?

*另外:如果它在模拟器上崩溃是否意味着它也会在设备上崩溃?

expo crash ios-simulator eas expo-dev-client
1个回答
0
投票

尝试在 Xcode 中模拟时将 Run 从 Release 模式更改为 Debug 模式。 转到“产品”->“方案”-“编辑方案”,然后将“运行”更改为“调试”模式。 我有与你完全相同的崩溃报告。 但是我的在调试模式下工作,但在发布模式下不起作用。 我的问题是当你转到下一页时它崩溃了。基本上在 React Navigation 中。

© www.soinside.com 2019 - 2024. All rights reserved.