pmusolino / Wormholy

iOS network debugging, like a wizard 🧙‍♂️
MIT License
2.31k stars 184 forks source link

Crash when using sockets #110

Open Shishani58 opened 2 years ago

Shishani58 commented 2 years ago

I have socket manager:

    init?(
        url: URL,
        headers: [String: String],
        parameters: [String: String]
    ) {
        super.init()

        self.urlSession = URLSession(configuration: .default,
                                     delegate: self,
                                     delegateQueue: operationQueue)

        guard let url = URLComponents(url: url, parameters: parameters)?.url else {
            return
        }

        var request = URLRequest(url: url)
        request.timeoutInterval = 30
        headers.forEach { request.addValue($0.value, forHTTPHeaderField: $0.key)}
        webSocketTask = urlSession?.webSocketTask(with: request)
    }

Application crashes with error Error: EXC_BAD_ACCESS (code=1, address=0x0) if Wormholy installed. If you remove the library, then there is no crash.

pmusolino commented 2 years ago

I released a new (big) version of Wormholy (1.6.5) with some improvements and fixes. https://github.com/pmusolino/Wormholy/releases/tag/1.6.5 Can you test it and let me know if you are still encountering this issue?