Restsharp not working in Dynamo Revit 1.3.2 as of this month

Hi there,

I have a library for interfacing with Forge that has worked without errors up until a few weeks ago - now, with no changes to the library and in the same version of Dynamo (as far as I can tell). The last time I ran the script successfully was Thu 1/11/2018. I have removed all other packages from dynamo and I’ve tried loading it as both a zero-touch library and package in both Dynamo and Dynamo Studio.

I’m getting the classic dependency conflict comment:

notification:System.IO.FileLoadException:
Dynamo has detected a conflict with a dependency and may be unstable. If any issues are detected, please uninstall addins or packages and contact the provider.:
While loading assembly AureconSandbox, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, Dynamo detected that the dependency RestSharp, Version=106.0.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75 was already loaded with an incompatiable version. It is likely that another Revit Addin has loaded this assembly, please try uninstalling other Addins, and starting Dynamo again. Dynamo may be unstable in this state.
It is likely one of the following assemblies loaded the incompatible version:
GregRevitAuth, Greg, DynamoPackages

The nodes still work if I run them in a C# console application on my machine. Does anyone have any idea about what has changed?

I might be barking up the wrong tree - stepping through it I’ve found I’m getting the following error in the Restsharp request:

{System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. —> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
at System.Net.Security.SslState.StartReadFrame(Byte buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
at System.Net.TlsStream.Write(Byte buffer, Int32 offset, Int32 size)
at System.Net.ConnectStream.WriteHeaders(Boolean async)
— End of inner exception stack trace —
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at RestSharp.Http.WriteRequestBody(HttpWebRequest webRequest)
at RestSharp.Http.PostPutInternal(String method)
at RestSharp.RestClient.Execute(IRestRequest request, String httpMethod, Func`3 getResponse)}

So I’ll work through that - but the question still stands, what has changed that has made this an issue?

Solved - Forge changed it’s security literally the day I tested it and it worked…

1 Like