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…

2 Likes

Hi Chris, Thank you for your post. I am quite curious as i have the same error :
" It is likely one of the following assemblies loaded the incompatible version:
GregRevitAuth, Greg, DynamoPackages". Wondering who is Greg haha… Funny thing is that I was also messing around with Forge last year. Trying to figure it out. This time i am simply trying to run Generative Design using R2021, nothing to do with Forge. If you have any tips that would be great! Have a good one!

I think it’s a bit of a red herring - make sure you’re referencing dlls in a logical way and aren’t pulling in any overriding libraries into your plugin. Definitely a config error on your part, just go through and clear out any references that don’t need to be there - generally does it for me.

1 Like

Greg and related binaries are used by the Dynamo package manager client. It uses RestSharp 105 I think.

The first issue in this thread looks like it was really caused by TLS 1.0/1.1 deprecation.

I don’t know how RestSharp issues relate to GenerativeDesign - but it seems a new thread is probably best.

hate to resurrect the dead but am getting the RestSharp Greg issue in 2021. I have removed all addins in revit and have a bare install of Dynamo 2.12

image

Can you post a Revit journal from a session with all the add-ins disabled where you just launch Revit, start a new project from any template, launch Dynamo, start a new graph, close Dynamo and then close Revit. This will allow the community to confirm that all Revit add-ins have been removed (note the popular tools to disable add-ins often miss some of the more deeply rooted ones).

journal.0085.txt (205.2 KB)

I guess I stated this in another thread somewhere, don’t worry about this error. We’ve updated in a recent update and there are no reported actual issues that this conflict causes.

2 Likes

i’ve the same issue in revit 2020, 2021 and 2022.
see the topic Revit 2022 Dynamo has detected a conflict with a dependency and may be unstable

i didnt understand exactly what should i do

Did you fix this problem? Now, I have same problem…