kishikawakatsumi / KeychainAccess

Simple Swift wrapper for Keychain that works on iOS, watchOS, tvOS and macOS.
MIT License
7.92k stars 785 forks source link

Crash #547

Open abdullahumer opened 1 year ago

abdullahumer commented 1 year ago

I'm seeing a crash in Crashlytics.

This is how its being used:

Screen Shot 2022-09-25 at 19 13 37

Crash log:


0  libsystem_kernel.dylib         0x7b38 __pthread_kill + 8
1  libsystem_pthread.dylib        0x73bc pthread_kill + 268
2  libsystem_c.dylib              0x20524 abort + 168
3  libsystem_malloc.dylib         0x1ca04 _malloc_put + 550
4  libsystem_malloc.dylib         0x1cc9c malloc_zone_error + 100
5  libsystem_malloc.dylib         0x170dc nanov2_allocate_from_block + 568
6  libsystem_malloc.dylib         0x16164 nanov2_allocate + 128
7  libsystem_malloc.dylib         0x16080 nanov2_malloc + 64
8  libsystem_malloc.dylib         0x6024 _malloc_zone_malloc + 156
9  CoreFoundation                 0xe520 __CFBasicHashRehash + 376
10 CoreFoundation                 0x1fef4 __CFBasicHashAddValue + 104
11 CoreFoundation                 0x13ae0 CFBasicHashAddValue + 2308
12 CoreFoundation                 0x5cd18 CFDictionaryAddValue + 348
13 Security                       0x5674 der_decode_dictionary + 248
14 Security                       0x13f60 der_decode_plist + 1164
15 Security                       0x117dc SecXPCDictionaryCopyPList + 120
16 Security                       0x16ef4 SecXPCDictionaryCopyPListOptional + 72
17 Security                       0x12ca4 securityd_send_sync_and_do + 136
18 Security                       0xb81fc cftype_to_bool_cftype_error_request + 160
19 Security                       0x4938 __SecItemCopyMatching_block_invoke_2 + 224
20 Security                       0x5318 __SecItemAuthDoQuery_block_invoke + 5
40
21 Security                       0x3a90 SecItemAuthDoQuery + 1304
22 Security                       0x4e80 __SecItemCopyMatching_block_invoke + 140
23 Security                       0xb19c SecOSStatusWith + 56
24 Security                       0x4ba4 SecItemCopyMatching + 400
25 KeychainAccess                 0x7d78 Keychain.getData(_:ignoringAttributeSynchronizable:) + 619 (Keychain.swift:619)
26 MrsoolSDK                      0x1faa08 specialized Storable<>.tryFetchWithKey(_:_:) + 37 (Keychain.swift:37)
27 MrsoolSDK                      0x1f0bfc specialized Storable<>.prefethUserData() + 63 (Storable.swift:63)
28 MrsoolSDK                      0x1f0e14 specialized Storable<>.storedValue() + 95 (Storable.swift:95)
29 MrsoolSDK                      0x1fad80 specialized static User.current.getter + 60 (User.swift:60)
30 MrsoolSDK                      0x7a258 specialized BaseRequest.params.getter + 34 (BaseRequest.swift:34)
31 MrsoolSDK                      0x1ec1a8 specialized SupportConfigurationRequest.params.getter + 4359242152 (<compiler-generated>:4359242152)
32 MrsoolSDK                      0x1b4f70 Router.support.parameters.getter + 4359016304 (<compiler-generated>:4359016304)
33 Netjob                         0xb0bc NetworkService.request(endpoint:success:failure:) + 97 (NetworkService.swift:97)
34 Netjob                         0xcab0 protocol witness for Network.request(endpoint:success:failure:) in conformance NetworkService + 4364176048 (<compiler-generated>:4364176048)
35 Netjob                         0x8608 Endpoint.request(success:failure:) + 73 (Endpoint.swift:73)
36 MrsoolSDK                      0x1ea678 static Support.getConfiguration(network:completion:) + 77 (Support.swift:77)
37 MRSOOL                         0x6b0af0 SupportManager.getConfiguration(completion:) + 74 (SupportManager.swift:74)
38 MRSOOL                         0x6b4158 protocol witness for MrsoolSupportApiManager.getConfiguration(completion:) in conformance SupportManager + 4304077144 (<compiler-generated>:4304077144)
39 MrsoolSupport                  0x6d510 static MrsoolSupport.refreshConfigurations(isInitialize:completion:) + 69 (MrsoolSupport.swift:69)
40 MRSOOL                         0xd0a8a0 AppDelegate.setRichyLanguageIdentity() + 475 (AppDelegate.swift:475)
41 MRSOOL                         0x534da0 MRLanguageSelectionBottomSheetVC.onClickConfirm(btn:) + 116 (MRLanguageSelectionBottomSheetVC.swift:116)
42 MRSOOL                         0x534df8 @objc MRLanguageSelectionBottomSheetVC.onClickConfirm(btn:) + 4302507512 (<compiler-generated>:4302507512)
43 UIKitCore                      0x4c4f1c -[UIApplication sendAction:to:from:forEvent:] + 100
44 UIKitCore                      0x5ef868 -[UIControl sendAction:to:forEvent:] + 128
45 UIKitCore                      0x36c7dc -[UIControl _sendActionsForEvents:withEvent:] + 356
46 UIKitCore                      0x4095b8 -[UIButton _sendActionsForEvents:withEvent:] + 160
47 UIKitCore                      0x69a9bc -[UIControl touchesEnded:withEvent:] + 520
48 UIKitCore                      0x1717b4 -[UIWindow _sendTouchesForEvent:] + 980
49 UIKitCore                      0x1a2a38 -[UIWindow sendEvent:] + 4408
50 UIKitCore                      0x3506fc -[UIApplication sendEvent:] + 824
51 MRSOOL                         0xb0b000 CustomApplication.sendEvent(_:) + 28 (CustomApplication.swift:28)
52 MRSOOL                         0xb0b1a4 @objc CustomApplication.sendEvent(_:) + 4308627876 (<compiler-generated>:4308627876)
53 UIKitCore                      0x176318 __dispatchPreprocessedEventFromEventQueue + 7856
54 UIKitCore                      0x16b070 __processEventQueue + 6616
55 UIKitCore                      0xfbc574 updateCycleEntry + 176
56 UIKitCore                      0x7d8d5c _UIUpdateSequenceRun + 84
57 UIKitCore                      0xe5fedc schedulerStepScheduledMainSection + 144
58 UIKitCore                      0xe5f6a4 runloopSourceCallback + 92
59 CoreFoundation                 0xbb414 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
60 CoreFoundation                 0xcc1a0 __CFRunLoopDoSource0 + 208
61 CoreFoundation                 0x5694 __CFRunLoopDoSources0 + 268
62 CoreFoundation                 0xb05c __CFRunLoopRun + 828
63 CoreFoundation                 0x1ebc8 CFRunLoopRunSpecific + 600
64 GraphicsServices               0x1374 GSEventRunModal + 164
65 UIKitCore                      0x514b58 -[UIApplication _run] + 1100
66 UIKitCore                      0x296090 UIApplicationMain + 364
67 MRSOOL                         0x3f8a08 main + 10 (main.swift:10)
68 ???                            0x104241da4 (Missing)```
jacobsapps commented 1 year ago

I'm experiencing this exact same issue!

NSManagedObjectContext 0x283ce7810
0  libswiftCore.dylib             0x2ddc3c swift_retain + 202
1  libswiftCore.dylib             0x1a35e0 __SharedStringStorage.getCharacters(_:range:) + 176
2  libswiftCore.dylib             0x1a368c @objc __SharedStringStorage.getCharacters(_:range:) + 32
3  CoreFoundation                 0x114f8 __CFStringEncodeByteStream + 2744
4  Foundation                     0x1c040 -[NSString(NSStringOtherEncodings) getBytes:maxLength:usedLength:encoding:options:range:remainingRange:] + 276
5  CoreFoundation                 0x1e2cc CFStringGetBytes + 604
6  Security                       0x9ac0 der_sizeof_string + 88
7  Security                       0x847c der_sizeof_key_value + 52
8  Security                       0x3710 add_sequence_to_array + 52
9  CoreFoundation                 0x3546c -[__NSDictionaryM __apply:context:] + 128
10 Security                       0x127b4 der_encode_dictionary_repair + 112
11 Security                       0x12430 SecXPCDictionarySetPListWithRepair + 100
12 Security                       0x11afc securityd_send_sync_and_do + 64
13 Security                       0x3e68 __SecItemCopyMatching_block_invoke_2 + 296
14 Security                       0x4790 __SecItemAuthDoQuery_block_invoke + 524
15 Security                       0x2fc8 SecItemAuthDoQuery + 1184
16 Security                       0x4334 __SecItemCopyMatching_block_invoke + 108
17 Security                       0xa428 SecOSStatusWith + 48
18 Security                       0x4090 SecItemCopyMatching + 364
19 Gener8                         0x19976c Keychain.getData(_:ignoringAttributeSynchronizable:) + 619 (Keychain.swift:619)
20 Gener8                         0x18fde0 SecureStorage.get<A>(_:) + 92 (SecureStorage.swift:92)
21 Gener8                         0x190760 protocol witness for SecureStorageType.get<A>(_:) in conformance SecureStorage + 4297164640 (<compiler-generated>:4297164640)
22 Gener8                         0x14af2c AnalyticsProviderImpl.convert(analyticsEvent:context:) + 215 (AnalyticsProvider.swift:215)
23 Gener8                         0x14a77c closure #1 in closure #1 in closure #1 in AnalyticsProviderImpl.writeToCoreData(event:) + 4296877948
24 Gener8                         0x1953e8 thunk for @escaping @callee_guaranteed () -> () + 4297184232 (<compiler-generated>:4297184232)
25 CoreData                       0x1f04c developerSubmittedBlockToNSManagedObjectContextPerform + 148
26 libdispatch.dylib              0x64198 _dispatch_client_callout + 16
27 libdispatch.dylib              0x3f13c _dispatch_lane_serial_drain$VARIANT$armv81 + 604
28 libdispatch.dylib              0x3fbf4 _dispatch_lane_invoke$VARIANT$armv81 + 388
29 libdispatch.dylib              0x495cc _dispatch_workloop_worker_thread + 616
30 libsystem_pthread.dylib        0x4e84 _pthread_wqthread + 284
31 libsystem_pthread.dylib        0x49f0 start_wqthread + 8