Yak: The request was aborted: Could not create SSL/TLS secure channel

Hi @will,

I ran into some trouble with yak again, could you advise?

  1. I downloaded a fresh copy of yak from http://files.mcneel.com/yak/tools/latest/yak.exe
  2. I recently authenticated using the command yak.exe login
yak.exe push .\output\scriptparasite-1.1.1-any-any.yak

This request takes 5 to 10s and then exists with the cryptic message

The request was aborted: Could not create SSL/TLS secure channel.

I’m not sure what yak is trying to connect to, so I have no way to determine where the SSL/TLS trouble is coming from. (Old certificates, old server?)

Edit: Using the Rhino 7 version at ‘C:\Program Files\Rhino 7\System\Yak.exe’ seemed to work.

It seems that the yak version at http://files.mcneel.com/yak/tools/latest/yak.exe is taunting us once again.

It will be connecting to https://accounts.rhino3d.com to validate the auth token and https://yak.rhino3d.com to publish the package. I’ll run some tests and see if I can reproduce this.

I can’t reproduce the problem here. I was able to publish a test package to the test server at https://test.yak.rhino3d.com.

The “latest” version was a bit out of date so I updated it. Can you give the newer version below a try and see if it works any better?

http://files.mcneel.com/yak/tools/0.12.14/yak.exe

1 Like

The second version does not give the same error, and seems to work fine, thanks for the quick fix!

1 Like

Hi,
I’ve got the same error message when trying to install a package for Rhino6! (v 6.35.21204.15001)
This used to work a few releases ago, and it works perfectly with Rhino7’s yak.
I don’t understand why the bug even exists in my case because installing does not require authentication.

The package server itself now also requires TLS 1.2. For now you can fix this by unzipping the attached archive and copying yak.exe.config into “C:\Program Files\Rhino 6\System”.

yak.exe.config.zip (319 Bytes)

2 Likes

It works, thanks @will

You should probably include this in Rhino6’s installers, because not everybody is going to check the forum to get it working.

Have a nice day

Matthieu

1 Like

The error is generic and there are many reasons why the SSL/TLS negotiation may fail. ServicePointManager.SecurityProtocol property selects the version of the Secure Sockets Layer (SSL) or Transport Layer Security (TLS) protocol to use for new connections; existing c# socket connections aren’t changed. Make sure the ServicePointManager settings are made before the HttpWebRequest is created, else it will not work. Also, you have to enable other security protocol versions to resolve this issue:

ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
     SecurityProtocolType.Tls
     SecurityProtocolType.Tls11
     SecurityProtocolType.Ssl3;
 
//createing HttpWebRequest after ServicePointManager settings
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://google.com/api/")

If you create HttpWebRequest before the ServicePointManager settings it will fail and shows the error message.

Same problem here. Just wanted to install a YAK file in Rhino 6 and I do have the SSL/TLS error.

I don’t understand how to modify the config file with the above code.

How I can use yak.exe to install a downloaded .yak file? Tried to install by using the command: “yak.exe install c:\MyLocalyDownloadedPackage.yak” but still I do get the SSL/TLS error.