sta / sta/websocket-sharp

System.IO.EndOfStreamException: The header cannot be read from the data source.

Open
#565 0 comments 1 reaction 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

Hello, I purchased a Unity Asset "SocketIO for Native and WebGL builds" that implements websocket-sharp few months ago for a game I am developing found at https://knor.io.

While you will notice that my WebGL Client Works perfectly fine connecting to my SSL Socket.io Game Server; When I try to connect to my server with SSL Enabled from Unity Editor or other Standalone Builds it fails to connect.

Here is the Error I am seeing:

|Fatal|WebSocket.connect|WebSocketSharp.WebSocketException: An exception has occurred while reading an HTTP request/response. ---> System.IO.EndOfStreamException: The header cannot be read from the data source.

If I used HTTP I can connect just fine from any platform, but the issue is I need to host my Socket.io Game Server over SSL. Right now I am using us-east.knor.io as URL and Port 443 with Ssl Enabled. Again it works perfect from WebGL Client, but from Unity Editor and Standalone it fails to connect. It's very strange. Any ideas on how to address this issue?

Your time will be greatly appreciated!

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 by reproducing the SSL connection from the Unity Editor or a standalone build against us-east.knor.io on port 443, then compare it with the working WebGL connection. Read the reported WebSocketException and EndOfStreamException while checking the HTTP request/response path. Done means identifying and resolving the platform-specific SSL connection failure, with a confirmed connection from the affected builds.

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.