我正在尝试在设备上测试iOS应用。
我已经包含了尽可能多的崩溃日志,因为Stack Overflow会让我。
仅在弹出位置权限模式时才会出现此错误。在我甚至可以选择允许或拒绝基于位置的服务之前,整个应用程序都会崩溃。
这是内置在PhoneGap中的,因此堆栈跟踪并没有真正帮助我,但我相信我已将其缩小到以下几行:
navigator.geolocation.watchPosition(updatePosition, fail, {maximumAge: 1500000, enableHighAccuracy: false, timeout: 15000});
使用以下库:
https://github.com/apache/cordova-plugin-geolocation
禁用它会导致地理定位的提示永远不会出现(可预测)并且应用永远不会崩溃。将它放在try / catch块中不会产生相同的效果 - 它仍然会与try / catch块崩溃。
我对iOS测试比较陌生 - 这可能是什么?以前我从来没有遇到过这个问题 - 它刚刚开始。
这是错误报告:
Incident Identifier: 2659EAAD-880B-43D4-8FC8-DA72A339A8FE
CrashReporter Key: 6abf4dea428e61799976d0d99f76954ba96688a6
Hardware Model: iPhone7,2
Process: AppNameHere [5003]
Path: /private/var/containers/Bundle/Application/E9BB5F67-5428-4C81-B769-218AC25F4015/AppNameHere.app/AppNameHere
Identifier: com.company.tasks
Version: 1.0.0 (1.0.0)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.company.tasks [1147]
Date/Time: 2017-08-01 20:43:50.7592 -0400
Launch Time: 2017-08-01 20:43:21.3956 -0400
OS Version: iPhone OS 10.3.3 (14G60)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Application Specific Information:
abort() called
Filtered syslog:
None found
Last Exception Backtrace:
(0x192212fe0 0x190c74538 0x192212ca8 0x1001e3ac8 0x1000cd750 0x1000dbf14 0x1000dbc1c 0x192cf0c4c 0x1921c1aa4 0x1921c17a8 0x1921c1068 0x1921bec8c 0x1920eeda4 0x193b59074 0x1983a9c9c 0x1000bc7d8 0x1910fd59c)
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x000000019120d014 0x1911ee000 + 126996
1 libsystem_pthread.dylib 0x00000001912d7264 0x1912d2000 + 21092
2 libsystem_c.dylib 0x00000001911819c4 0x191120000 + 399812
3 libc++abi.dylib 0x0000000190c4d1b0 0x190c4c000 + 4528
4 libc++abi.dylib 0x0000000190c66c04 0x190c4c000 + 109572
5 libobjc.A.dylib 0x0000000190c74820 0x190c6c000 + 34848
6 libc++abi.dylib 0x0000000190c635d4 0x190c4c000 + 95700
7 libc++abi.dylib 0x0000000190c631a8 0x190c4c000 + 94632
8 libobjc.A.dylib 0x0000000190c746f8 0x190c6c000 + 34552
9 CoreFoundation 0x00000001920eee10 0x1920e6000 + 36368
10 GraphicsServices 0x0000000193b59074 0x193b4d000 + 49268
11 UIKit 0x00000001983a9c9c 0x198335000 + 478364
12 appnamehere 0x00000001000bc7d8 0x1000b8000 + 18392
13 libdyld.dylib 0x00000001910fd59c 0x1910f9000 + 17820
Thread 1:
0 libsystem_pthread.dylib 0x00000001912d2ca8 0x1912d2000 + 3240
Thread 2:
0 libsystem_pthread.dylib 0x00000001912d2ca8 0x1912d2000 + 3240
Thread 3 name: com.apple.uikit.eventfetch-thread
Thread 3:
0 libsystem_kernel.dylib 0x00000001911ef224 0x1911ee000 + 4644
1 libsystem_kernel.dylib 0x00000001911ef09c 0x1911ee000 + 4252
2 CoreFoundation 0x00000001921c0e90 0x1920e6000 + 896656
3 CoreFoundation 0x00000001921beae4 0x1920e6000 + 887524
4 CoreFoundation 0x00000001920eeda4 0x1920e6000 + 36260
5 Foundation 0x0000000192c09db4 0x192bfd000 + 52660
6 Foundation 0x0000000192c2ab84 0x192bfd000 + 187268
7 UIKit 0x0000000198d33830 0x198335000 + 10479664
8 Foundation 0x0000000192d07318 0x192bfd000 + 1090328
9 libsystem_pthread.dylib 0x00000001912d568c 0x1912d2000 + 13964
10 libsystem_pthread.dylib 0x00000001912d559c 0x1912d2000 + 13724
11 libsystem_pthread.dylib 0x00000001912d2cb4 0x1912d2000 + 3252
Thread 4 name: com.apple.NSURLConnectionLoader
Thread 4:
0 libsystem_kernel.dylib 0x00000001911ef224 0x1911ee000 + 4644
1 libsystem_kernel.dylib 0x00000001911ef09c 0x1911ee000 + 4252
2 CoreFoundation 0x00000001921c0e90 0x1920e6000 + 896656
3 CoreFoundation 0x00000001921beae4 0x1920e6000 + 887524
4 CoreFoundation 0x00000001920eeda4 0x1920e6000 + 36260
5 CFNetwork 0x00000001928fbdf4 0x19281a000 + 925172
6 Foundation 0x0000000192d07318 0x192bfd000 + 1090328
7 libsystem_pthread.dylib 0x00000001912d568c 0x1912d2000 + 13964
8 libsystem_pthread.dylib 0x00000001912d559c 0x1912d2000 + 13724
9 libsystem_pthread.dylib 0x00000001912d2cb4 0x1912d2000 + 3252
Thread 5:
0 libsystem_kernel.dylib 0x000000019120d314 0x1911ee000 + 127764
1 libsystem_c.dylib 0x000000019112c8b0 0x191120000 + 51376
2 libc++.1.dylib 0x0000000190c3d3c4 0x190bf6000 + 291780
3 JavaScriptCore 0x0000000196aa2d2c 0x1960e9000 + 10198316
4 JavaScriptCore 0x0000000196aa1d6c 0x1960e9000 + 10194284
5 JavaScriptCore 0x0000000196aa1ba8 0x1960e9000 + 10193832
6 JavaScriptCore 0x0000000196aa1a50 0x1960e9000 + 10193488
7 JavaScriptCore 0x0000000196aa2e30 0x1960e9000 + 10198576
8 JavaScriptCore 0x0000000196aa2d5c 0x1960e9000 + 10198364
9 JavaScriptCore 0x0000000196aa300c 0x1960e9000 + 10199052
10 libsystem_pthread.dylib 0x00000001912d568c 0x1912d2000 + 13964
11 libsystem_pthread.dylib 0x00000001912d559c 0x1912d2000 + 13724
12 libsystem_pthread.dylib 0x00000001912d2cb4 0x1912d2000 + 3252
Thread 6 name: WebThread
Thread 6:
0 libsystem_kernel.dylib 0x000000019120ce64 0x1911ee000 + 126564
1 libsystem_pthread.dylib 0x00000001912d8b8c 0x1912d2000 + 27532
2 libsystem_pthread.dylib 0x00000001912d8d94 0x1912d2000 + 28052
3 WebCore 0x0000000196dc3330 0x196d7e000 + 283440
4 WebCore 0x0000000196dc3290 0x196d7e000 + 283280
5 CoreFoundation 0x00000001921c09a8 0x1920e6000 + 895400
6 CoreFoundation 0x00000001921be630 0x1920e6000 + 886320
7 CoreFoundation 0x00000001921bec18 0x1920e6000 + 887832
8 CoreFoundation 0x00000001920eeda4 0x1920e6000 + 36260
9 WebCore 0x0000000196dc0d3c 0x196d7e000 + 273724
10 libsystem_pthread.dylib 0x00000001912d568c 0x1912d2000 + 13964
11 libsystem_pthread.dylib 0x00000001912d559c 0x1912d2000 + 13724
12 libsystem_pthread.dylib 0x00000001912d2cb4 0x1912d2000 + 3252
Thread 7:
0 libsystem_kernel.dylib 0x000000019120da88 0x1911ee000 + 129672
1 libsystem_pthread.dylib 0x00000001912d2fd0 0x1912d2000 + 4048
2 libsystem_pthread.dylib 0x00000001912d2cac 0x1912d2000 + 3244
Thread 8 name: WebCore: LocalStorage
Thread 8:
0 libsystem_kernel.dylib 0x000000019120ce1c 0x1911ee000 + 126492
1 libsystem_pthread.dylib 0x00000001912d4814 0x1912d2000 + 10260
2 JavaScriptCore 0x00000001960f69a4 0x1960e9000 + 55716
3 JavaScriptCore 0x0000000196a89a68 0x1960e9000 + 10095208
4 WebKitLegacy 0x00000001980310a8 0x197f9d000 + 606376
5 WebKitLegacy 0x0000000198033d40 0x197f9d000 + 617792
6 WebKitLegacy 0x0000000198033348 0x197f9d000 + 615240
7 JavaScriptCore 0x00000001960f2f7c 0x1960e9000 + 40828
8 JavaScriptCore 0x00000001960f2e8c 0x1960e9000 + 40588
9 libsystem_pthread.dylib 0x00000001912d568c 0x1912d2000 + 13964
10 libsystem_pthread.dylib 0x00000001912d559c 0x1912d2000 + 13724
11 libsystem_pthread.dylib 0x00000001912d2cb4 0x1912d2000 + 3252
Thread 9 name: Dispatch queue: com.apple.CoreLocation.ConnectionClient.0x17013d240.events
Thread 9:
0 libsystem_kernel.dylib 0x00000001911ef278 0x1911ee000 + 4728
1 libdispatch.dylib 0x00000001910dd6b4 0x1910c9000 + 83636
2 libdispatch.dylib 0x00000001910dcc5c 0x1910c9000 + 80988
3 CoreLocation 0x000000019a489078 0x19a486000 + 12408
4 CoreLocation 0x000000019a48e118 0x19a486000 + 33048
5 CoreLocation 0x000000019a48df18 0x19a486000 + 32536
6 CoreLocation 0x000000019a4d9e88 0x19a486000 + 343688
7 CoreLocation 0x000000019a4d64f0 0x19a486000 + 328944
8 CoreLocation 0x000000019a4d6414 0x19a486000 + 328724
9 CoreLocation 0x000000019a4d7a80 0x19a486000 + 334464
10 libxpc.dylib 0x000000019130784c 0x191302000 + 22604
11 libxpc.dylib 0x0000000191305358 0x191302000 + 13144
12 libdispatch.dylib 0x00000001910caa70 0x1910c9000 + 6768
13 libdispatch.dylib 0x00000001910ce5f0 0x1910c9000 + 22000
14 libdispatch.dylib 0x00000001910d8964 0x1910c9000 + 63844
15 libdispatch.dylib 0x00000001910cda2c 0x1910c9000 + 18988
16 libdispatch.dylib 0x00000001910d8964 0x1910c9000 + 63844
17 libdispatch.dylib 0x00000001910ce2cc 0x1910c9000 + 21196
18 libdispatch.dylib 0x00000001910d8964 0x1910c9000 + 63844
19 libdispatch.dylib 0x00000001910ce2cc 0x1910c9000 + 21196
20 libdispatch.dylib 0x00000001910d9950 0x1910c9000 + 67920
21 libdispatch.dylib 0x00000001910e0170 0x1910c9000 + 94576
22 libsystem_pthread.dylib 0x00000001912d2fbc 0x1912d2000 + 4028
23 libsystem_pthread.dylib 0x00000001912d2cac 0x1912d2000 + 3244
Thread 10:
0 libsystem_pthread.dylib 0x00000001912d2ca8 0x1912d2000 + 3240
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x00000001742e4d37
x4: 0x0000000190c67b07 x5: 0x000000016fd47580 x6: 0x000000000000006e x7: 0xffffffffffffffec
x8: 0x0000000008000000 x9: 0x0000000004000000 x10: 0x000000000000000b x11: 0x000000000000000b
x12: 0x0000000000000010 x13: 0x000000019245dc0e x14: 0x0000030000000300 x15: 0x0000000000000000
x16: 0x0000000000000148 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x00000001b84ecb40 x21: 0x000000016fd47580 x22: 0x00000001b84f3bb8 x23: 0x0000000000000001
x24: 0x00000001740175b0 x25: 0x0000000000000000 x26: 0x0000000000000001 x27: 0x0000000000000000
x28: 0x000000016fd47be0 fp: 0x000000016fd474e0 lr: 0x00000001912d7264
sp: 0x000000016fd474c0 pc: 0x000000019120d014 cpsr: 0x00000000
答案 0 :(得分:0)
这不是真正解决问题的方法,但我通过升级我的PhoneGap版本以及所涉及的所有库来解决这个问题。