1

My project constantly reporting crash on fabrics. Here is the error log:

Fatal Exception: NSInternalInconsistencyException
0  CoreFoundation                 0x20a2a3518 __exceptionPreprocess
1  libobjc.A.dylib                0x20947e9f8 objc_exception_throw
2  CoreFoundation                 0x20a1bd148 +[_CFXNotificationTokenRegistration keyCallbacks]
3  Foundation                     0x20ac801c8 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
4  myApp                       0x100da8b64 -[KeychainItemWrapper writeToKeychain] + 315 (KeychainItemWrapper.m:315)
5  myApp                       0x100da7f40 -[KeychainItemWrapper setObject:forKey:] + 185 (KeychainItemWrapper.m:185)
6  myApp                       0x100e8f940 static Functions.getUUIDString() + 117 (Functions.swift:117)
7  myApp                       0x100edc844 WebServices.validatePinAPIWith(PinEntered:Domain:success:failure:) + 295 (WebServices.swift:295)
8  myApp                       0x100e05ebc SessionLoginVC.signinUserWithPin(Pin:) + 146 (SessionLoginVC.swift:146)
9  myApp                       0x100e05c04 SessionLoginVC.viewWillAppear(_:) + 33 (SessionLoginVC.swift:33)
10 myApp                       0x100e05f38 @objc SessionLoginVC.viewWillAppear(_:) (<compiler-generated>)
11 UIKitCore                      0x235a72014 -[UIViewController _setViewAppearState:isAnimating:]
12 UIKitCore                      0x235a726e0 -[UIViewController __viewWillAppear:]
13 UIKitCore                      0x2359dd310 -[UINavigationController _startTransition:fromViewController:toViewController:]
14 UIKitCore                      0x2359ddf7c -[UINavigationController _startDeferredTransitionIfNeeded:]
15 UIKitCore                      0x2359df210 -[UINavigationController __viewWillLayoutSubviews]
16 UIKitCore                      0x2359c2420 -[UILayoutContainerView layoutSubviews]
17 UIKitCore                      0x23649de54 -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
18 QuartzCore                     0x20e7311f0 -[CALayer layoutSublayers]
19 QuartzCore                     0x20e736198 CA::Layer::layout_if_needed(CA::Transaction*)
20 QuartzCore                     0x20e6990a8 CA::Context::commit_transaction(CA::Transaction*)
21 QuartzCore                     0x20e6c7108 CA::Transaction::commit()
22 UIKitCore                      0x23602e534 __34-[UIApplication _firstCommitBlock]_block_invoke_2
23 CoreFoundation                 0x20a23510c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__
24 CoreFoundation                 0x20a234a10 __CFRunLoopDoBlocks
25 CoreFoundation                 0x20a22fa74 __CFRunLoopRun
26 CoreFoundation                 0x20a22f354 CFRunLoopRunSpecific
27 GraphicsServices               0x20c42f79c GSEventRunModal
28 UIKitCore                      0x236015b68 UIApplicationMain
29 myApp                       0x100e7112c main + 23 (AppDelegate.swift:23)
30 libdyld.dylib                  0x209cf58e0 start

There is only 2 users affected and in crash report I can see that the os is 12.2.0 and device is iPad Air. I am totally unable to reproduce or solve this error. Any help will be appreciated.

Mehdi
  • 717
  • 1
  • 7
  • 21
Rj19
  • 305
  • 1
  • 6
  • 20
  • Have a look at line 315 of keychainwrapper.m - it is failing to write something to the keychain and the error isn't being handled gracefully. It would also help if you could get the text associated with the exception that is being thrown – Paulw11 Feb 16 '20 at 10:49
  • @PaulW i am unable to reproduce the error. I can only provide the info about the code. It is the line where the device Id is being stored in keychain. How can I handle the error thrown.. even I should ask how can I get the "text associated with the exception being thrown."?? – Rj19 Feb 16 '20 at 13:32
  • The text *should* be in the crash log. The iOS keychain code is throwing an internal inconsistency error. When it throws that exception it provides a text string describing what was inconsistent but it seems that your crash reporting framework isn't sending this to you. Unfortunately keychain apis are pretty low level and old. They don't fail gracefully. The chances are good there is an issue with the keychain items in those two devices. There probably is nothing you can do to resolve this. – Paulw11 Feb 16 '20 at 19:21

0 Answers0