ArchiSteamFarm icon indicating copy to clipboard operation
ArchiSteamFarm copied to clipboard

Error while sending TLS Alert

Open reeporter opened this issue 10 years ago • 5 comments

Hello

i am getting the following error sometimes. When i get the error i need to restart ASF several times and then it might work.

Mono Version 4.5.2 OS raspbian JESSIE

i can provide additional logs if needed

06/22/2016 12:02:28 [!] EXCEPTION: UrlRequest() The server stopped the handshake. StackTrace: at Mono.Security.Protocol.Tls.SslClientStream.SafeEndReceiveRecord (IAsyncResult ar, Boolean ignoreEmpty) [0x00000] in :0 at Mono.Security.Protocol.Tls.SslClientStream.NegotiateAsyncWorker (IAsyncResult result) [0x00000] in :0 06/22/2016 12:02:24 [!] EXCEPTION: UrlRequest() Error while sending TLS Alert (Fatal:InternalError): System.IO.IOException: The authentication or decryption has failed. ---> Mono.Security.Protocol.Tls.TlsException: The server stopped the handshake. at Mono.Security.Protocol.Tls.SslClientStream.SafeEndReceiveRecord (IAsyncResult ar, Boolean ignoreEmpty) [0x00000] in :0 at Mono.Security.Protocol.Tls.SslClientStream.NegotiateAsyncWorker (IAsyncResult result) [0x00000] in :0 --- End of inner exception stack trace --- at Mono.Security.Protocol.Tls.SslClientStream.EndNegotiateHandshake (IAsyncResult result) [0x00000] in :0 at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (IAsyncResult asyncResult) [0x00000] in :0 StackTrace: at System.Net.WebConnection.EndWrite (System.Net.HttpWebRequest request, Boolean throwOnError, IAsyncResult result) [0x00000] in :0 at System.Net.WebConnectionStream+c__AnonStorey1.<>m__0 (IAsyncResult r) [0x00000] in :0 06/22/2016 12:02:27 [!] EXCEPTION: UrlRequest() The server stopped the handshake. StackTrace: at Mono.Security.Protocol.Tls.SslClientStream.SafeEndReceiveRecord (IAsyncResult ar, Boolean ignoreEmpty) [0x00000] in :0 at Mono.Security.Protocol.Tls.SslClientStream.NegotiateAsyncWorker (IAsyncResult result) [0x00000] in :0 06/22/2016 12:02:30 [!] EXCEPTION: UrlRequest() The authentication or decryption has failed. StackTrace: at Mono.Security.Protocol.Tls.SslClientStream.EndNegotiateHandshake (IAsyncResult result) [0x00000] in :0 at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (IAsyncResult asyncResult) [0x00000] in :0 06/22/2016 12:02:28 [!] EXCEPTION: UrlRequest() The authentication or decryption has failed. StackTrace: at Mono.Security.Protocol.Tls.SslClientStream.EndNegotiateHandshake (IAsyncResult result) [0x00000] in :0 at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (IAsyncResult asyncResult) [0x00000] in :0 06/22/2016 12:02:30 [!] EXCEPTION: UrlRequest() The server stopped the handshake. StackTrace: at Mono.Security.Protocol.Tls.SslClientStream.SafeEndReceiveRecord (IAsyncResult ar, Boolean ignoreEmpty) [0x00000] in :0 at Mono.Security.Protocol.Tls.SslClientStream.NegotiateAsyncWorker (IAsyncResult result) [0x00000] in :0 06/22/2016 12:02:31 [!] EXCEPTION: UrlRequest() The server stopped the handshake. StackTrace: at Mono.Security.Protocol.Tls.SslClientStream.SafeEndReceiveRecord (IAsyncResult ar, Boolean ignoreEmpty) [0x00000] in :0 at Mono.Security.Protocol.Tls.SslClientStream.NegotiateAsyncWorker (IAsyncResult result) [0x00000] in :0

reeporter avatar Jun 22 '16 10:06 reeporter

Try: apt-get install ca-certificates # Common CA certificates are needed for ASF to work Else: mozroots --import --sync

https://github.com/JustArchi/ArchiSteamFarm/wiki/Mono

Pandiora avatar Jun 22 '16 12:06 Pandiora

Hi

apt-get install ca-certificates ca-certificates are already installed

mozroots --import --sync No certificates were found.

the error is beeing thrown randomly over several bot instances.

sometimes all of them work out of the box

somtimes this error is thrown and some instances wont run

reeporter avatar Jun 22 '16 14:06 reeporter

The server stopped the handshake.

This indicates either Mono bug, or Steam server bug. You could potentially decrease likeness of such errors by Forcing HTTP, although that is not recommended - you should instead try to search for real cause.

It doesn't look like problem with certificates, I'm more likely to believe in runtime or Steam in this case. Or even in your network.

If it doesn't happen too often, I'd say just leave it, ASF is smart enough to handle it. If it does, perhaps the Mono you've got has a bug. Can you try with other one? I'd try latest Mono from your Raspbian Testing branch - it's in version 4.2, but it should run ASF correctly: https://packages.debian.org/stretch/mono-complete

Or if you can try latest stable from Mono directly - the one I recommend in Wiki, it's in version 4.4 and should work best. I don't know if it's compatible with Raspberry though, definitely not with 1, perhaps with 2+.

JustArchi avatar Jun 22 '16 15:06 JustArchi

I have tested it with 2 mono Versions

Mono JIT compiler version 4.0.2 (Debian 4.0.2.5+dfsg-2~rpi1) Mono JIT compiler version 4.5.2 (master/6b3a592 Mi 15. Jun 05:12:32 CEST 2016)

4.0.2 seems to work smoothly

4.5.2 looks like it has an issue with the encryption part of the http client

I dont know if its worth the trouble to recompile mono again but i am gonna do it in the next days...

Thanks Archi

reeporter avatar Jun 22 '16 15:06 reeporter

It's nice that you found out it's Mono bug in the end :+1:

Yes, such issues happen - Mono is not perfect. If the issue still exists in latest master Mono, perhaps it's worth it reporting to bugzilla, so it can be dealt with.

In general, if you're looking for stable Mono to compile, I suggest going to http://download.mono-project.com/sources/mono/ and picking up latest version. GitHub version sometimes works, sometimes doesn't, and you really shouldn't count on it that it does. Stable version is at least a bit tested, and should work in most cases.

I'm using my own self-compiled latest master on my server, so I know exactly Mono quirks and that it's not always as stable as it's supposed to - even small change can have dramatic effects, that's why I'm used to such issues. If you don't want to use binary packages, yet you don't want to experiment much with Mono framework and own self-compiled versions, it should be good enough to pick up latest stable sources and use them :+1:

JustArchi avatar Jun 22 '16 16:06 JustArchi