Version
2.0.0.5241
Mono Version
5.12.0.301
osx
10.13.6
I’m having trouble getting sonarr to use ssl calls to https indexers. I get a SecureChannelFailure (A call to SSPI failed error. Needed to upgrade mono, since another program needs a more current version (had 3.12 before)
However, added export MONO_TLS_PROVIDER=legacy to my .profile and when I start sonarr from the terminal, it works. markus101 indicated that sonar can use the regular stack and changed it to btls. Also populated the certs with curl -sS https://curl.haxx.se/ca/cacert.pem | cert-sync --user /dev/stdin
Still having trouble when launching the application, rather than open it from the terminal (Sonarr.app/Contents/MacOS/Sonarr). Since i created a user agent to launch it at boot time, it is isn’t a problem, though not very mac like way of doing it.
Is there something else I’m missing? I would assume that double clicking the application should work
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>tv.sonarr</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin</string>
<key>MONO_TLS_PROVIDER</key>
<string>btls</string>
</dict>
<key>KeepAlive</key>
<true/>
<key>RunAtLoad</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/bin/sh</string>
<string>Applications/ servers/Sonarr.app/Contents/MacOS/Sonarr</string>
</array>
<key>Nice</key>
<integer>0</integer>
</dict>
</plist>
Trace logs would be helpful to diagnose further. Offhand I don’t have anything to suggest other than trying mono 5.10 as 5.12 has had several issues.
just tried mono 5.10, but same results.
By the way, the trace file includes api keys
This is the debug file:
https://pastebin.com/rudDiFv5
opened 12:46PM - 15 Jun 18 UTC
closed 04:02PM - 16 Jul 18 UTC
os-macOS
area-BCL: System
## Steps to Reproduce
```shell
$ csharp -e 'new System.Net.WebClient ().Down… loadData ("https://microsoft.com").Length'
```
### Current Behavior
```shell
$ csharp -e 'new System.Net.WebClient ().DownloadData ("https://microsoft.com").Length'
System.Net.WebException: Error: SecureChannelFailure (SSLCreateContext) ---> System.EntryPointNotFoundException: SSLCreateContext
at (wrapper managed-to-native) Mono.AppleTls.AppleTlsContext:SSLCreateContext (intptr,Mono.AppleTls.SslProtocolSide,Mono.AppleTls.SslConnectionType)
at Mono.AppleTls.AppleTlsContext.InitializeConnection () [0x0000c] in <5afdc70d980c4033b3878286f754d091>:0
at Mono.AppleTls.AppleTlsContext.StartHandshake () [0x00015] in <5afdc70d980c4033b3878286f754d091>:0
at Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake (Mono.Net.Security.AsyncProtocolRequest asyncRequest, Mono.Net.Security.AsyncOperationStatus status) [0x00004] in <5afdc70d980c4033b3878286f754d091>:0
at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (Mono.Net.Security.AsyncOperationStatus status) [0x0006b] in <5afdc70d980c4033b3878286f754d091>:0
at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation () [0x0000d] in <5afdc70d980c4033b3878286f754d091>:0
at Mono.Net.Security.AsyncProtocolRequest.StartOperation () [0x0003c] in <5afdc70d980c4033b3878286f754d091>:0
at Mono.Net.Security.AsyncProtocolRequest.StartOperation (Mono.Net.Security.AsyncOperation operation) [0x00024] in <5afdc70d980c4033b3878286f754d091>:0
at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Net.LazyAsyncResult lazyResult) [0x00057] in <5afdc70d980c4033b3878286f754d091>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <ffb99659fc1c47faa4d5f883014d08aa>:0
at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Net.LazyAsyncResult lazyResult) [0x00078] in <5afdc70d980c4033b3878286f754d091>:0
at Mono.Net.Security.MobileAuthenticatedStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x0000c] in <5afdc70d980c4033b3878286f754d091>:0
at Mono.Net.Security.Private.MonoSslStreamWrapper.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x00006] in <5afdc70d980c4033b3878286f754d091>:0
at Mono.Net.Security.MonoTlsStream.CreateStream (System.Byte[] buffer) [0x0007b] in <5afdc70d980c4033b3878286f754d091>:0
at System.Net.WebConnection.CreateStream (System.Net.HttpWebRequest request) [0x00073] in <5afdc70d980c4033b3878286f754d091>:0
--- End of inner exception stack trace ---
at System.Net.WebClient.DownloadDataInternal (System.Uri address, System.Net.WebRequest& request) [0x00072] in <5afdc70d980c4033b3878286f754d091>:0
at System.Net.WebClient.DownloadData (System.Uri address) [0x00020] in <5afdc70d980c4033b3878286f754d091>:0
at System.Net.WebClient.DownloadData (System.String address) [0x00016] in <5afdc70d980c4033b3878286f754d091>:0
at <InteractiveExpressionClass>.Host (System.Object& $retval) [0x00006] in <cdee327548654e269370bd30c1272d24>:0
at Mono.CSharp.Evaluator.Evaluate (System.String input, System.Object& result, System.Boolean& result_set) [0x00038] in <802faba46beb4a58ae1e22a3cbfadf49>:0
at Mono.CSharpShell.Evaluate (System.String input) [0x00000] in <4d46ebde27754c3cb8efe380ee213b13>:0
```
### Expected Behavior
```shell
$ csharp -e 'new System.Net.WebClient ().DownloadData ("https://microsoft.com").Length'
1020
```
### Workaround
Use the legacy provider
```shell
$ MONO_TLS_PROVIDER=legacy csharp -e 'new System.Net.WebClient ().DownloadData ("https://microsoft.com").Length'
1020
```
## On which platforms did you notice this
[x] macOS (Lion)
[ ] Linux
[ ] Windows
**Version Used**:
Works with:
```shell
$ mono --version
Mono JIT compiler version 4.8.0 (mono-4.8.0-branch/8f6d0f6 Thu Mar 9 11:59:17 EST 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: yes(3.6.0svn-mono-master/8b1520c)
GC: sgen
```
does not work with:
```shell
$ mono --version
Mono JIT compiler version 5.0.1.1 (2017-02/5077205 Thu May 18 16:11:37 EDT 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: yes(3.6.0svn-mono-master/8b1520c)
GC: sgen (concurrent by default)
```
nor any other version from 5.0 to current stable (5.10).
Apparently this error happens on older macOS versions, but should be working fine on macOS 10.13.
It shouldn’t, please show an example where they were showing up.
mark
Just realized my tv box is running 10.7.5!
Guess i will have to launch it from the terminal then. Strange that works from the terminal, but not when double clicking on the application
from the trace file:
“uri”: [“https://api.indexer1.com/rss?t=-2&dl=1&i=48092&r= the_indexer1_api_key &del=1”],
“uri”: [“https://www.indexer2.com/rss?tvinfo=11138&airdate=50&dl=1&i=15737&r=the_indexer2_api_key ”],
“uri”: [“https://www.indexer2.com/rss?t=-2&dl=1&i=15737&r=the_indexer2_api_key&del=1 ”]
obviously, i replace the key with the_indexer_api_key
1 Like
system
Closed
September 24, 2018, 5:08pm
6
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.