Unobserved exception in .NET client #2405

Closed
davidfowl opened this Issue Aug 7, 2013 · 7 comments

Comments

Projects
None yet
3 participants

@ghost ghost assigned halter73 Aug 7, 2013

Owner

davidfowl commented Aug 7, 2013

Hmm the websocket trace has a long polling transport log. Not sure if that's even related. Maybe this bug is specific to websockets.

Member

halter73 commented Aug 9, 2013

No way this is WebSocket related. The thread throwing the unobserved exception must have been spawned from another test run. I think that Disconnect nulled out the ConnectionToken before the PollingRequestHandler stopped.

Owner

davidfowl commented Aug 9, 2013

My bad, I meant longpollong

Owner

davidfowl commented Aug 9, 2013

Its definitely the long polling transport from another test throwing an error

Owner

davidfowl commented Aug 13, 2013

Happened again:
http://ci.signalr.net/repository/download/bt10/6068:id/artifacts/Release/projects/Microsoft.AspNet.SignalR.FunctionalTests/ConnectionFacts%2BStart.ClientStopsReconnectingAfterDisconnectTimeout.HttpListener.ServerSentEvents.459.test.trace.log

The polling handler seems to keeps running after we're disconnected.

MSBuild.exe Error: 0 : Unobserved task exception: System.ArgumentNullException: Value cannot be null.
Parameter name: stringToEscape
   at System.Uri.EscapeDataString(String stringToEscape)
   at Microsoft.AspNet.SignalR.Client.Transports.TransportHelper.GetReceiveQueryString(IConnection connection, String connectionData, String transport) in d:\BuildAgent\work\2ebbeab341bc5e27\src\Microsoft.AspNet.SignalR.Client\Transports\TransportHelper.cs:line 73
   at Microsoft.AspNet.SignalR.Client.Transports.LongPollingTransport.<>c__DisplayClassd.<PollingSetup>b__5() in d:\BuildAgent\work\2ebbeab341bc5e27\src\Microsoft.AspNet.SignalR.Client\Transports\LongPollingTransport.cs:line 111
   at Microsoft.AspNet.SignalR.Client.Transports.PollingRequestHandler.Poll() in d:\BuildAgent\work\2ebbeab341bc5e27\src\Microsoft.AspNet.SignalR.Client\Transports\LongPolling\PollingRequestHandler.cs:line 90
   at Microsoft.AspNet.SignalR.Client.Transports.PollingRequestHandler.<Poll>b__12() in d:\BuildAgent\work\2ebbeab341bc5e27\src\Microsoft.AspNet.SignalR.Client\Transports\LongPolling\PollingRequestHandler.cs:line 141
   at Microsoft.AspNet.SignalR.TaskAsyncHelper.<>c__DisplayClass2e.<RunTask>b__2d(Task t) in d:\BuildAgent\work\2ebbeab341bc5e27\src\Microsoft.AspNet.SignalR.Core\TaskAsyncHelper.cs:line 979

halter73 added a commit that referenced this issue Aug 16, 2013

Fix race where PollingRequestHandler continues after Disconnect
- This causes an unobserved exception in the .NET client

#2405

halter73 added a commit that referenced this issue Aug 16, 2013

Fix race where PollingRequestHandler continues after Disconnect
- This causes an unobserved exception in the .NET client

#2405

halter73 added a commit that referenced this issue Aug 16, 2013

Fix race where PollingRequestHandler continues after Disconnect
- This causes an unobserved exception in the .NET client

#2405
Contributor

gustavo-armenta commented Aug 20, 2013

I still get UnobservedTaskExceptions in LongPolling, look latest commit on branch test2405

Contributor

gustavo-armenta commented Aug 23, 2013

My bad, after looking at the unobserved exception, it was caused by my code not awaiting on Invoke() methods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment