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

WebSocket.createHTTPRequest() crash #1394

Open
alexanderkhitev opened this issue Jul 31, 2024 · 6 comments
Open

WebSocket.createHTTPRequest() crash #1394

alexanderkhitev opened this issue Jul 31, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@alexanderkhitev
Copy link

Describe the bug
We experienced an app crash linked to the Wallet Connect SDK, specifically on the com.walletconnect.sdk.network.monitor thread.
SDK Version

To Reproduce
Steps to reproduce the behavior:

          Crashed: com.walletconnect.sdk.network.monitor
0  CoreFoundation                 0xf8ac CF_IS_OBJC + 76
1  CoreFoundation                 0x19598 CFGetAllocator + 48
2  CFNetwork                      0xbe6c CFURLAuthChallengeCreate + 3336
3  CFNetwork                      0x8e88 CFURLResponseGetExpectedContentLength + 228
4  CFNetwork                      0x8240 CFURLRequestSetHTTPHeaderFieldValue + 136
5  Foundation                     0x1bd708 specialized URLRequest._applyMutation<A>(_:) + 320
6  AppName*                        0xdeae0c WebSocket.createHTTPRequest() + 593 (WebSocket.swift:593)
7  AppName*                        0x679d80 closure #1 in AutomaticSocketConnectionHandler.setUpNetworkMonitoring() + 104 (AutomaticSocketConnectionHandler.swift:104)
8  Combine                        0xaecc Subscribers.Sink.receive(_:) + 92
9  Combine                        0xae60 protocol witness for Subscriber.receive(_:) in conformance Subscribers.Sink<A, B> + 24
10 Combine                        0x139d4 Publishers.Autoconnect.Inner.receive(_:) + 52
11 Combine                        0x13928 Publishers.Multicast.Inner.receive(_:) + 244
12 Combine                        0x13828 protocol witness for Subscriber.receive(_:) in conformance Publishers.Multicast<A, B>.Inner<A1> + 24
13 Combine                        0x13714 PassthroughSubject.Conduit.offer(_:) + 744
14 Combine                        0x1341c partial apply for closure #1 in PassthroughSubject.send(_:) + 68
15 Combine                        0x12f50 ConduitList.forEach(_:) + 276
16 Combine                        0x12dcc PassthroughSubject.send(_:) + 268
17 Combine                        0xc474 SubjectSubscriber.receive(_:) + 192
18 Combine                        0xc3a4 protocol witness for Subscriber.receive(_:) in conformance SubjectSubscriber<A> + 24
19 Combine                        0x13310 CurrentValueSubject.Conduit.offer(_:) + 816
20 Combine                        0x12fd0 partial apply for closure #1 in CurrentValueSubject.send(_:) + 68
21 Combine                        0x12f50 ConduitList.forEach(_:) + 276
22 Combine                        0x12c64 CurrentValueSubject.send(_:) + 380
23 AppName*                        0x669378 closure #1 in NetworkMonitor.init() + 33 (NetworkMonitoring.swift:33)
24 Network                        0x21bde8 partial apply for closure #1 in NWPathMonitor.startLocked(lockedState:) + 92
25 Network                        0x21bd68 thunk for @escaping @callee_guaranteed @Sendable () -> () + 36
26 libdispatch.dylib              0x213c _dispatch_call_block_and_release + 32
27 libdispatch.dylib              0x3dd4 _dispatch_client_callout + 20
28 libdispatch.dylib              0xb400 _dispatch_lane_serial_drain + 748
29 libdispatch.dylib              0xbf30 _dispatch_lane_invoke + 380
30 libdispatch.dylib              0x16cb4 _dispatch_root_queue_drain_deferred_wlh + 288
31 libdispatch.dylib              0x16528 _dispatch_workloop_worker_thread + 404
32 libsystem_pthread.dylib        0x4934 _pthread_wqthread + 288
33 libsystem_pthread.dylib        0x10cc start_wqthread + 8

Expected behavior
The app should not crash under these conditions.

Screenshots
Screenshot 2024-07-31 at 12 51 37 PM

Device (please complete the following information):

  • Device: iPhone 14
  • OS: iOS 17.5.1
@alexanderkhitev alexanderkhitev added the bug Something isn't working label Jul 31, 2024
@llbartekll
Copy link
Contributor

@alexanderkhitev thank you for reporting this 🙏
how common is the crash?

@alexanderkhitev
Copy link
Author

@alexanderkhitev thank you for reporting this 🙏 how common is the crash?

Hello! @llbartekll as I can see it happens 1 time per 530 app sessions.

@simonmcl
Copy link

Just had this happen again using version 1.19.3 (will be updating to 1.20.x next week)

@llbartekll Now that you guys are moving over to ReOwn, what happens with all these tickets/opened PRs? Theres an unmerged PR relating to connection lifecycle management that I think solves an issue i've been waiting on. Will these be getting addressed here and then moved over, or is all work being done on the new repo?

If its all being done in the new one, have any of these issues been addressed there yet (i.e. should I be pushing to update now or is it still the same code)

@llbartekll
Copy link
Contributor

should I be pushing to update now or is it still the same cod

most of the code stays the same but there were some improvements regarding socket connection

Just had this happen again using version 1.19.3 (will be updating to 1.20.x next week)

would you like to migrate to reown-swift instead?

@alexanderkhitev
Copy link
Author

should I be pushing to update now or is it still the same cod

most of the code stays the same but there were some improvements regarding socket connection

Just had this happen again using version 1.19.3 (will be updating to 1.20.x next week)

would you like to migrate to reown-swift instead?

Hey @llbartekll ! I'll have a look on this soon, thanks!

@simonmcl
Copy link

@llbartekll FYI, i've hit a roadblock in migration: reown-com/reown-swift#37

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

4 participants