Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashed: com.apple.main-thread EXC_BREAKPOINT 0x0000000194d9ea80 $s15AWSMobileClientAAC9getTokensyyyAA0D0VSg_s5Error_pSgtcFyycfU_ySo25AWSCognitoAuthUserSessionCSg_AHtcfU_ #4203

Closed
zhouhao27 opened this issue Jul 5, 2022 · 4 comments
Labels
bug Something isn't working closing soon mobile client Issues related to AWSMobileClient pending-response Issue is pending response from the issue requestor

Comments

@zhouhao27
Copy link

Describe the bug

Crashed: com.apple.main-thread
EXC_BREAKPOINT 0x0000000194d9ea80
$s15AWSMobileClientAAC9getTokensyyyAA0D0VSg_s5Error_pSgtcFyycfU_ySo25AWSCognitoAuthUserSessionCSg_AHtcfU_

To Reproduce
Steps to reproduce the behavior:

It happened randomly.

Stack Trace

Crashed: com.apple.main-thread
0  libdispatch.dylib              0x39a80 dispatch_group_leave.cold.1 + 36
1  libdispatch.dylib              0x4878 _dispatch_group_wake + 130
2  AWSMobileClient                0x2bc60 $s15AWSMobileClientAAC9getTokensyyyAA0D0VSg_s5Error_pSgtcFyycfU_ySo25AWSCognitoAuthUserSessionCSg_AHtcfU_ + 856
3  AWSMobileClient                0x19d14 $sSo25AWSCognitoAuthUserSessionCSgs5Error_pSgIeggg_ACSo7NSErrorCSgIeyByy_TR + 68
4  AWSMobileClient                0x9718 -[AWSCognitoAuth cleanUpAndCallGetSessionBlock:error:] + 116
5  libdispatch.dylib              0x1e6c _dispatch_call_block_and_release + 32
6  libdispatch.dylib              0x3a30 _dispatch_client_callout + 20
7  libdispatch.dylib              0x11f48 _dispatch_main_queue_drain + 928
8  libdispatch.dylib              0x11b98 _dispatch_main_queue_callback_4CF + 44
9  CoreFoundation                 0x51800 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
10 CoreFoundation                 0xb704 __CFRunLoopRun + 2532
11 CoreFoundation                 0x1ebc8 CFRunLoopRunSpecific + 600
12 GraphicsServices               0x1374 GSEventRunModal + 164
13 UIKitCore                      0x514648 -[UIApplication _run] + 1100
14 UIKitCore                      0x295d90 UIApplicationMain + 364
15 Breeze                         0x9a24 main + 41 (AppDelegate.swift:41)
16 ???                            0x10187dce4 (Missing)

Areas of the SDK you are using (AWSMobileClient, Cognito, Pinpoint, IoT, etc)?

Environment(please complete the following information):

  • SDK Version: 2.27.9
  • Dependency Manager: Cocoapods
  • Swift Version : 5.0
  • Xcode Version: 13.2

Device Information (please complete the following information):

  • Device: iPhone 13 Pro Max
  • iOS Version: 15.5
  • Specific to simulators:

Additional context
Add any other context about the problem here like your specific use case.

Relevant Console Output
In some cases, it might be helpful to add any logs from your console that better help you tell the story of this issue. You can easily enable logging in your app by putting the following code in your app delegate.

AWSDDLog.sharedInstance.logLevel = .debug
AWSDDLog.add(AWSDDTTYLogger.sharedInstance)
@royjit
Copy link
Member

royjit commented Jul 6, 2022

Can you please try with the latest version of aws-sdk-ios, we had made a few fixes related to getTokens call. From the crash log it doesnot seems like you are inside the latest code logic reason being: The crash log shows dispatch_group which was removed and it does not show any reference to FetchUserPoolTokensOperation which was added recently.

If possible providing the verbose logs at the time of crash will help us to debug further

@royjit royjit added bug Something isn't working pending-response Issue is pending response from the issue requestor auth labels Jul 6, 2022
@zhouhao27
Copy link
Author

Can you please try with the latest version of aws-sdk-ios, we had made a few fixes related to getTokens call. From the crash log it doesnot seems like you are inside the latest code logic reason being: The crash log shows dispatch_group which was removed and it does not show any reference to FetchUserPoolTokensOperation which was added recently.

The crash is coming from my customers who's probably using the previous version of aws-sdk-ios. My current users are using 2.27.9. Is this version removed dispatch_group already?

@zhouhao27
Copy link
Author

Got another crash:

Crashed: com.apple.root.default-qos
0  libobjc.A.dylib                0x39d0 objc_retain + 16
1  AWSMobileClient                0x2cb04 $sSlsSQ7ElementRpzrlE10firstIndex2of0C0QzSgAB_tFSay15AWSMobileClient28FetchUserPoolTokensOperationCG_Tg5 + 100
2  AWSMobileClient                0x2ccac $s15AWSMobileClientAAC9getTokensyyyAA0D0VSg_s5Error_pSgtcFyycfU0_ + 136
3  AWSMobileClient                0x2ca94 $sIeg_IeyB_TR + 20
4  Foundation                     0x99f9c __111+[__NSOperationInternalObserver _observeValueForKeyPath:ofObject:changeKind:oldValue:newValue:indexes:context:]_block_invoke_2 + 36
5  libdispatch.dylib              0x1e6c _dispatch_call_block_and_release + 32
6  libdispatch.dylib              0x3a30 _dispatch_client_callout + 20
7  libdispatch.dylib              0x6b44 _dispatch_queue_override_invoke + 784
8  libdispatch.dylib              0x15164 _dispatch_root_queue_drain + 396
9  libdispatch.dylib              0x1596c _dispatch_worker_thread2 + 164
10 libsystem_pthread.dylib        0x1080 _pthread_wqthread + 228
11 libsystem_pthread.dylib        0xe5c start_wqthread + 8

@royjit
Copy link
Member

royjit commented Oct 24, 2022

We made a fix in 2.28.0 to make the hashtable used in getToken to avoid the crash PR. Could you try with this version and see if that resolves the issue?

@royjit royjit added closing soon cognito Issues related to AWS Cognito mobile client Issues related to AWSMobileClient and removed auth cognito Issues related to AWS Cognito labels Oct 24, 2022
@royjit royjit closed this as completed Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working closing soon mobile client Issues related to AWSMobileClient pending-response Issue is pending response from the issue requestor
Projects
None yet
Development

No branches or pull requests

2 participants