{"action":"created","issue":{"url":"https://api.github.com/repos/sta/websocket-sharp/issues/41","labels_url":"https://api.github.com/repos/sta/websocket-sharp/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/sta/websocket-sharp/issues/41/comments","events_url":"https://api.github.com/repos/sta/websocket-sharp/issues/41/events","html_url":"https://github.com/sta/websocket-sharp/issues/41","id":32309483,"number":41,"title":"\"Header part of a frame cannot be read\" when using Google Chrome","user":{"login":"ShyRed","id":1138805,"avatar_url":"https://avatars.githubusercontent.com/u/1138805?v=3","gravatar_id":"","url":"https://api.github.com/users/ShyRed","html_url":"https://github.com/ShyRed","followers_url":"https://api.github.com/users/ShyRed/followers","following_url":"https://api.github.com/users/ShyRed/following{/other_user}","gists_url":"https://api.github.com/users/ShyRed/gists{/gist_id}","starred_url":"https://api.github.com/users/ShyRed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShyRed/subscriptions","organizations_url":"https://api.github.com/users/ShyRed/orgs","repos_url":"https://api.github.com/users/ShyRed/repos","events_url":"https://api.github.com/users/ShyRed/events{/privacy}","received_events_url":"https://api.github.com/users/ShyRed/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2014-04-27T11:26:32Z","updated_at":"2015-07-13T21:55:57Z","closed_at":null,"body":"I am able to connect to my Websocket-Sharp server just fine with Firefox Version 28.0, but as soon as I try to connect using Google Chrome Version 34.0.1847.131 m, I get the following error:\r\n```\r\n27.04.2014 13:13:27|Fatal|WebSocket.acceptException|WebSocketSharp.WebSocketException: The header part of a frame cannot be read from the data source.\r\n                             bei WebSocketSharp.WsFrame.<>c__DisplayClasse.<ParseAsync>b__d(Byte[] header)\r\n                             bei WebSocketSharp.Ext.<>c__DisplayClass6.<ReadBytesAsync>b__5(IAsyncResult ar)\r\n```\r\n\r\nThe error appears both when using the NuGet version and a self compiled version directly taking from Github (latest commit 16f5c03b95).\r\n\r\nServer initialization code:\r\n```C#\r\nint port = 7777;\r\nLog.Info(\"Starting server socket at port \" + port + \"...\");\r\nthis.WebSocketServer = new WebSocketSharp.Server.WebSocketServer(port);\r\nthis.WebSocketServer.AddWebSocketService<GameWebService>(\"/game\");\r\n// TODO: Register additional services\r\nthis.WebSocketServer.Start();\r\n```\r\nService code:\r\n```C#\r\n    internal sealed class GameWebService : WebSocketSharp.Server.WebSocketService\r\n    {\r\n        private static log4net.ILog Log = log4net.LogManager.GetLogger(typeof(GameWebService));\r\n\r\n        protected override void OnOpen()\r\n        {\r\n            Log.Info(\"Open\");\r\n        }\r\n\r\n        protected override void OnClose(WebSocketSharp.CloseEventArgs e)\r\n        {\r\n            Log.Info(\"Closed\");\r\n        }\r\n\r\n        protected override void OnError(WebSocketSharp.ErrorEventArgs e)\r\n        {\r\n            Log.Error(e.Message);\r\n        }\r\n\r\n        protected override void OnMessage(WebSocketSharp.MessageEventArgs e)\r\n        {\r\n            Log.Info(e.Data);\r\n        }\r\n    }\r\n```\r\n\r\nClient connect:\r\n```JavaScript\r\nvar serverUrl = 'ws://myserveraddress:7777/game';\r\nself.connection = new WebSocket(serverUrl, ['soap']);\r\nself.connection.onerror = self.handleConnectionError;\r\nself.connection.onmessage = self.handleConnectionMessage;\r\nself.connection.onopen = self.handleConnectionOpen;\r\nself.connection.onclose = self.handleConnectionClose;\r\n```\r\n\r\nThe log shows the \"Open\" entry logged in the ```OnOpen``` method. Then the error occurs.\r\n\r\nThe client side JavaScript has a method attached to the ```onopen``` event, but does not yet send any messages (e.g. the method is empty).\r\n\r\nThe website and server are not using SSL. The error happens when connectin locally or via a remote machine over the internet.\r\n\r\nThe server uses .NET 4.5"},"comment":{"url":"https://api.github.com/repos/sta/websocket-sharp/issues/comments/121074005","html_url":"https://github.com/sta/websocket-sharp/issues/41#issuecomment-121074005","issue_url":"https://api.github.com/repos/sta/websocket-sharp/issues/41","id":121074005,"user":{"login":"jvenema","id":184213,"avatar_url":"https://avatars.githubusercontent.com/u/184213?v=3","gravatar_id":"","url":"https://api.github.com/users/jvenema","html_url":"https://github.com/jvenema","followers_url":"https://api.github.com/users/jvenema/followers","following_url":"https://api.github.com/users/jvenema/following{/other_user}","gists_url":"https://api.github.com/users/jvenema/gists{/gist_id}","starred_url":"https://api.github.com/users/jvenema/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvenema/subscriptions","organizations_url":"https://api.github.com/users/jvenema/orgs","repos_url":"https://api.github.com/users/jvenema/repos","events_url":"https://api.github.com/users/jvenema/events{/privacy}","received_events_url":"https://api.github.com/users/jvenema/received_events","type":"User","site_admin":false},"created_at":"2015-07-13T21:55:57Z","updated_at":"2015-07-13T21:55:57Z","body":"Thanks moby! Any chance you have source you can share?"}}