kerryjiang / WebSocket4Net

A popular .NET WebSocket Client
Apache License 2.0
764 stars 273 forks source link

EXCEPTION Exception !!!: System.NullReferenceException at WebSocket4Net.Protocol.DraftHybi10Processor.SendHandshake #165

Closed srborha closed 1 month ago

srborha commented 4 years ago

Facing same issue of null pointer exception https://github.com/kerryjiang/WebSocket4Net/issues/80

Library used : WebSocket4Net (0.15.2) NETStandard.Library(2.0.3) .NET standard 2.0 used

Exception !!! : [org.tizen.art-app] [2297] EXCEPTION Exception !!!: System.NullReferenceException: Object reference not set to an instance of an object. at WebSocket4Net.Protocol.DraftHybi10Processor.SendHandshake(WebSocket websocket) at WebSocket4Net.WebSocket.OnConnected() at WebSocket4Net.WebSocket.client_Connected(Object sender, EventArgs e) at SuperSocket.ClientEngine.ClientSession.OnConnected() at SuperSocket.ClientEngine.AsyncTcpSession.OnGetSocket(SocketAsyncEventArgs e) at SuperSocket.ClientEngine.TcpClientSession.ProcessConnect(Socket socket, Object state, SocketAsyncEventArgs e, Exception exception) at SuperSocket.ClientEngine.ConnectAsyncExtension.SocketAsyncEventCompleted(Object sender, SocketAsyncEventArgs e) at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e) at System.Net.Sockets.SocketAsyncEventArgs.ExecutionCallback(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationAsyncSuccess(Int32 bytesTransferred, SocketFlags flags) at System.Net.Sockets.SocketAsyncEventArgs.CompletionCallback(Int32 bytesTransferred, SocketFlags flags, SocketError socketError) at System.Net.Sockets.SocketAsyncEventArgs.ConnectCompletionCallback(SocketError socketError) at System.Net.Sockets.SocketAsyncContext.ConnectOperation.InvokeCallback(Boolean allowPooling) at System.Net.Sockets.SocketAsyncContext.OperationQueue`1.ProcessAsyncOperation(TOperation op) at System.Net.Sockets.SocketAsyncContext.WriteOperation.System.Threading.IThreadPoolWorkItem.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

ankitsharma246 commented 4 years ago

facing same issue in version 0.15.2

patrick-leijser-tfs commented 3 years ago

@kerryjiang when will this isssue be fixed?

MarkoPielic commented 2 years ago

we are having same issue on 0.15.2 as well

kerryjiang commented 1 month ago

Please try WebSocket4Net latest beta release: https://www.nuget.org/packages/WebSocket4Net/1.0.0-beta.4