sta / sta/websocket-sharp

The header of a frame cannot be read from the stream

Open
#445 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
6.1k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Hi all!
As the title I have this error occasionally when I'm connected on websocket, I don't understand what is the problem, maybe the websocket send too much large data?
Thanks in advance!
The complete error is this:

04/04/2018 12:00:38|Fatal|<>c__DisplayClass9.<ReadBytesAsync>b__8|WebSocketSharp.WebSocketException: The header of a frame cannot be read from the stream.
                             in WebSocketSharp.WebSocketFrame.processHeader(Byte[] header)
                             in WebSocketSharp.WebSocketFrame.<>c__DisplayClassa.<readHeaderAsync>b__9(Byte[] bytes)
                             in WebSocketSharp.Ext.<>c__DisplayClass9.<ReadBytesAsync>b__8(IAsyncResult ar)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with WebSocketFrame.processHeader and the readHeaderAsync and ReadBytesAsync stack frames shown in the report. Reproduce the intermittent websocket failure and trace how the frame header is read from the stream, using the complete exception as the initial test case. Done means the cause of the unreadable header is identified and a verified fix or clear reproduction is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.