aws-amplify / aws-sdk-ios

AWS SDK for iOS. For more information, see our web site:
https://aws-amplify.github.io/docs
Other
1.68k stars 885 forks source link

AWSIoT crash - [AWSIoTMQTTClient webSocketDidOpen:] + 1228 (AWSIoTMQTTClient.m:1228) #5180

Closed jonduenas closed 8 months ago

jonduenas commented 9 months ago

Describe the bug Our iOS app currently has 2 crash reports in the past couple weeks from the webSocketDidOpen at line 1228 of AWSIoTMQTTClient.m file.

To Reproduce It's unclear at this point. From what I can tell it looks like they're opening the app after having previously used it the day before. I've tried reproducing this locally by putting the app in the background for several minutes and bring the app back, both with good network and poor network conditions, and can't seem to reproduce it myself.

Stack Trace

Crashed: com.apple.root.default-qos
0  libsystem_kernel.dylib         0x9fbc __pthread_kill + 8
1  libsystem_pthread.dylib        0x5680 pthread_kill + 268
2  libsystem_c.dylib              0x75b90 abort + 180
3  libsystem_malloc.dylib         0x26200 malloc_vreport + 908
4  libsystem_malloc.dylib         0x263e4 malloc_report + 64
5  libsystem_malloc.dylib         0x6060 find_zone_and_free + 308
6  CoreFoundation                 0x1807d0 cbDestroy + 36
7  CoreFoundation                 0x13fc7c boundPairCommonFinalize + 28
8  CoreFoundation                 0xd34c __CFStreamDeallocate + 136
9  CoreFoundation                 0xc120 _CFRelease + 292
10 AWSIoT                         0xb530 -[AWSIoTMQTTClient webSocketDidOpen:] + 1228 (AWSIoTMQTTClient.m:1228)
11 AWSIoT                         0x874a0 __39-[AWSSRWebSocket _HTTPHeadersDidFinish]_block_invoke + 476 (AWSSRWebSocket.m:476)
12 libdispatch.dylib              0x26a8 _dispatch_call_block_and_release + 32
13 libdispatch.dylib              0x4300 _dispatch_client_callout + 20
14 libdispatch.dylib              0x744c _dispatch_queue_override_invoke + 928
15 libdispatch.dylib              0x15be4 _dispatch_root_queue_drain + 392
16 libdispatch.dylib              0x163ec _dispatch_worker_thread2 + 156
17 libsystem_pthread.dylib        0x1928 _pthread_wqthread + 228
18 libsystem_pthread.dylib        0x1a04 start_wqthread + 8

Environment(please complete the following information):

Device Information (please complete the following information): Report shows 2 devices

thisisabhash commented 9 months ago

Hello, Thank you for posting this. Do you have verbose logs leading up to the stack trace which can help us debug further? Make sure to remove any sensitive information.

jonduenas commented 9 months ago

Unfortunately we don't have detailed logging accessible from the devices that crashed. And since I can't seem to reproduce myself locally, I don't have any that way either. I realize this isn't a lot of info to go off of, but hoped it might be helpful anyways. Or, if there was any insight whether there is anything on our end we can do to address this or mitigate it.

ruisebas commented 9 months ago

@jonduenas could you please share the full crash report? There's additional information that might be helpful for us.

Thanks!

jonduenas commented 8 months ago

com.moen.smartwater_issue_83d60024bee762944f2aba341e3ca35f_crash_session_3f5c4872ec7046d0a309a11a14f90c4b_DNE_0_v2_stacktrace.txt

com.moen.smartwater_issue_83d60024bee762944f2aba341e3ca35f_crash_session_0700b6f0d6f04f95a04fae63fb03fff8_DNE_0_v2_stacktrace.txt

lawmicha commented 8 months ago

Hello, we released 2.33.9 which includes an IoT crash fix https://github.com/aws-amplify/aws-sdk-ios/pull/5185. Please upgrade to this and let us know if you are still experiencing the issue.