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 [Dispatcher.protectedSend] most frequent #1347

Closed
skibinalexander opened this issue Apr 26, 2024 · 8 comments
Closed

Crash [Dispatcher.protectedSend] most frequent #1347

skibinalexander opened this issue Apr 26, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@skibinalexander
Copy link

skibinalexander commented Apr 26, 2024

Describe the bug

Concurrency/CheckedContinuation.swift:187: Fatal error: SWIFT TASK CONTINUATION MISUSE: protectedSend(:) tried to resume its continuation more than once, throwing webSocketNotConnected!

Hello team. At the moment we have the most popular thefts in our app using your library. This is already a critical value for our crash free. We have 2 crash reports from Crashlytics for research. We have not been able to solve our problem for a long time and we see that the problem is part of the problem of the library, we look at the web socket synchronization service through the async / await swift instruments.

SDK Version

To Reproduce
Steps to reproduce the behavior:

  • Using a direct library script

Expected behavior
We expect stable operation of the system in various cases. Also including if the socket connection is not stable

Screenshots

First stacktrace

0 libswiftCore.dylib _assertionFailure(_:_:file:line:flags:) + 264 1 libswift_Concurrency.dylib CheckedContinuation.resume(throwing:) + 476 2 WalletConnectSwiftV2 Dispatching.swift - Line 96 closure #1 in closure #1 in Dispatcher.protectedSend(_:) + 96 3 WalletConnectSwiftV2 Dispatching.swift - Line 83 closure #3 in Dispatcher.protectedSend(_:completion:) + 83 4 Combine Subscribers.Sink.receive(completion:) + 448 5 Combine protocol witness for Subscriber.receive(completion:) in conformance Subscribers.Sink<A, B> + 24 6 Combine Publishers.Timeout.Inner.timedOut() + 1000 7 libswiftDispatch.dylib thunk for @escaping @callee_guaranteed () -> () + 36 8 libdispatch.dylib _dispatch_client_callout + 20 9 libdispatch.dylib _dispatch_continuation_pop + 600 10 libdispatch.dylib _dispatch_source_latch_and_call + 420 11 libdispatch.dylib _dispatch_source_invoke + 832 12 libdispatch.dylib _dispatch_continuation_pop + 208 13 libdispatch.dylib _dispatch_async_redirect_invoke + 584 14 libdispatch.dylib _dispatch_root_queue_drain + 392 15 libdispatch.dylib _dispatch_worker_thread2 + 156 16 libsystem_pthread.dylib _pthread_wqthread + 228 17 libsystem_pthread.dylib start_wqthread + 8

Second stacktrace

libswiftCore.dylib _assertionFailure(_:_:file:line:flags:) + 264 1 libswift_Concurrency.dylib CheckedContinuation.resume(returning:) + 508 2 WalletConnectSwiftV2 Dispatching.swift - Line 100 closure #1 in closure #1 in Dispatcher.protectedSend(_:) + 100 3 WalletConnectSwiftV2 Dispatching.swift - Line 64 partial apply for closure #1 in Dispatcher.send(_:completion:) + 64 4 Tangem WebSocket.swift - Line 155 closure #3 in WebSocket.write(string:completion:) + 155 5 Foundation thunk for @escaping @callee_guaranteed @Sendable (@guaranteed Error?) -> () + 60 6 libdispatch.dylib _dispatch_call_block_and_release + 32 7 libdispatch.dylib _dispatch_client_callout + 20 8 libdispatch.dylib _dispatch_lane_serial_drain + 748 9 libdispatch.dylib _dispatch_lane_invoke + 432 10 libdispatch.dylib _dispatch_root_queue_drain_deferred_wlh + 288 11 libdispatch.dylib _dispatch_workloop_worker_thread + 404 12 libsystem_pthread.dylib _pthread_wqthread + 288 13 libsystem_pthread.dylib start_wqthread + 8

Device (please complete the following information):

  • Device: Any devices
  • OS: Any iOS version above 15.0

Additional context
Add any other context about the problem here.

We see similar problems #1299
#1046

@skibinalexander skibinalexander added the bug Something isn't working label Apr 26, 2024
@llbartekll llbartekll self-assigned this Apr 26, 2024
@llbartekll
Copy link
Contributor

hey @skibinalexander, thanks for reporting this, could you upgrade to 1.18.7 and share if you are still experiencing the issue please?

@skibinalexander
Copy link
Author

Thank you for your attention to us. We understand, we will update and return with feedback. I don’t close it issue, for continue research.

@maltsevoff
Copy link
Contributor

same crash on version 1.18.4

@llbartekll
Copy link
Contributor

@maltsevoff could you also try to upgrade?

@llbartekll
Copy link
Contributor

hey @skibinalexander do you still experience the crash?

@skibinalexander
Copy link
Author

hey @skibinalexander do you still experience the crash?

Hello. Thank you for your interest, we are in the process of releasing the version you indicated and collecting statistics. I will definitely come back with feedback, so I'm not closing the issue.

@llbartekll
Copy link
Contributor

hey @skibinalexander, can I close the issue?

@skibinalexander
Copy link
Author

hey @skibinalexander, can I close the issue?

Yes, thank you, we planned to close the issue for now, we are watching the statistics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants