为什么我的React Native应用程序崩溃



我已经完成了我的第一个注册护士申请。我开始在一台真正的设备上构建它并进行测试。我基本上是把它插入我的mac,然后在我的iPhone上构建捆绑包。该应用程序运行良好,除非我终止应用程序,然后点击应用程序图标打开它。注意:我不是说允许应用程序在后台运行,然后按下它将其带到前台。我正在终止它,当试图运行应用程序时,它会崩溃。

我尝试了很多不同的东西,包括添加崩溃分析和注释代码,但我的JavaScript似乎不是问题。

然后我决定创建一个新的React Native项目,将其构建到我的手机上并尝试,但我也遇到了同样的问题

我觉得我错过了一些简单的东西,也许是配置什么的。

我从iPhone中取出错误日志,并将其添加到下面

任何援助都会很棒。

谢谢。

错误日志:

{"app_name":"Moder8","timestamp":"2019-02-01 19:59:32.25 -0800","app_version":"1.0","slice_uuid":"ba430d6c-eca6-39fd-b9aa-8f271bb76e8b","adam_id":0,"build_version":"1","bundleID":"net.moder8.Moder8","share_with_app_devs":false,"is_first_party":false,"bug_type":"109","os_version":"iPhone OS 12.1.3 (16D40)","incident_id":"02913BA2-3C06-45FA-AB1D-7A4A59728DC6","name":"Moder8"}
Incident Identifier: 02913BA2-3C06-45FA-AB1D-7A4A59728DC6
CrashReporter Key:   b859583602856eac3760b6c58731e74b79f3268f
Hardware Model:      iPhone11,2
Process:             Moder8 [635]
Path:                /private/var/containers/Bundle/Application/6348B6BB-E252-46A0-A494-376ECC36B8B8/Moder8.app/Moder8
Identifier:          net.moder8.Moder8
Version:             1 (1.0)
Code Type:           ARM-64 (Native)
Role:                Non UI
Parent Process:      launchd [1]
Coalition:           net.moder8.Moder8 [645]

Date/Time:           2019-02-01 19:59:32.0278 -0800
Launch Time:         2019-02-01 19:59:11.9845 -0800
OS Version:          iPhone OS 12.1.3 (16D40)
Baseband Version:    1.03.08
Report Version:      104
Exception Type:  EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d
Termination Description: SPRINGBOARD, scene-create watchdog transgression: net.moder8.Moder8 exhausted real (wall clock) time allowance of 19.95 seconds | ProcessVisibility: Foreground | ProcessState: Running | WatchdogEvent: scene-create | WatchdogVisibility: Foreground | WatchdogCPUStatistics: ( | "Elapsed total CPU time (seconds): 13.130 (user 13.130, system 0.000), 11% CPU", | "Elapsed application CPU time (seconds): 0.081, 0% CPU" | )
Triggered by Thread:  0
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x00000002336c9a78 0x2336b1000 + 100984
1   libdispatch.dylib               0x000000023354e2cc 0x233549000 + 21196
2   CFNetwork                       0x00000002341a22c8 0x2340fb000 + 684744
3   CFNetwork                       0x00000002340ff23c 0x2340fb000 + 16956
4   Moder8                          0x00000001002578d4 0x10012c000 + 1226964
5   Moder8                          0x0000000100257b84 0x10012c000 + 1227652
6   Moder8                          0x0000000100257d94 0x10012c000 + 1228180
7   Moder8                          0x0000000100257e88 0x10012c000 + 1228424
8   Moder8                          0x0000000100258028 0x10012c000 + 1228840
9   Moder8                          0x0000000100132424 0x10012c000 + 25636
10  UIKitCore                       0x000000026180ed3c 0x260ef1000 + 9559356
11  UIKitCore                       0x00000002618104e8 0x260ef1000 + 9565416
12  UIKitCore                       0x00000002618161e0 0x260ef1000 + 9589216
13  UIKitCore                       0x000000026107d51c 0x260ef1000 + 1623324
14  UIKitCore                       0x0000000261086684 0x260ef1000 + 1660548
15  UIKitCore                       0x000000026107d17c 0x260ef1000 + 1622396
16  UIKitCore                       0x000000026107db60 0x260ef1000 + 1624928
17  UIKitCore                       0x000000026107bb14 0x260ef1000 + 1616660
18  UIKitCore                       0x000000026107b7bc 0x260ef1000 + 1615804
19  UIKitCore                       0x0000000261080c0c 0x260ef1000 + 1637388
20  UIKitCore                       0x0000000261081bfc 0x260ef1000 + 1641468
21  UIKitCore                       0x0000000261080ac0 0x260ef1000 + 1637056
22  UIKitCore                       0x0000000261085ccc 0x260ef1000 + 1658060
23  UIKitCore                       0x0000000261814610 0x260ef1000 + 9582096
24  UIKitCore                       0x00000002613e3a70 0x260ef1000 + 5188208
25  FrontBoardServices              0x00000002365d2798 0x2365c5000 + 55192
26  FrontBoardServices              0x00000002365de0e8 0x2365c5000 + 102632
27  FrontBoardServices              0x00000002365dd708 0x2365c5000 + 100104
28  libdispatch.dylib               0x000000023354d134 0x233549000 + 16692
29  libdispatch.dylib               0x0000000233550728 0x233549000 + 30504
30  FrontBoardServices              0x0000000236614b08 0x2365c5000 + 326408
31  FrontBoardServices              0x0000000236614774 0x2365c5000 + 325492
32  FrontBoardServices              0x0000000236614de0 0x2365c5000 + 327136
33  CoreFoundation                  0x0000000233ad864c 0x233a28000 + 722508
34  CoreFoundation                  0x0000000233ad85c8 0x233a28000 + 722376
35  CoreFoundation                  0x0000000233ad7e80 0x233a28000 + 720512
36  CoreFoundation                  0x0000000233ad2b38 0x233a28000 + 699192
37  CoreFoundation                  0x0000000233ad2418 0x233a28000 + 697368
38  GraphicsServices                0x0000000235d86be8 0x235d7c000 + 44008
39  UIKitCore                       0x0000000261818088 0x260ef1000 + 9597064
40  Moder8                          0x0000000100132884 0x10012c000 + 26756
41  libdyld.dylib                   0x0000000233585050 0x233584000 + 4176
Thread 1:
0   libsystem_pthread.dylib         0x0000000233754dd0 0x23374b000 + 40400
Thread 2:
0   libsystem_pthread.dylib         0x0000000233754dd0 0x23374b000 + 40400
Thread 3:
0   libsystem_pthread.dylib         0x0000000233754dd0 0x23374b000 + 40400
Thread 4 name:  com.apple.uikit.eventfetch-thread
Thread 4:
0   libsystem_kernel.dylib          0x00000002336c9a3c 0x2336b1000 + 100924
1   CoreFoundation                  0x0000000233ad8018 0x233a28000 + 720920
2   CoreFoundation                  0x0000000233ad2c8c 0x233a28000 + 699532
3   CoreFoundation                  0x0000000233ad2418 0x233a28000 + 697368
4   Foundation                      0x00000002344d63e0 0x2344ce000 + 33760
5   Foundation                      0x00000002344d6284 0x2344ce000 + 33412
6   UIKitCore                       0x000000026190efc8 0x260ef1000 + 10608584
7   Foundation                      0x00000002344d4fc0 0x2344ce000 + 28608
8   Foundation                      0x0000000234611c44 0x2344ce000 + 1326148
9   libsystem_pthread.dylib         0x000000023374c974 0x23374b000 + 6516
10  libsystem_pthread.dylib         0x000000023374c8d0 0x23374b000 + 6352
11  libsystem_pthread.dylib         0x0000000233754ddc 0x23374b000 + 40412
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x000000000000000e   x1: 0x0000000000000003   x2: 0x0000000000000028   x3: 0x0000000000000030
x4: 0x0000000000000507   x5: 0x0000000000000000   x6: 0x0000000000000000   x7: 0x0000000000000300
x8: 0x0000000000000000   x9: 0x0000000080001200  x10: 0x0000000000000000  x11: 0x0000000300000003
x12: 0x00000000e187142b  x13: 0x000001a26db3dbb9  x14: 0x000000000000001d  x15: 0x000000000000011d
x16: 0xffffffffffffffdc  x17: 0x00000002648521f8  x18: 0x0000000000000000  x19: 0x0000000283095ee0
x20: 0x0000000283095ea0  x21: 0xffffffffffffffff  x22: 0x0000000264797a30  x23: 0x0000000283095ea0
x24: 0x0000000283da1400  x25: 0x0000000283095f40  x26: 0x000000016fcd13e0  x27: 0x000000016fcd13c0
x28: 0x000000016fcd13a0   fp: 0x000000016fcd1300   lr: 0x000000023354d824
sp: 0x000000016fcd12f0   pc: 0x00000002336c9a78 cpsr: 0x60000000

SPRINGBOARD, scene-create watchdog transgression

此错误意味着您的应用程序启动时间过长,因此iOS已终止您的应用程序。

您似乎正在进行开发构建,而不是分发版本,这意味着应用程序将需要运行metro bundler。如果您正在进行发行版构建,那么javascript应该绑定到应用程序中,这样它就不需要metro bundler

发展

一个可能的原因是该应用程序不再可以访问metro bundler,这意味着当你重新启动时,它会搜索bundler,但找不到它,因为你的应用程序加载时间太长(基本上没有javascript)。你需要确保你的metro bundler仍在运行,并且应用程序可以访问它。

分配

如果您正在创建发行版构建,即通过创建存档并对其进行签名(可能使用ad-hoc配置文件),则可能是因为您的应用程序中未包含javascript捆绑包。您需要仔细查看创建归档的过程,以确保它是正确的。

我认为,当你在创建一个新项目时遇到这个问题时,你的问题更有可能是应用程序无法访问metro bundler,而不是由像firebase这样的外部依赖引起的,我已经看到由于Google-Info.plist过期而导致了这样的问题。

相关内容

  • 没有找到相关文章

最新更新