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

Crash in AppSyncRealTimeClient.subscribeToWebSocketEvent() #3834

Open
amruth-movano opened this issue Aug 26, 2024 · 8 comments
Open

Crash in AppSyncRealTimeClient.subscribeToWebSocketEvent() #3834

amruth-movano opened this issue Aug 26, 2024 · 8 comments
Labels
api Issues related to the API category bug Something isn't working closing soon This issue will be closed in 7 days unless further comments are made. pending-community-response Issue is pending response from the issue requestor

Comments

@amruth-movano
Copy link

amruth-movano commented Aug 26, 2024

Describe the bug

          Crashed: com.apple.root.default-qos.cooperative
0  libobjc.A.dylib                0x3020 objc_msgSend + 32
1  libswiftCore.dylib             0x1d69f4 __CocoaSet.member(for:) + 36
2  Combine                        0x23df0 specialized Set._Variant.insert(_:) + 92
3  Combine                        0x23d70 AnyCancellable.store(in:) + 48
4  Evie Ring                      0x1452f1c closure #2 in AppSyncRealTimeClient.subscribeToWebSocketEvent() + 244 (AppSyncRealTimeClient.swift:244)
5  Combine                        0xaecc Subscribers.Sink.receive(_:) + 92
6  Combine                        0xae60 protocol witness for Subscriber.receive(_:) in conformance Subscribers.Sink<A, B> + 24
7  Combine                        0x13714 PassthroughSubject.Conduit.offer(_:) + 744
8  Combine                        0x1341c partial apply for closure #1 in PassthroughSubject.send(_:) + 68
9  Combine                        0x3d5b0 partial apply for thunk for @callee_guaranteed (@guaranteed ConduitBase<A, B>) -> (@error @owned Error) + 32
10 libswiftCore.dylib             0xdee70 Sequence.forEach(_:) + 756
11 Combine                        0x12f30 ConduitList.forEach(_:) + 244
12 Combine                        0x12dcc PassthroughSubject.send(_:) + 268
13 Evie Ring                      0x96e9c8 WebSocketClient.onNetworkStateChange(_:) + 287 (WebSocketClient.swift:287)
14 libswift_Concurrency.dylib     0x4d764 swift::runJobInEstablishedExecutorContext(swift::Job*) + 436
15 libswift_Concurrency.dylib     0x4e9c8 swift_job_runImpl(swift::Job*, swift::ExecutorRef) + 72
16 libdispatch.dylib              0x15894 _dispatch_root_queue_drain + 392
17 libdispatch.dylib              0x1609c _dispatch_worker_thread2 + 156
18 libsystem_pthread.dylib        0x48f8 _pthread_wqthread + 228
19 libsystem_pthread.dylib        0x10cc start_wqthread + 8

Expected behavior

App should not crash

Amplify Framework Version

2.33.6

Amplify Categories

API

Dependency manager

Swift PM

Swift version

5.9.2

CLI version

12.11.1

Xcode version

15.0

Relevant log output

-

Is this a regression?

Yes

Regression additional context

No response

Platforms

iOS

OS Version

iOS 17.5.1

Device

iPhone 13 :Pro

Specific to simulators

No response

Additional context

@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending response from an Amplify team member labels Aug 26, 2024
@amruth-movano
Copy link
Author

@harsh62 @lawmicha @5d @thisisabhash
Can you please take this as priority, we have a major release in this week

@amruth-movano
Copy link
Author

This is another crash log -
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x83f20 __exceptionPreprocess
1 libobjc.A.dylib 0x16018 objc_exception_throw
2 CoreFoundation 0x18d480 +[NSObject(NSObject) copyDescription]
3 CoreFoundation 0x20fb4 forwarding
4 CoreFoundation 0x208d0 CF_forwarding_prep_0
5 libswiftCore.dylib 0x1d69f4 __CocoaSet.member(for:)
6 Combine 0x23df0 specialized Set.Variant.insert(:)
7 Combine 0x23d70 AnyCancellable.store(in:)
8 Evie Ring 0x1452f1c closure #2 in AppSyncRealTimeClient.subscribeToWebSocketEvent() + 244 (AppSyncRealTimeClient.swift:244)
9 Combine 0xaecc Subscribers.Sink.receive(
:)
10 Combine 0xae60 protocol witness for Subscriber.receive(
:) in conformance Subscribers.Sink<A, B>
11 Combine 0x13714 PassthroughSubject.Conduit.offer(:)
12 Combine 0x1341c partial apply for closure #1 in PassthroughSubject.send(
:)
13 Combine 0x3d5b0 partial apply for thunk for @callee_guaranteed (@guaranteed ConduitBase<A, B>) -> (@error @owned Error)
14 libswiftCore.dylib 0xdee70 Sequence.forEach(:)
15 Combine 0x12f30 ConduitList.forEach(
:)
16 Combine 0x12dcc PassthroughSubject.send(:)
17 Evie Ring 0x97059c specialized WebSocketClient.urlSession(
:webSocketTask:didCloseWith:reason:) + 232 (WebSocketClient.swift:232)
18 Evie Ring 0x96e17c @objc WebSocketClient.urlSession(_:webSocketTask:didCloseWith:reason:) ()
19 libdispatch.dylib 0x213c _dispatch_call_block_and_release
20 libdispatch.dylib 0x3dd4 _dispatch_client_callout
21 libdispatch.dylib 0xb400 _dispatch_lane_serial_drain
22 libdispatch.dylib 0xbf64 _dispatch_lane_invoke
23 libdispatch.dylib 0x16cb4 _dispatch_root_queue_drain_deferred_wlh
24 libdispatch.dylib 0x16528 _dispatch_workloop_worker_thread
25 libsystem_pthread.dylib 0x4934 _pthread_wqthread
26 libsystem_pthread.dylib 0x10cc start_wqthread

@amruth-movano
Copy link
Author

This is also 1 variant -

      Crashed: com.apple.root.default-qos.cooperative

0 libsystem_kernel.dylib 0xc42c __pthread_kill + 8
1 libsystem_pthread.dylib 0x7c0c pthread_kill + 268
2 libsystem_c.dylib 0x75ba0 abort + 180
3 libswiftCore.dylib 0x3a6690 swift::fatalError(unsigned int, char const*, ...) + 134
4 libswiftCore.dylib 0x3a66b0 swift::warningv(unsigned int, char const*, char*) + 30
5 libswiftCore.dylib 0x3ab4dc swift_deallocPartialClassInstance + 306
6 libswiftCore.dylib 0x3ab36c swift_release_dealloc + 56
7 libswiftCore.dylib 0x3ac488 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 136
8 libswiftCore.dylib 0x39093c swift_arrayDestroy + 196
9 libswiftCore.dylib 0x1d992c SetStorage.deinit + 240
10 libswiftCore.dylib 0x1d99a0 SetStorage.__deallocating_deinit + 16
11 libswiftCore.dylib 0x3ab36c swift_release_dealloc + 56
12 libswiftCore.dylib 0x3ac488 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 136
13 Combine 0x23fb4 specialized Set.Variant.insert(:) + 544
14 Combine 0x23d70 AnyCancellable.store(in:) + 48
15 Evie Ring 0x1452f1c closure #2 in AppSyncRealTimeClient.subscribeToWebSocketEvent() + 244 (AppSyncRealTimeClient.swift:244)
16 Combine 0xaecc Subscribers.Sink.receive(
:) + 92
17 Combine 0xae60 protocol witness for Subscriber.receive(
:) in conformance Subscribers.Sink<A, B> + 24
18 Combine 0x13714 PassthroughSubject.Conduit.offer(
:) + 744
19 Combine 0x1341c partial apply for closure #1 in PassthroughSubject.send(
:) + 68
20 Combine 0x3d5b0 partial apply for thunk for @callee_guaranteed (@guaranteed ConduitBase<A, B>) -> (@error @owned Error) + 32
21 libswiftCore.dylib 0xdee70 Sequence.forEach(:) + 756
22 Combine 0x12f30 ConduitList.forEach(
:) + 244
23 Combine 0x12dcc PassthroughSubject.send(_:) + 268
24 Evie Ring 0x96db88 WebSocketClient.startReadMessage() + 204 (WebSocketClient.swift:204)
25 libswift_Concurrency.dylib 0x4d764 swift::runJobInEstablishedExecutorContext(swift::Job*) + 436
26 libswift_Concurrency.dylib 0x4e9c8 swift_job_runImpl(swift::Job*, swift::ExecutorRef) + 72
27 libdispatch.dylib 0x15894 _dispatch_root_queue_drain + 392
28 libdispatch.dylib 0x1609c _dispatch_worker_thread2 + 156
29 libsystem_pthread.dylib 0x48f8 _pthread_wqthread + 228
30 libsystem_pthread.dylib 0x10cc start_wqthread + 8

@amruth-movano
Copy link
Author

@TechHorizon2003 what is it?

@amruth-movano
Copy link
Author

@harsh62 @lawmicha @5d
can you please check this crash?

@harsh62 harsh62 added the bug Something isn't working label Aug 27, 2024
@harsh62
Copy link
Member

harsh62 commented Aug 27, 2024

@amruth-movano Thanks for raising the issue. Would you be able to provide symbolicated crash logs? Furthermore, would you be able to grab verbose logs from the library with any reproduction steps, so that the team could try to reproduce the issue in a local environment.

@harsh62 harsh62 removed pending-triage Issue is pending triage pending-maintainer-response Issue is pending response from an Amplify team member labels Aug 27, 2024
@harsh62 harsh62 added the api Issues related to the API category label Aug 27, 2024
@amruth-movano
Copy link
Author

@harsh62
We are unable to reproduce this scenario using Xcode and the only stack trace which we have is I have already added

@github-actions github-actions bot added the pending-maintainer-response Issue is pending response from an Amplify team member label Aug 27, 2024
@5d
Copy link
Member

5d commented Aug 29, 2024

Hi @amruth-movano,
A potential fix patch has been released with version 2.39.0; Could you please give a try to see if this patch mitigate the issue?

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending response from an Amplify team member label Aug 29, 2024
@vincetran vincetran added pending-community-response Issue is pending response from the issue requestor closing soon This issue will be closed in 7 days unless further comments are made. labels Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issues related to the API category bug Something isn't working closing soon This issue will be closed in 7 days unless further comments are made. pending-community-response Issue is pending response from the issue requestor
Projects
None yet
Development

No branches or pull requests

8 participants
@5d @vincetran @harsh62 @amruth-movano and others