Xamarin Android SSL Error connecting to SignalR

SSB 71 Reputation points

Hi I am all of a sudden getting an SSL error when connecting to SignalR from my Xamarin Android app. it is only on Android, not on iPhone.

I am running dot net core WebApi and can connect to that from the Android app (https://) , but SignalR is throwing an error when running the StartAsync() method on the hub connection

Any ideas how to resolve or how to investigate this further please?

Message "The SSL connection could not be established, see inner exception."

InnerException {System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception. ---> Mono.Btls.MonoBtlsException: Ssl error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED at /Users/builder/jenkins/workspace/archive-mono/…}

StackTrace " at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore (System.IO.Stream stream, System.Net.Security.SslClientAuthenticationOptions sslOptions, System.Threading.CancellationToken cancellationToken) [0x000f6] in /Users/builder/jenkins/workspace/arch…"

A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,001 questions
A set of technologies in the .NET Framework for building web applications and XML web services.
1,478 questions
{count} vote

4 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 35,791 Reputation points

    android is complaining that the SSL certificate is not trusted. that is its not signed by trusted source. if this is a self signed certificate, you must install it on the phone. google for instructions for your version of Android.

    if you paid for the cert, the seller is not trusted.

    0 comments No comments

  2. Derek Massey 1 Reputation point

    Probably releated to DST Root CA X3 expiration of LetsEncrypt certificates Sept 20, 2021


    the following issue has been posted on xamarin-android on github.


    We have no solution yet, The suggested workaround of renewing LetsEncrypt Acme did not work for us

    0 comments No comments

  3. Uzair Ali 6 Reputation points

  4. Stefanov 1 Reputation point

    I posted my workaround for kubernetes with Cert-Manager environment: https://github.com/xamarin/xamarin-android/issues/6351#issuecomment-936909856
    Basically I added the preferredChain: "ISRG Root X1" line to the ClusterIssuer yaml recipe.

    0 comments No comments