I'm attempting to run the following code on an Android client using the head revision of the repo:
...
// Change to the IP address and matching port of your SignalR server.
connection = new HubConnection("http://fa-signalr-demo.azurewebsites.net/", "", true, logger);
hub = connection.createHubProxy("chatHub");
...
// This code is an async task so that it wouldn't hang the main thread when debugging.
SignalRFuture<Void> awaitConnection = connection.start();
try {
awaitConnection.get();
}
catch (InterruptedException e) {
e.printStackTrace();
} catch (ExecutionException e) {
e.printStackTrace();
}
...
However the get() function never returns and no connection seems to get established. If I attempt to do anything with the connection object after this point, an exception is thrown as it is in a 'Connecting' state but it never moves from this state.
This is occuring on multiple devices: a Samsung Galaxy S4 with Android 4.4.2 and a Motorola X wtih Android 4.4.4, are the devices I'm using most often.
01-27 21:03:19.039: W/ActivityThread(13738): Application com.example.signalrchat is waiting for the debugger on port 8100...
01-27 21:03:19.049: I/System.out(13738): Sending WAIT chunk
01-27 21:03:19.049: I/dalvikvm(13738): Debugger is active
01-27 21:03:19.249: I/System.out(13738): Debugger has connected
01-27 21:03:19.249: I/System.out(13738): waiting for debugger to settle...
01-27 21:03:19.449: I/System.out(13738): waiting for debugger to settle...
01-27 21:03:19.649: I/System.out(13738): waiting for debugger to settle...
01-27 21:03:19.850: I/System.out(13738): waiting for debugger to settle...
01-27 21:03:20.050: I/System.out(13738): waiting for debugger to settle...
01-27 21:03:20.250: I/System.out(13738): waiting for debugger to settle...
01-27 21:03:20.450: I/System.out(13738): waiting for debugger to settle...
01-27 21:03:20.660: I/System.out(13738): debugger has settled (1449)
01-27 21:03:20.690: W/ApplicationPackageManager(13738): getCSCPackageItemText()
01-27 21:03:20.690: I/PersonaManager(13738): getPersonaService() name persona_policy
01-27 21:03:20.861: I/SignalR(13738): HubConnection - Creating hub proxy: chathub
01-27 21:03:20.881: I/SignalR(13738): HubProxy chatHub - Subscribe to event broadcastMessage
01-27 21:03:20.881: I/SignalR(13738): HubProxy chatHub - Creating new subscription for: broadcastmessage
01-27 21:03:20.941: I/SignalR(13738): HubConnection - Entered startLock in start
01-27 21:03:20.941: I/SignalR(13738): State Changed- Connecting
01-27 21:03:20.951: I/SignalR(13738): HubConnection - Start the connection, using AutomaticTransport transport
01-27 21:03:20.951: I/SignalR(13738): HubConnection - Start negotiation
01-27 21:03:20.951: I/SignalR(13738): AutomaticTransport - Start the negotiation with the server
01-27 21:03:21.061: I/Adreno-EGL(13738): <qeglDrvAPI_eglInitialize:381>: EGL 1.4 QUALCOMM build: (CL3869936)
01-27 21:03:21.061: I/Adreno-EGL(13738): OpenGL ES Shader Compiler Version: 17.01.11.SPL
01-27 21:03:21.061: I/Adreno-EGL(13738): Build Date: 01/17/14 Fri
01-27 21:03:21.061: I/Adreno-EGL(13738): Local Branch:
01-27 21:03:21.061: I/Adreno-EGL(13738): Remote Branch:
01-27 21:03:21.061: I/Adreno-EGL(13738): Local Patches:
01-27 21:03:21.061: I/Adreno-EGL(13738): Reconstruct Branch:
01-27 21:03:21.071: I/SignalR(13738): HubConnection - Getting connection data: [{"name":"chathub"}]
01-27 21:03:21.081: I/SignalR(13738): HubConnection - Getting connection data: [{"name":"chathub"}]
01-27 21:03:21.081: I/SignalR(13738): AutomaticTransport - Execute the request
01-27 21:03:21.081: I/SignalR(13738): Create new thread for HTTP Connection
01-27 21:03:21.091: I/SignalR(13738): Execute the HTTP Request
01-27 21:03:21.091: I/SignalR(13738): URL: http://fa-signalr-demo.azurewebsites.net/signalr/negotiate?clientProtocol=1.3&connectionData=%5B%7B%22name%22%3A%22chathub%22%7D%5D&
01-27 21:03:21.091: I/SignalR(13738): VERB: GET
01-27 21:03:21.091: I/SignalR(13738): Header User-Agent: SignalR (lang=Java; os=android; version=2.0)
01-27 21:03:21.091: I/SignalR(13738): CONTENT: null
01-27 21:03:21.101: D/OpenGLRenderer(13738): Enabling debug mode 0
01-27 21:03:21.281: V/RenderScript(13738): 0x7949c7b0 Launching thread(s), CPUs 4
01-27 21:03:22.232: I/SignalR(13738): Request executed
01-27 21:03:22.492: I/SignalR(13738): AutomaticTransport - Response received
01-27 21:03:22.492: I/SignalR(13738): AutomaticTransport - Read response data to the end
01-27 21:03:22.492: I/SignalR(13738): AutomaticTransport - Trigger onSuccess with negotiation data: {"Url":"/signalr","ConnectionToken":"9GTf9SuWo5p3VFOU2Rb1ohoVEclbIlQtsFj/mgCzmd2Dr1Zx7GVUi+TSRodi83lsEt9HUe9d2rz9oLPNXT7IKKd7valdgmXY0AoPifyalxcErRCTJtYOyxi/3mgM5IqO","ConnectionId":"25d6320a-5db4-4148-8ac6-a421c5d8ae4f","KeepAliveTimeout":20.0,"DisconnectTimeout":30.0,"ConnectionTimeout":110.0,"TryWebSockets":true,"ProtocolVersion":"1.3","TransportConnectTimeout":5.0,"LongPollDelay":0.0}
01-27 21:03:22.502: I/SignalR(13738): HubConnection - Negotiation completed
01-27 21:03:22.502: I/SignalR(13738): HubConnection - ConnectionId: 25d6320a-5db4-4148-8ac6-a421c5d8ae4f
01-27 21:03:22.502: I/SignalR(13738): HubConnection - ConnectionToken: 9GTf9SuWo5p3VFOU2Rb1ohoVEclbIlQtsFj/mgCzmd2Dr1Zx7GVUi+TSRodi83lsEt9HUe9d2rz9oLPNXT7IKKd7valdgmXY0AoPifyalxcErRCTJtYOyxi/3mgM5IqO
01-27 21:03:22.512: I/SignalR(13738): HubConnection - Keep alive timeout: 20.0
01-27 21:03:22.512: I/SignalR(13738): HubConnection - Entered startLock in startTransport
01-27 21:03:22.512: I/SignalR(13738): HubConnection - Starting the transport
01-27 21:03:22.512: I/SignalR(13738): HubConnection - Starting transport for InitialConnection
01-27 21:03:22.512: I/SignalR(13738): HubConnection - Getting connection data: [{"name":"chathub"}]
01-27 21:03:22.512: I/SignalR(13738): HubConnection - Getting connection data: [{"name":"chathub"}]