Freshing install with Mono.Security.Interface.MonoTlsProvider Error against Google Drive

Fresh install, able to connect to google drive for OAUTH validation, but getting this error from the application in /var/log/syslog

May 20 16:55:56 plexstreamer1 duplicati-server[632548]: System.TypeLoadException: Could not load type of field 'System.Net.HttpWebRequest:tlsProvider' (49) due to: Could not resolve type with token 01000030 from typeref (expected class 'Mono.Security.Interface.MonoTlsProvider' in assembly 'Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756') assembly:Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 type:Mono.Security.Interface.MonoTlsProvider member:(null)

May 20 16:55:56 plexstreamer1 duplicati-server[632548]: at Duplicati.Library.OAuthHelper.CreateRequest (System.String url, System.String method) [0x00000] in <13d5e7013bfa43fea2736c6f372a6cef>:0
May 20 16:55:56 plexstreamer1 duplicati-server[632548]: at Duplicati.Library.JSONWebHelper.GetJSONData[T] (System.String url, System.Action1[T] setup, System.Action1[T] setupbodyreq) [0x00000] in <13d5e7013bfa43fea2736c6f372a6cef>:0
May 20 16:55:56 plexstreamer1 duplicati-server[632548]: at Duplicati.Library.Backend.GoogleDrive.GoogleDrive.GetAboutInfo () [0x0000b] in <07138b3eb08a4b7d84cf8c11a8c6e95c>:0
May 20 16:55:56 plexstreamer1 duplicati-server[632548]: at Duplicati.Library.Backend.GoogleDrive.GoogleDrive.GetFolderId (System.String path, System.Boolean autocreate) [0x0000a] in <07138b3eb08a4b7d84cf8c11a8c6e95c>:0
May 20 16:55:56 plexstreamer1 duplicati-server[632548]: at Duplicati.Library.Backend.GoogleDrive.GoogleDrive.get_CurrentFolderId () [0x0000d] in <07138b3eb08a4b7d84cf8c11a8c6e95c>:0
May 20 16:55:56 plexstreamer1 duplicati-server[632548]: at Duplicati.Library.Backend.GoogleDrive.GoogleDrive+d__17.MoveNext () [0x00040] in <07138b3eb08a4b7d84cf8c11a8c6e95c>:0
May 20 16:55:56 plexstreamer1 duplicati-server[632548]: at Duplicati.Library.Interface.BackendExtensions.TestList (Duplicati.Library.Interface.IBackend backend) [0x00017] in :0
May 20 16:55:56 plexstreamer1 duplicati-server[632548]: at Duplicati.Library.Backend.GoogleDrive.GoogleDrive.Test () [0x00000] in <07138b3eb08a4b7d84cf8c11a8c6e95c>:0
May 20 16:55:56 plexstreamer1 duplicati-server[632548]: at Duplicati.Server.WebServer.RESTMethods.RemoteOperation.TestConnection (System.String url, Duplicati.Server.WebServer.RESTMethods.RequestInfo info) [0x000b7] in :0
May 20 16:55:56 plexstreamer1 duplicati-server[632548]: at Duplicati.Server.WebServer.RESTMethods.RemoteOperation.POST (System.String key, Duplicati.Server.WebServer.RESTMethods.RequestInfo info) [0x00094] in :0
May 20 16:55:56 plexstreamer1 duplicati-server[632548]: at Duplicati.Server.WebServer.RESTHandler.DoProcess (Duplicati.Server.WebServer.RESTMethods.RequestInfo info, System.String method, System.String module, System.String key) [0x00289] in :0

Welcome to the forum!

What version of mono are you running?

Mono JIT compiler version 6.8.0.123 (tarball Tue May 12 15:13:37 UTC 2020)

I have the exact same issue, but for Microsoft OneDrive v2. What can I do here?

Mono version: Mono JIT compiler version 6.12.0.122 (tarball Mon Feb 22 17:28:32 UTC 2021)

Exact error:
Failed to connect: Could not resolve field token 0x04001066, due to: Could not load type of field 'System.Net.HttpWebRequest:tlsProvider' (49) due to: Could not resolve type with token 01000030 from typeref (expected class 'Mono.Security.Interface.MonoTlsProvider' in assembly 'Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756') assembly:Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 type:Mono.Security.Interface.MonoTlsProvider member:(null) assembly:/usr/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll type:HttpWebRequest member:(null)

Can you try cert-sync?

Not sure what OS you are using, but on Debian you run something like:

$ sudo cert-sync /etc/ssl/certs/ca-certificates.crt

And sorry to @zenjabba - I missed your reply!

Thanks for your fast reply!

Linux Cert Store Sync - version 4.2.1.0
Synchronize local certs with certs from local Linux trust store.
Copyright 2002, 2003 Motus Technologies. Copyright 2004-2008 Novell. BSD licensed.

I already trust 129, your new list has 129
Import process completed.

Error still exists. :frowning:

Really can’t tell if this should be a cert issue. Kind of looks too much like version mismatch from either Duplicati or user system or something incorrect between .net from Duplicati and mono.

But am wondering if maybe something like eg certmgr -ssl https://github.com but for the remote location would work here. There doesn’t look to be a tls so ssl would have to do it. This pulls down the specific remote cert.

It also looks like my system has 4.0.0.0__b77a5c561934e089 and that’s using the mono repo with some of the latest versions.

People seem to have solved this for other applications in other different ways such as on the development side.

Difficult to see where a fix should be. I haven’t tested this on my system but it looks like it could maybe have the same result.