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

connectection unstable #281

Open
syrakozz opened this issue Nov 29, 2016 · 7 comments
Open

connectection unstable #281

syrakozz opened this issue Nov 29, 2016 · 7 comments

Comments

@syrakozz
Copy link

the connection is always broken , and when we try to reconnect, its keep trying but with no luck ,
what is the possible solution

@syrakozz
Copy link
Author

syrakozz commented Nov 29, 2016

i got this error while reconnecting

2016-11-25 22:12:18.463 xxxe[5703:99947] CONNECTION:connection state did change from 3 to 0
2016-11-25 22:12:18.463 xxxe[5703:99947] CONNECTION:	will negotiate
2016-11-25 22:12:18.463 xxxe[5703:99947] WS:	websocket will negotiate
2016-11-25 22:12:18.465 xxxe[5703:99947] TRANSPORT:	will negotiate at url: https://dev-xxxeservice.azurewebsites.net/signalr/negotiate?clientProtocol=1.3.0.0&transport=webSockets
2016-11-25 22:12:18.468 xxxe[5703:99947] CONNECTION:	connection did close
2016-11-25 22:12:53.418 xxxe[5703:99947] CONNECTION:	connection state did change from 3 to 0
2016-11-25 22:12:53.422 xxxe[5703:99947] CONNECTION:	will negotiate
2016-11-25 22:12:53.432 xxxe[5703:99947] WS:	websocket will negotiate
2016-11-25 22:12:53.435 xxxe[5703:99947] TRANSPORT:	will negotiate at url: https://dev-xxxeservice.azurewebsites.net/signalr/negotiate?clientProtocol=1.3.0.0&transport=webSockets
2016-11-25 22:12:53.441 xxxe[5703:99947] TRANSPORT:	negotiate failed Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSErrorFailingURLStringKey=https://dev-xxxeservice.azurewebsites.net/signalr/negotiate?clientProtocol=1.3.0.0&transport=webSockets, kCFStreamErrorCodeKey=-2102, NSErrorFailingURLKey=https://dev-xxxeservice.azurewebsites.net/signalr/negotiate?clientProtocol=1.3.0.0&transport=webSockets, NSLocalizedDescription=The request timed out., kCFStreamErrorDomainKey=4, NSUnderlyingError=0x81fc5b40 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "The request timed out." UserInfo={_kCFStreamErrorCodeKey=-2102, NSErrorFailingURLStringKey=https://dev-xxxeservice.azurewebsites.net/signalr/negotiate?clientProtocol=1.3.0.0&transport=webSockets, NSErrorFailingURLKey=https://dev-xxxeservice.azurewebsites.net/signalr/negotiate?clientProtocol=1.3.0.0&transport=webSockets, NSLocalizedDescription=The request timed out., _kCFStreamErrorDomainKey=4}}}
2016-11-25 22:12:53.446 xxxe[5703:99947] CONNECTION:	negotiation failed Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSErrorFailingURLStringKey=https://dev-xxxeservice.azurewebsites.net/signalr/negotiate?clientProtocol=1.3.0.0&transport=webSockets, kCFStreamErrorCodeKey=-2102, NSErrorFailingURLKey=https://dev-xxxeservice.azurewebsites.net/signalr/negotiate?clientProtocol=1.3.0.0&transport=webSockets, NSLocalizedDescription=The request timed out., kCFStreamErrorDomainKey=4, NSUnderlyingError=0x81fc5b40 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "The request timed out." UserInfo={_kCFStreamErrorCodeKey=-2102, NSErrorFailingURLStringKey=https://dev-xxxeservice.azurewebsites.net/signalr/negotiate?clientProtocol=1.3.0.0&transport=webSockets, NSErrorFailingURLKey=https://dev-xxxeservice.azurewebsites.net/signalr/negotiate?clientProtocol=1.3.0.0&transport=webSockets, NSLocalizedDescription=The request timed out., _kCFStreamErrorDomainKey=4}}}
2016-11-25 22:12:53.447 xxxe[5703:99947] CONNECTION:	connection did receive error Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSErrorFailingURLStringKey=https://dev-xxxeservice.azurewebsites.net/signalr/negotiate?clientProtocol=1.3.0.0&transport=webSockets, kCFStreamErrorCodeKey=-2102, NSErrorFailingURLKey=https://dev-xxxeservice.azurewebsites.net/signalr/negotiate?clientProtocol=1.3.0.0&transport=webSockets, NSLocalizedDescription=The request timed out., kCFStreamErrorDomainKey=4, NSUnderlyingError=0x81fc5b40 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "The request timed out." UserInfo={_kCFStreamErrorCodeKey=-2102, NSErrorFailingURLStringKey=https://dev-xxxeservice.azurewebsites.net/signalr/negotiate?clientProtocol=1.3.0.0&transport=webSockets, NSErrorFailingURLKey=https://dev-xxxeservice.azurewebsites.net/signalr/negotiate?clientProtocol=1.3.0.0&transport=webSockets, NSLocalizedDescription=The request timed out., _kCFStreamErrorDomainKey=4}}}
(lldb) po error
Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSErrorFailingURLStringKey=https://dev-xxxeservice.azurewebsites.net/signalr/negotiate?clientProtocol=1.3.0.0&transport=webSockets, kCFStreamErrorCodeKey=-2102, NSErrorFailingURLKey=https://dev-xxxeservice.azurewebsites.net/signalr/negotiate?clientProtocol=1.3.0.0&transport=webSockets, NSLocalizedDescription=The request timed out., kCFStreamErrorDomainKey=4, NSUnderlyingError=0x81fc5b40 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "The request timed out." UserInfo={_kCFStreamErrorCodeKey=-2102, NSErrorFailingURLStringKey=https://dev-xxxeservice.azurewebsites.net/signalr/negotiate?clientProtocol=1.3.0.0&transport=webSockets, NSErrorFailingURLKey=https://dev-xxxeservice.azurewebsites.net/signalr/negotiate?clientProtocol=1.3.0.0&transport=webSockets, NSLocalizedDescription=The request timed out., _kCFStreamErrorDomainKey=4}}}

@syrakozz
Copy link
Author

syrakozz commented Dec 4, 2016

is it a server site or client issue ?

@joeldart
Copy link
Member

joeldart commented Dec 6, 2016

somethign that just stood out to me is the negotiate goign over websockets. What client code are you using to connect?

@syrakozz
Copy link
Author

syrakozz commented Dec 7, 2016

im using DyKnow/SignalR-ObjC

@syrakozz
Copy link
Author

syrakozz commented Dec 7, 2016

and i tried with auto and with websocket

@joeldart
Copy link
Member

joeldart commented Dec 7, 2016

I mean, the objective c code. Your connection to the server, firewalls, whether you use https, etc will largely dictate whether a websockets connection is stable or if it has to fall back to a different transport. What I'm surprised by is that in my usage, the negotiate never goes over websocket as one of the concerns of negotiate is to figure out whether you can use websockets

Here's an example (from the readme) of what code I was asking about

// Connect to the service
SRHubConnection *hubConnection = [SRHubConnection connectionWithURLString:@"http://localhost/mysite"];
// Create a proxy to the chat service
SRHubProxy *chat = [hubConnection createHubProxy:@"chat"];
[chat on:@"addMessage" perform:self selector:@selector(addMessage:)];

@richa-pathak
Copy link

Even i am facing the same issue. Is there any solution to resolve this error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants