Skip to content

WebSocket.createHTTPRequest() crash #1394

@alexanderkhitev

Description

@alexanderkhitev

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions