Open vahidamini opened 8 years ago
What version of SignalR are you using? And what version of SwiftR? And does this error happen after connecting, or after you try to invoke some server method?
My signalR version is 2.0 and swiftR version is the latest that published. This error happen while connecting. thanks for your response.
Did you set the SignalR version to 2.0?
SwiftR.signalRVersion = .v2_0_0
Yes I set it up with the same code you mentioned. But unfortunately I get this error again:
SwiftR unable to process message oxd6kero: Error Domain=WKErrorDomain Code=5 "JavaScript execution returned a result of an unsupported type" UserInfo={NSLocalizedDescription=JavaScript execution returned a result of an unsupported type}
I was upgraded my SignalR to 2.1.0 It works, but now any time I run my code the hubconnectio.state is Disconnected why?
SwiftR.transport = .ServerSentEvents
SwiftR.signalRVersion = .v2_1_0
hubConnection = SwiftR.connect("http://myurl.ir") { [weak self] connection in
connection.queryString = ["user_type": "client"]
self?.simpleHub = connection.createHubProxy("TaxiTopHub")
print(self!.hubConnection.state)
}
Finally I solve it.
What was the issue?
vahidamini could you please take the time to answer Adam's question? You may need him again!!
I was wrong , uncommenting this line of my code solved my problem: SwiftR.useWKWebView = true Thanks Adam.
thanks for the answer. it didn't solve it for me. still get: SwiftR unable to process message 3k7umb08: Error Domain=WKErrorDomain Code=5 "JavaScript execution returned a result of an unsupported type" UserInfo={NSLocalizedDescription=JavaScript execution returned a result of an unsupported type}
Hello
I have these parameters to connect my SignalR server Server Address : http://myurl.com Hub Proxy : TaxiTopHub Query String: "user_type=client"
I configured my connection like this
hubConnection = SwiftR.connect("http://myurl.com") { [weak self] connection in connection.queryString = ["user_type": "client"] self?.simpleHub = connection.createHubProxy("TaxiTopHub")
but when I run my code I get this error : SwiftR unable to process message 1i9k4s3y: Error Domain=WKErrorDomain Code=5 "JavaScript execution returned a result of an unsupported type" UserInfo={NSLocalizedDescription=JavaScript execution returned a result of an unsupported type}
Please help me if it's possible