Open gouravkmar opened 5 months ago
@daltoniam please help here.
update to xcode 15.3 or xcode 15.4 try it again
Hello, did you manage to resolve the issue? I am encountering the same difficulty. Do you have any suggestions for a solution?
I am still facing the same issue. Do you have any suggestions for a solution?
I am still facing the same issue. Do you have any suggestions for a solution?
on Websocket.swift
file change this code
public convenience init(request: URLRequest, certPinner: CertificatePinning? = FoundationSecurity(), compressionHandler: CompressionHandler? = nil, useCustomEngine: Bool = true) {
if #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *), !useCustomEngine {
self.init(request: request, engine: NativeEngine())
}
// else if #available(macOS 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *) {
// self.init(request: request, engine: WSEngine(transport: TCPTransport(), certPinner: certPinner, compressionHandler: compressionHandler))
// }
else {
self.init(request: request, engine: WSEngine(transport: FoundationTransport(), certPinner: certPinner, compressionHandler: compressionHandler))
}
}
I am still facing the same issue. Do you have any suggestions for a solution?
on
Websocket.swift
file change this codepublic convenience init(request: URLRequest, certPinner: CertificatePinning? = FoundationSecurity(), compressionHandler: CompressionHandler? = nil, useCustomEngine: Bool = true) { if #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *), !useCustomEngine { self.init(request: request, engine: NativeEngine()) } // else if #available(macOS 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *) { // self.init(request: request, engine: WSEngine(transport: TCPTransport(), certPinner: certPinner, compressionHandler: compressionHandler)) // } else { self.init(request: request, engine: WSEngine(transport: FoundationTransport(), certPinner: certPinner, compressionHandler: compressionHandler)) } }
can you describe what will this code do ? i am also facing the crash. and i am only dependent on starScream i am not using native socket by apple.
I am still facing the same issue. Do you have any suggestions for a solution?
on
Websocket.swift
file change this codepublic convenience init(request: URLRequest, certPinner: CertificatePinning? = FoundationSecurity(), compressionHandler: CompressionHandler? = nil, useCustomEngine: Bool = true) { if #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *), !useCustomEngine { self.init(request: request, engine: NativeEngine()) } // else if #available(macOS 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *) { // self.init(request: request, engine: WSEngine(transport: TCPTransport(), certPinner: certPinner, compressionHandler: compressionHandler)) // } else { self.init(request: request, engine: WSEngine(transport: FoundationTransport(), certPinner: certPinner, compressionHandler: compressionHandler)) } }
can you describe what will this code do ? i am also facing the crash.
this code for don't use network.framework to transport , iOS 13.0 - use foundation transport
I am still facing the same issue. Do you have any suggestions for a solution?
on
Websocket.swift
file change this codepublic convenience init(request: URLRequest, certPinner: CertificatePinning? = FoundationSecurity(), compressionHandler: CompressionHandler? = nil, useCustomEngine: Bool = true) { if #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *), !useCustomEngine { self.init(request: request, engine: NativeEngine()) } // else if #available(macOS 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *) { // self.init(request: request, engine: WSEngine(transport: TCPTransport(), certPinner: certPinner, compressionHandler: compressionHandler)) // } else { self.init(request: request, engine: WSEngine(transport: FoundationTransport(), certPinner: certPinner, compressionHandler: compressionHandler)) } }
can you describe what will this code do ? i am also facing the crash. and i am only dependent on starScream i am not using native socket by apple.
I understand , your crash for the reconnect scene?
you can connect after disconnect 0.5 second
I am still facing the same issue. Do you have any suggestions for a solution?
on
Websocket.swift
file change this codepublic convenience init(request: URLRequest, certPinner: CertificatePinning? = FoundationSecurity(), compressionHandler: CompressionHandler? = nil, useCustomEngine: Bool = true) { if #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *), !useCustomEngine { self.init(request: request, engine: NativeEngine()) } // else if #available(macOS 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *) { // self.init(request: request, engine: WSEngine(transport: TCPTransport(), certPinner: certPinner, compressionHandler: compressionHandler)) // } else { self.init(request: request, engine: WSEngine(transport: FoundationTransport(), certPinner: certPinner, compressionHandler: compressionHandler)) } }
can you describe what will this code do ? i am also facing the crash. and i am only dependent on starScream i am not using native socket by apple.
I understand , your crash for the reconnect scene? you can connect after disconnect 0.5 second
The app is crashing randomly, even though it worked fine when I first ran it on two devices. I've been repeatedly closing and joining the meeting (it's an audio-video calling app), and within milliseconds, it keeps crashing. Sometimes, this happens after 4-5 attempts. However, after a crash, if I try again within 3-4 seconds, it works fine. I have no idea how to resolve this issue or what exactly is happening
there has two problem
there has two problem
- you should use show your code (fountion transport)
- delay some time(e.g. 0.5 or 1 second) reconnect websocket when disconnect and you must be sure disconnected
Sure i will try to do that.
socket initialisation is as below:- ` var request = URLRequest(url: URL(string: "wss://(sSocketServerHostName)")!) request.timeoutInterval = 30
Environment:
Additional context