onfido-ios-sdk
onfido-ios-sdk copied to clipboard
NSInvalidArgumentException on -[AVCaptureSession addInput:]
What was the expected behaviour?
The Onfido library shouldn't crash.
What happened instead?
It crashed with the following exception:
NSInvalidArgumentException
*** -[AVCaptureSession addInput:] Can't add <AVCaptureDeviceInput: 0x282722b80 [Frontkamera]> because the device does not support AVCaptureSessionPresetHigh - Use -[AVCaptureDevice supportsAVCaptureSessionPreset:]
And the following crash log:
OS Version: iOS 14.4 (18D52)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Crashed Thread: 0
Application Specific Information:
*** -[AVCaptureSession addInput:] Can't add <AVCaptureDeviceInput: 0x282722b80 [Frontkamera]> because the device does not support AVCaptureSessionPresetHigh - Use -[AVCaptureDevice supportsAVCaptureSessionPreset:]
Thread 0 Crashed:
0 CoreFoundation 0x33c71a9d8 <redacted>
1 libobjc.A.dylib 0x384f00b54 objc_exception_throw
2 AVFCapture 0x35a0d9d98 <redacted>
3 Onfido 0x106555c84 __swift_memcpy17_8
4 Onfido 0x106555954 __swift_memcpy17_8
5 Onfido 0x10655b8c4 __swift_memcpy17_8
6 Onfido 0x1065462e4 block_destroy_helper
7 Onfido 0x106548da4 block_destroy_helper
8 Onfido 0x10654607c block_destroy_helper
9 Onfido 0x1065f1fb0 block_destroy_helper
10 Onfido 0x1065f1e7c block_destroy_helper
11 Onfido 0x1065f209c block_destroy_helper
12 UIKitCore 0x332c91e50 <redacted>
13 UIKitCore 0x332c96408 <redacted>
14 UIKitCore 0x332c967e8 <redacted>
15 UIKitCore 0x332bca738 <redacted>
16 UIKitCore 0x332bdebb0 <redacted>
17 UIKitCore 0x332bdffe0 <redacted>
18 UIKitCore 0x332bc2e78 <redacted>
19 UIKitCore 0x333861398 <redacted>
20 QuartzCore 0x333607df4 <redacted>
21 QuartzCore 0x33360e398 <redacted>
22 QuartzCore 0x3336196e8 <redacted>
23 QuartzCore 0x333564d7c <redacted>
24 QuartzCore 0x33358ef40 <redacted>
25 QuartzCore 0x3335901f0 <redacted>
26 CoreFoundation 0x33c69987c <redacted>
27 CoreFoundation 0x33c693f50 <redacted>
28 CoreFoundation 0x33c694498 <redacted>
29 CoreFoundation 0x33c693ba0 CFRunLoopRunSpecific
30 GraphicsServices 0x3733c5598 GSEventRunModal
31 UIKitCore 0x3333572f4 <redacted>
32 UIKitCore 0x33335c874 UIApplicationMain
33 bunq 0x20541ac30 main (main.m:17)
34 libdyld.dylib 0x34ae0f568 <redacted>
Thread 0 Crashed:
0 CoreFoundation 0x33c71a9d8 <redacted>
1 libobjc.A.dylib 0x384f00b54 objc_exception_throw
2 AVFCapture 0x35a0d9d98 <redacted>
3 Onfido 0x106555c84 __swift_memcpy17_8
4 Onfido 0x106555954 __swift_memcpy17_8
5 Onfido 0x10655b8c4 __swift_memcpy17_8
6 Onfido 0x1065462e4 block_destroy_helper
7 Onfido 0x106548da4 block_destroy_helper
8 Onfido 0x10654607c block_destroy_helper
9 Onfido 0x1065f1fb0 block_destroy_helper
10 Onfido 0x1065f1e7c block_destroy_helper
11 Onfido 0x1065f209c block_destroy_helper
12 UIKitCore 0x332c91e50 <redacted>
13 UIKitCore 0x332c96408 <redacted>
14 UIKitCore 0x332c967e8 <redacted>
15 UIKitCore 0x332bca738 <redacted>
16 UIKitCore 0x332bdebb0 <redacted>
17 UIKitCore 0x332bdffe0 <redacted>
18 UIKitCore 0x332bc2e78 <redacted>
19 UIKitCore 0x333861398 <redacted>
20 QuartzCore 0x333607df4 <redacted>
21 QuartzCore 0x33360e398 <redacted>
22 QuartzCore 0x3336196e8 <redacted>
23 QuartzCore 0x333564d7c <redacted>
24 QuartzCore 0x33358ef40 <redacted>
25 QuartzCore 0x3335901f0 <redacted>
26 CoreFoundation 0x33c69987c <redacted>
27 CoreFoundation 0x33c693f50 <redacted>
28 CoreFoundation 0x33c694498 <redacted>
29 CoreFoundation 0x33c693ba0 CFRunLoopRunSpecific
30 GraphicsServices 0x3733c5598 GSEventRunModal
31 UIKitCore 0x3333572f4 <redacted>
32 UIKitCore 0x33335c874 UIApplicationMain
33 bunq 0x20541ac30 main (main.m:17)
34 libdyld.dylib 0x34ae0f568 <redacted>
Thread 1 name: com.apple.uikit.eventfetch-thread
0 libsystem_kernel.dylib 0x370eab644 mach_msg_trap
1 libsystem_kernel.dylib 0x370eaaa48 mach_msg
2 CoreFoundation 0x33c69a0fc <redacted>
3 CoreFoundation 0x33c694570 <redacted>
4 CoreFoundation 0x33c693ba0 CFRunLoopRunSpecific
5 Foundation 0x3294197f8 <redacted>
6 Foundation 0x3294196d8 <redacted>
7 UIKitCore 0x333403054 <redacted>
8 Foundation 0x3295764bc <redacted>
9 libsystem_pthread.dylib 0x3a6a93c9c _pthread_start
Thread 2
0 libsystem_kernel.dylib 0x370ecebf0 __semwait_signal
1 libsystem_c.dylib 0x37963c6d4 nanosleep
2 libsystem_c.dylib 0x37963c4d4 sleep
3 Sentry 0x1062679b8 monitorCachedData
4 libsystem_pthread.dylib 0x3a6a93c9c _pthread_start
Thread 3 name: SentryCrash Exception Handler (Secondary)
0 libsystem_kernel.dylib 0x370eab644 mach_msg_trap
1 libsystem_kernel.dylib 0x370eaaa48 mach_msg
2 libsystem_kernel.dylib 0x370ec851c thread_suspend
3 Sentry 0x10625e67c handleExceptions
4 libsystem_pthread.dylib 0x3a6a93c9c _pthread_start
Thread 4 name: SentryCrash Exception Handler (Primary)
0 libsystem_kernel.dylib 0x370eab644 mach_msg_trap
1 libsystem_kernel.dylib 0x370eaaa48 mach_msg
2 Sentry 0x10625e6a8 handleExceptions
3 libsystem_pthread.dylib 0x3a6a93c9c _pthread_start
Thread 5 name: com.apple.NSURLConnectionLoader
0 libsystem_kernel.dylib 0x370eab644 mach_msg_trap
1 libsystem_kernel.dylib 0x370eaaa48 mach_msg
2 CoreFoundation 0x33c69a0fc <redacted>
3 CoreFoundation 0x33c694570 <redacted>
4 CoreFoundation 0x33c693ba0 CFRunLoopRunSpecific
5 CFNetwork 0x32917e4b0 _CFURLStorageSessionCopyCache
6 Foundation 0x3295764bc <redacted>
7 libsystem_pthread.dylib 0x3a6a93c9c _pthread_start
Thread 6 name: AVAudioSession Notify Thread
0 libsystem_kernel.dylib 0x370eab644 mach_msg_trap
1 libsystem_kernel.dylib 0x370eaaa48 mach_msg
2 CoreFoundation 0x33c69a0fc <redacted>
3 CoreFoundation 0x33c694570 <redacted>
4 CoreFoundation 0x33c693ba0 CFRunLoopRunSpecific
5 AudioSession 0x3481e7098 <redacted>
6 AudioSession 0x3481e8ff8 <redacted>
7 libsystem_pthread.dylib 0x3a6a93c9c _pthread_start
Thread 7
0 libsystem_kernel.dylib 0x370ecf48c __workq_kernreturn
1 libsystem_pthread.dylib 0x3a6a955f0 _pthread_wqthread
Thread 8
0 libsystem_pthread.dylib 0x3a6a9886c <redacted>
Thread 9
0 libsystem_pthread.dylib 0x3a6a9886c <redacted>
Thread 10 name: com.apple.CoreMotion.MotionThread
0 libsystem_kernel.dylib 0x370eab644 mach_msg_trap
1 libsystem_kernel.dylib 0x370eaaa48 mach_msg
2 CoreFoundation 0x33c69a0fc <redacted>
3 CoreFoundation 0x33c694570 <redacted>
4 CoreFoundation 0x33c693ba0 CFRunLoopRunSpecific
5 CoreFoundation 0x33c694c60 CFRunLoopRun
6 CoreMotion 0x347183d68 CLClientCreateIso6709Notation
7 libsystem_pthread.dylib 0x3a6a93c9c _pthread_start
Thread 11
0 SegmentAnalytics 0x2cf51927c -[SessionMetadata toDictionaryForEvent:]
1 SegmentAnalytics 0x2cf4da3dc __29-[Mixpanel track:properties:]_block_invoke
2 libdispatch.dylib 0x1a7b65298 <redacted>
3 libdispatch.dylib 0x1a7b66280 <redacted>
4 libdispatch.dylib 0x1a7b0edcc <redacted>
5 libdispatch.dylib 0x1a7b0f8a8 <redacted>
6 libdispatch.dylib 0x1a7b19338 <redacted>
7 libsystem_pthread.dylib 0x3a6a955a4 _pthread_wqthread
EOF
Version info:
- Cocoapods (if applicable): N/A
- Onfido SDK (Debug/Release): 20.0.1 (Release)
- iOS: 14.4 / 13.5.1
- Xcode: 12.4
- Device/Simulator: iPhone 7
- Device/Simulator language: Unknown
Integration configuration:
The only change we're doing out of the ordinary is using a custom strings
file:
[configBuilder withCustomLocalizationWithTableName:@"Onfido"];
Steps to reproduce:
Couldn't reproduce internally. This is a crash out from one of our users.