Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: deleting current dictionary - ios

When I try to run the project in Xcode 8.1 , I am facing below error (See logs). I cleaned up the code and did reset the simulator but that didn't work.
** Assertion failure in -[KeychainItemWrapper resetKeychainItem], /Users/manishpathak/iosProjects/MyProject/MyProject/KeychainItemWrapper.m:202
2017-07-14 15:09:09.521 MyProject[26741:3318830] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Problem deleting current dictionary.'
*** First throw call stack:
(
0 CoreFoundation 0x00000001054ba34b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000104f1b21e objc_exception_throw + 48
2 CoreFoundation 0x00000001054be442 +[NSException raise:format:arguments:] + 98
3 Foundation 0x0000000104ab1e4d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 AppifyViewer 0x000000010278b542 -[KeychainItemWrapper resetKeychainItem] + 2354
5 AppifyViewer 0x0000000102713494 +[MDXKeychain storeToKeychain:withPassword:] + 292
6 AppifyViewer 0x00000001027b3a59 -[MDXSecurityPolicy saveCredential:] + 281
7 AppifyViewer 0x0000000102718f37 __32-[MDXLoginViewController login:]_block_invoke + 407
8 AppifyViewer 0x000000010285ed19 __76-[RXPromise registerWithExecutionContext:onSuccess:onFailure:returnPromise:]_block_invoke_3 + 89
9 libdispatch.dylib 0x0000000108140980 _dispatch_call_block_and_release + 12
10 libdispatch.dylib 0x000000010816a0cd _dispatch_client_callout + 8
11 libdispatch.dylib 0x000000010814a8d6 _dispatch_main_queue_callback_4CF + 406
12 CoreFoundation 0x000000010547e4f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
13 CoreFoundation 0x0000000105443f8d __CFRunLoopRun + 2205
14 CoreFoundation 0x0000000105443494 CFRunLoopRunSpecific + 420
15 GraphicsServices 0x0000000109faba6f GSEventRunModal + 161
16 UIKit 0x00000001067df964 UIApplicationMain + 159
17 AppifyViewer 0x00000001027a4857 main + 231
18 libdyld.dylib 0x00000001081b668d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Solution
It's working after Enabling KeyChain Sharing.
Enable Keychain Sharing
1- Click Targetof the project
2- Click on tab Capabilities and search Keychain sharing.
3- Enable Keychain sharing.

Related

App Crash Immediately after initiating Quickblox video call from web to iOS app

I have try to video call using QuickBlox from web page to iOS app but when I am call from web immediately iOS app crash with as below log.
[3553:77957] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFConstantString count]: unrecognized selector sent to instance 0x10e546c78'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23c7127e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff513fbb20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23c91fd4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x00007fff23c75c4c ___forwarding___ + 1436
4 CoreFoundation 0x00007fff23c77f78 _CF_forwarding_prep_0 + 120
5 libswiftFoundation.dylib 0x000000010f8849f5 $sSD10FoundationE26_forceBridgeFromObjectiveC_6resultySo12NSDictionaryC_SDyxq_GSgztFZ + 709
6 libswiftFoundation.dylib 0x000000010f8789e3 $sSD10FoundationE36_unconditionallyBridgeFromObjectiveCySDyxq_GSo12NSDictionaryCSgFZ + 67
7 ProjectDemo 0x000000010d71912a $s15ProjectDemo6HomeVCC20didReceiveNewSession_8userInfoySo12QBRTCSessionC_SDyS2SGSgtFTo + 138
8 CoreFoundation 0x00007fff23c7820c __invoking___ + 140
9 CoreFoundation 0x00007fff23c753af -[NSInvocation invoke] + 319
10 CoreFoundation 0x00007fff23c75684 -[NSInvocation invokeWithTarget:] + 68
11 Quickblox 0x000000010e4cb67e qb_jid + 89448
12 libdispatch.dylib 0x000000010fb97dd4 _dispatch_call_block_and_release + 12
13 libdispatch.dylib 0x000000010fb98d48 _dispatch_client_callout + 8
14 libdispatch.dylib 0x000000010fba6de6 _dispatch_main_queue_callback_4CF + 1500
15 CoreFoundation 0x00007fff23bd4049 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
16 CoreFoundation 0x00007fff23bceca9 __CFRunLoopRun + 2329
17 CoreFoundation 0x00007fff23bce066 CFRunLoopRunSpecific + 438
18 GraphicsServices 0x00007fff384c0bb0 GSEventRunModal + 65
19 UIKitCore 0x00007fff48092d4d UIApplicationMain + 1621
20 ProjectDemo 0x000000010d75a98b main + 75
21 libdyld.dylib 0x00007fff5227ec25 start + 1
22 ??? 0x0000000000000001 0x0 + 1
)
2020-09-01 09:56:40:474 ProjectDemo[3553:1260b] SEND: <a xmlns="urn:xmpp:sm:3" h="2"/>
libc++abi.dylib: terminating with uncaught exception of type NSException
Most likely, the issue is related to outdated Javascript SDK.
Per our check, your Javascript SDK version is 2.8.1. Please update SDK to the latest version 2.12.9: https://github.com/QuickBlox/quickblox-javascript-sdk
Also, make sure that you are using the latest iOS SDK version 2.17.4: https://github.com/QuickBlox/quickblox-ios-sdk

Unity Firebase Xcode Messaging. First game start error

Firebase Unity SDK v.3.0.3
Unity 5.4.2f2
Xcode 8.3
I create a iOS build. When first start the game, you receive the following error.
2017-06-05 15:51:32.503767+0700 tacticool[1549:942648] -[UIApplication messaging:didRefreshRegistrationToken:]: unrecognized selector sent to instance 0x14f79ce0
2017-06-05 15:51:32.589532+0700 tacticool[1549:942648] Uncaught exception: NSInvalidArgumentException: -[UIApplication messaging:didRefreshRegistrationToken:]: unrecognized selector sent to instance 0x14f79ce0
(
0 CoreFoundation 0x1c2c3b55 <redacted> + 152
1 libobjc.A.dylib 0x1b54b067 objc_exception_throw + 38
2 CoreFoundation 0x1c2c8fd1 <redacted> + 0
3 CoreFoundation 0x1c2c70c3 <redacted> + 696
4 CoreFoundation 0x1c1efdc8 _CF_forwarding_prep_0 + 24
5 tacticool 0x00a66b4b -[FIRMessaging defaultInstanceIDTokenWasRefreshed:] + 162
6 CoreFoundation 0x1c26fdb9 <redacted> + 10
7 CoreFoundation 0x1c26f6f9 <redacted> + 382
8 CoreFoundation 0x1c26f4e1 <redacted> + 40
9 CoreFoundation 0x1c2ca309 <redacted> + 1242
10 CoreFoundation 0x1c1d30f5 _CFXNotificationPost + 540
11 Foundation 0x1cb70bab <redacted> + 450
12 CoreFoundation 0x1c27f803 <redacted> + 20
13 CoreFoundation 0x1c27da55 <redacted> + 282
14 CoreFoundation 0x1c27df2d <redacted> + 1124
15 CoreFoundation 0x1c1d11af CFRunLoopRunSpecific + 470
16 CoreFoundation 0x1c1d0fd1 CFRunLoopRunInMode + 104
17 GraphicsServices 0x1d97bb41 GSEventRunModal + 80
18 UIKit 0x21552e13 UIApplicationMain + 150
19 tacticool 0x000f0b9b main + 202
20 libdyld.dylib 0x1b9be4eb <redacted> + 2
)
2017-06-05 15:51:32.591642+0700 tacticool[1549:942648] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIApplication messaging:didRefreshRegistrationToken:]: unrecognized selector sent to instance 0x14f79ce0'
*** First throw call stack:
(0x1c2c3b3d 0x1b54b067 0x1c2c8fd1 0x1c2c70c3 0x1c1efdc8 0xa66b4b 0x1c26fdb9 0x1c26f6f9 0x1c26f4e1 0x1c2ca309 0x1c1d30f5 0x1cb70bab 0x1c27f803 0x1c27da55 0x1c27df2d 0x1c1d11af 0x1c1d0fd1 0x1d97bb41 0x21552e13 0xf0b9b 0x1b9be4eb)
libc++abi.dylib: terminating with uncaught exception of type NSException
Do I miss something in XCode? Or have something to check in Unity?

Error with Braintree UI BTDropInViewController

this is my first time implementing Braintree and I've been following the documentation clearly. I've integrated it with CocoaPods but I have an issue in BTDropInViewController. It throws an error
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[UIColor bt_colorWithBytesR:G:B:]: unrecognized selector sent to class 0x10fd17948
In this line
BTDropInViewController *dropInViewController = [[BTDropInViewController alloc]
initWithAPIClient:self.braintreeClient];
I've tried to import these 3 headers just to be sure, but still the same result
#import <Braintree/UIColor+BTUI.h>
#import "BraintreeUI.h"
#import <Braintree/BTUI.h>
And here is the full error
2016-11-16 15:56:35.418 Projc[43766:2236752] +[UIColor bt_colorWithBytesR:G:B:]: unrecognized selector sent to class 0x10fd17948
2016-11-16 15:56:35.504 Projc[43766:2236752] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[UIColor bt_colorWithBytesR:G:B:]: unrecognized selector sent to class 0x10fd17948'
*** First throw call stack:
(
0 CoreFoundation 0x00000001116aaf45 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000110998deb objc_exception_throw + 48
2 CoreFoundation 0x00000001116b346d +[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x0000000111600eea ___forwarding___ + 970
4 CoreFoundation 0x0000000111600a98 _CF_forwarding_prep_0 + 120
5 Projc 0x000000010ccb95b0 -[BTUI borderColor] + 64
6 Projc 0x000000010cc9abf4 -[BTDropInContentView initWithFrame:] + 964
7 UIKit 0x000000010f0abe3d -[UIView init] + 62
8 Projc 0x000000010ccc329e -[BTUIThemedView init] + 62
9 Projc 0x000000010cca5fed -[BTDropInViewController initWithAPIClient:] + 285
10 Projc 0x000000010cb0998b __51-[RegisterController basicPlanClicked]_block_invoke + 411
11 Projc 0x000000010cac1a66 __59-[downloadJson:endPointString:WithHandler:]_block_invoke + 214
12 CFNetwork 0x000000010d4f5b3d __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 19
13 CFNetwork 0x000000010d507fb6 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 302
14 Foundation 0x000000011060c3b8 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
15 Foundation 0x00000001105480e5 -[NSBlockOperation main] + 101
16 Foundation 0x000000011052b036 -[__NSOperationInternal _start:] + 646
17 Foundation 0x000000011052ac47 __NSOQSchedule_f + 194
18 libdispatch.dylib 0x0000000111e0649b _dispatch_client_callout + 8
19 libdispatch.dylib 0x0000000111dee2af _dispatch_main_queue_callback_4CF + 1738
20 CoreFoundation 0x000000011160b2e9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
21 CoreFoundation 0x00000001115cc8a9 __CFRunLoopRun + 2073
22 CoreFoundation 0x00000001115cbe08 CFRunLoopRunSpecific + 488
23 GraphicsServices 0x0000000112291ad2 GSEventRunModal + 161
24 UIKit 0x000000010f01f30d UIApplicationMain + 171
25 Projc 0x000000010cba86bf main + 111
26 libdyld.dylib 0x0000000111e3b92d start + 1
27 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

Segment framework make UIAlertController to crash

I follow "https://segment.com/" to implement analytics user usage on my iOS source. But when i use UIAlertController to show alert with title is #"", my app was crash! I don't know exactly why. To solve it, i must set title of alert is nil. And this is my logs:
2016-11-10 17:12:57.185 Lightning Rider Partner[24434:236155] *** Assertion failure in -[SEGAnalytics screen:properties:options:](), /Users/dungdo/Desktop/tcourier-ios/v2_driver/Pods/Analytics/Analytics/Classes/SEGAnalytics.m:323
2016-11-10 17:12:57.192 Lightning Rider Partner[24434:236155] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'screen name () must not be empty.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010c1f134b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00000001120f521e objc_exception_throw + 48
2 CoreFoundation 0x000000010c1f5442 +[NSException raise:format:arguments:] + 98
3 Foundation 0x0000000111cc1d79 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 Analytics 0x000000010bc29d37 -[SEGAnalytics screen:properties:options:] + 471
5 Analytics 0x000000010bc3fb7c -[UIViewController(SEGScreen) seg_viewDidAppear:] + 444
6 UIKit 0x000000010e50eb0c -[UIViewController _setViewAppearState:isAnimating:] + 945
7 UIKit 0x000000010e51187a __64-[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:]_block_invoke + 42
8 UIKit 0x000000010e50fb64 -[UIViewController _executeAfterAppearanceBlock] + 86
9 UIKit 0x000000010e374438 _runAfterCACommitDeferredBlocks + 653
10 UIKit 0x000000010e360f6f _cleanUpAfterCAFlushAndRunDeferredBlocks + 566
11 UIKit 0x000000010e3923da _afterCACommitHandler + 176
12 CoreFoundation 0x000000010c195e17 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
13 CoreFoundation 0x000000010c195d87 __CFRunLoopDoObservers + 391
14 CoreFoundation 0x000000010c17ab9e __CFRunLoopRun + 1198
15 CoreFoundation 0x000000010c17a494 CFRunLoopRunSpecific + 420
16 GraphicsServices 0x0000000115145a6f GSEventRunModal + 161
17 UIKit 0x000000010e367964 UIApplicationMain + 159
18 Lightning Rider Partner 0x000000010ad74c3f main + 111
19 libdyld.dylib 0x00000001128a868d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I was getting the same issue while using the Segment framework.
I just comment the Assert statement in SDK file for empty screen. Please search line below in your whole project and comment it out.
NSCAssert1(screenTitle.length > 0, #"screen name (%#) must not be empty.", screenTitle);
You are good to go.
This seems like the error Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'screen name () must not be empty.
Make sure you already set it while creating SEGAnalytics class or something related

react native terminating with uncaught exception of type NSException

I have an error when running my app after I upgrade the ReactNative to 0.17
I was work fine with 0.13
Error code is
2016-01-04 12:22:37.405 myapp [16916:350051] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSCFString substringFromIndex:]: Index 175 out of bounds; string length 174'
*** First throw call stack:
(
0 CoreFoundation 0x000000010ea9ce65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010dca0deb objc_exception_throw + 48
2 CoreFoundation 0x000000010ea9cd9d +[NSException raise:format:] + 205
3 Foundation 0x000000010d84811d -[NSString substringFromIndex:] + 126
4 myapp 0x000000010d5e15f5 RCTBundlePathForURL + 293
5 myapp 0x000000010d5e167d RCTIsXCAssetURL + 45
6 myapp 0x000000010d6336d0 -[RCTXCAssetImageLoader canLoadImageURL:] + 48
7 myapp 0x000000010d62ac77 -[RCTImageLoader imageURLLoaderForURL:] + 615
8 myapp 0x000000010d62c070 __87-[RCTImageLoader loadImageWithTag:size:scale:resizeMode:progressBlock:completionBlock:]_block_invoke_2125 + 368
9 libdispatch.dylib 0x000000011201fe5d _dispatch_call_block_and_release + 12
10 libdispatch.dylib 0x000000011204049b _dispatch_client_callout + 8
11 libdispatch.dylib 0x00000001120268ec _dispatch_queue_drain + 2215
12 libdispatch.dylib 0x0000000112025e0d _dispatch_queue_invoke + 601
13 libdispatch.dylib 0x0000000112028a56 _dispatch_root_queue_drain + 1420
14 libdispatch.dylib 0x00000001120284c5 _dispatch_worker_thread3 + 111
15 libsystem_pthread.dylib 0x000000011237868f _pthread_wqthread + 1129
16 libsystem_pthread.dylib 0x0000000112376365 start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
original code here
https://gist.github.com/AhmedMAtia/141208f80e28a4343e26
I've had trouble upgrading from 0.13 as well. I solved this by creating a new project, then moving my custom app code over.

Resources