Search Issue Tracker
Fixed in 5.3.7
Votes
27
Found in
4.6.5f1
Issue ID
723177
Regression
No
[WebPlayer] [System.Net.Security.SslStream] SslStream.AuthenticateAsClient times out randomly
Reproduction steps:
1. Open attached project
2. Open scene "TestScene"
3. Enter play mode
4. Observe the console logs. If the request completes successfully, "Response received" will be printed. If it fails, indicating the bug has occurred, "Response failed" will be printed. Note, it takes exactly 5 minutes for the failure to occur. If the call does succeed, it typically takes a second or two. Therefore, if you find yourself waiting for more than 10 seconds, you can be reasonably certain the bug will occur.
5. If the bug does not occur, restart the editor and try again (it almost always does occur)
Comments (8)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "Browse" button for Xcode in the "Build Profiles" window is too big
- USS styles fail to inherit correctly when contentContainer is overridden in a custom control
- Copying and pasting Animator Transitions leads to unexpected behaviour
- "ShaderGraph" misses a space in the "Project Settings" section
- UI Builder inspector’s checkbox fields can be activated when clicking anywhere in the value field
JoshPeterson
Jul 07, 2016 12:09
We've tracked down the cause of this problem and corrected it. The fix should be available in the 5.3.6 release of Unity. This bug report is similar to a number of other bug reports. Here is the complete list of bugs corrected with this fix:
723177 - https://issuetracker.unity3d.com/issues/system-dot-net-dot-security-dot-sslstream-sslstream-dot-authenticateasclient-times-out-randomly
759719 - https://issuetracker.unity3d.com/issues/beginsendto-async-socket-send-doesnt-call-callback-function-on-first-editor-open
759191 - https://issuetracker.unity3d.com/issues/windows-exception-thrown-by-mono-dot-security-dot-protocol-dot-tls-dot-sslstreambase-dot-endread
733920 - https://issuetracker.unity3d.com/issues/asynchronous-network-operations-hangs-twice-after-opening-unity-editor
Lars-Blaabjerg
May 24, 2016 08:22
There seems to be a difference in how often it occurs with different websites. I happened to make a test with https://dk.godaddy.com (our certificate provider) and with that, it happens every time.
There is a small difference in how far it gets before it times out, but the exception is always "Mono.Security.Protocol.Tls.TlsException: Couldn't complete EndRead".
Sometimes it gets to call the RemoteCertificateValidationCallback and sometimes it would even complete AuthenticateAsClient, only to fail with the same exception, when proceeding to read the stream.
Do I need to make a repro project for you?
Lars-Blaabjerg
May 23, 2016 13:54
And also 5.3.5f1
albal
May 23, 2016 11:43
Seeing it also in 5.3.4f1.
Lars-Blaabjerg
May 23, 2016 11:09
I'm seeing this in 5.3.4f1. Please fix it.
cdd990
Mar 09, 2016 05:42
I'm currently using Unity5.3.1p2, this issue still exist.......help..........
phodges
Jan 05, 2016 12:25
Not so much randomly, as entirely predictably for us when running in the windows editor in 5.3.1f1: play in editor once, shutdown and play again and we hit this snag. Here's some callstack:
1/5/2016 11:39:27 AM|FATAL|WebSocket.acceptException|Mono.Security.Protocol.Tls.TlsException: Couldn't complete EndRead
at Mono.Security.Protocol.Tls.SslStreamBase.EndRead (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
at System.Net.Security.SslStream.EndAuthenticateAsClient (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
at System.Net.Security.SslStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, SslProtocols sslProtocolType, Boolean checkCertificateRevocation) [0x00000] in <filename unknown>:0
at System.Net.Security.SslStream.AuthenticateAsClient (System.String targetHost) [0x00000] in <filename unknown>:0
at WebSocketSharp.WsStream.CreateClientStream (System.Net.Sockets.TcpClient client, Boolean secure, System.String host, System.Net.Security.RemoteCertificateValidationCallback validationCallback) [0x00000] in <filename unknown>:0
at WebSocketSharp.WebSocket.setClientStream () [0x00000] in <filename unknown>:0
at WebSocketSharp.WebSocket.doHandshake () [0x00000] in <filename unknown>:0
at WebSocketSharp.WebSocket.connect () [0x00000] in <filename unknown>:0
An exception has occurred while connecting.
KJoanette
Sep 09, 2015 11:27
This is incredibly important and needs to be addressed ASAP. There are a good number of us stuck on this one and requiring to roll our own native networking to support SSL.