Websocket closed with status code: 1011
See original GitHub issueAbp version: 3.6.0 framework: .Net Core. I using Abp.AspNetCore.SignalR in .Net Framework and .Net Core. and it’s normal in 3.5.0. When I upgraded to 3.6.0, .Net Framework is ok, but there was an error under.Net Core.
Here is the log:
ERROR 2018-05-09 15:49:05,211 [51 ] oft.AspNetCore.Sockets.ConnectionManager - Failed disposing connection 9c12c921-445e-49c2-9079-c87c7807225f.
System.Net.WebSockets.WebSocketException (0x80004005): The remote party closed the WebSocket connection without completing the close handshake. ---> System.MissingMethodException: Method not found: 'Boolean System.Memory`1.TryGetArray(System.ArraySegment`1<!0> ByRef)'.
at System.Net.WebSockets.ManagedWebSocketExtensions.ReadAsync(Stream stream, Memory`1 destination, CancellationToken cancellationToken)
at System.Net.WebSockets.ManagedWebSocket.<EnsureBufferContainsAsync>d__71.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.WebSockets.ManagedWebSocket.<ReceiveAsyncPrivate>d__62`2.MoveNext()
at System.Net.WebSockets.ManagedWebSocket.<ReceiveAsyncPrivate>d__62`2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Sockets.Internal.Transports.WebSocketsTransport.<StartReceiving>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Sockets.Internal.Transports.WebSocketsTransport.<ProcessSocketAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Sockets.Internal.Transports.WebSocketsTransport.<ProcessRequestAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Sockets.DefaultConnectionContext.<WaitOnTasks>d__63.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Sockets.DefaultConnectionContext.<DisposeAsync>d__62.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Sockets.ConnectionManager.<DisposeAndRemoveAsync>d__15.MoveNext()
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Websocket closed with status code: 1011 - ASP.NET ...
stop(Error: WebSocket closed with status code: 1011 ().) ignored because the connection is already in the disconnected state. Utils.js:228 [2020 ...
Read more >WebSocketCloseStatus Enum (System.Net.WebSockets)
(1011) The connection will be closed by the server because of an error on the server. InvalidMessageType, 1003. (1003) The client or server...
Read more >GlobalEvent websocket closed with reason code as 1011
/** * "1011 indicates that a server is terminating the connection because it encountered * an unexpected condition that prevented it from ...
Read more >WebSocket Status Codes Cheat Sheet
1011 indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request. 1012 ......
Read more >Websocket close frame control
1011 indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just wanted to post here since it’s one of the first Google results to come up for this error. I spent the better part of a day trying to figure out the solution, so hope this helps someone. First, I was running ASP.NET Core 3.0. I had to upgrade to the latest preview version on NPM, and of course ensure that I was running the latest .NET Core 3.0 preview SDK. However, that didn’t solve my problems. After much searching, and the client-side SignalR logging showing no recourse, I found out that the SignalR library doesn’t actually show logs in the server-side console window during debugging unless explicitly told. Enable it in Program.cs:
In my case, I found out that the Redis backplane that I had enabled was being blocked by the firewall, silently erroring out and closing the connection. After whitelisting my IP, all went well!
I have added the logging configuration as @neil-119 said.
And then, when i ran the app, i received the following message:
This happen when you have two or more lib referencing the same lib with different version. When this happen, just one of the version will be choosen by runtime locates assembly. For better explaination search: https://medium.com/@RupaniChirag/how-to-resolve-could-not-load-file-or-assembly-or-one-of-its-dependencies-and-why-this-cf8d48d788eb
To resolve this i’ve simply to go to the nuget manager and install the lastest version of System.Text.Encodings.Web Therefore, this error can occur for diverse reason, my main advice is to set on the logging and then see the message on the terminal to fix.