'Method not found: RestSharp.IRestRequest RestSharp.RestRequest.AddFile'

#1

OK so title says it all :slight_smile:

I have the same project on two machines they both are new install.

I try to use httprequest activity on both of them Unfortunately on one machine it works like a charm on other i get :

‘Method not found: RestSharp.IRestRequest RestSharp.RestRequest.AddFile’ error on the activity.

Do you have any solution??

I already tried updating .net version and importing restsharp namespaces in to the project.

#2

Hi Poof,

Do you deploy the automations locally, or via orchestrator?
And if via orchestrator, which version are you using?

#3

Bastiaan, they are deployed localy and if tested on affected machine with studio i get this error:

Exception Type: MissingMethodException

System.MissingMethodException: Method not found: ‘RestSharp.IRestRequest RestSharp.IRestRequest.AddFile(System.String, System.String)’.
at UiPath.Web.RestClient.AddAttachments(IDictionary`2 files)
at UiPath.Web.Activities.HttpClient.BeginExecute(AsyncCodeActivityContext context, AsyncCallback callback, Object state)
at System.Activities.AsyncCodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

#4

Try to copy all the activities from the machine where it works, from:
C:\Users\xxxUSERxxx\AppData\Local\UiPath\Activities
(xxxUSERxxx needing to be adjusted to the real username)
To the other machine.
Don’t overwrite existing, only add what’s missing.

And then run again & check if it does the trick :wink:

#5

Bastiaan,

Thats not an issue with activities if something its an issue with missing dlls from app-18.x.x folders.
Computer that is ok has less activites then the one with error

#6

Hello,

There seems to be a known issue that HttpRequest will fail if RestSharp version is higher than 105.0.1.0.

It will be fixed in the future.

For now, as a workaround you can try to downgrade any activity that uses RestSharp higher than 105.0.1.0

Hope this helps,
-Andrei

1 Like
#7

Hi Andrei,

Downgreading worked like a charm, unfortunately after downgrade i couldnt publish the project.

Regards,
M

#8

Oh, what does it say when you try to publish ?

#9

Missing dll

#10

this worked for me in 2018.1.3
but not in 2018.2.3

#11

I’m having this same issue with 2018.4.1
Have tried to downgrade the RestSharp to the 105.0.1.0, but no success, still getting the same error. Any ideas?

Thank you,
Jose Caldeira

#12

I’ve solved uninstalling dependencies and reinstalling. Need to make sure that version of RestSharp stays as 105.0.1.0 as minimum requirement. And need to install the dependecies AvalonEdit and Newtonsoft.Json

#13

i have the same error and have 2019.1.0 with AvalonEdit v5.0.4, RestSharp v105.0.1, UiPath.web.Activities v1.3.0 and Newtonsoft.Json v12.0.1:


19.1.0+Branch.master.Sha.3db2bfe8751ed76c2c21f7ee16f53ff69a3e3b75

Source: SOAP Request

Message: Method ‘ConfigurationManagementClient.RetrieveContactList’ not found.

Exception Type: System.MissingMethodException

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.MissingMethodException: Method ‘ConfigurationManagementClient.RetrieveContactList’ not found.
at UiPath.Web.Activities.SoapClient.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity`1.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)


Please Help

#14

Came across the same issue and resolved by upgrading the UiPath.Web.Activities to v1.4.0. I’m using UiPath Studio 2018.3.1

1 Like
#15

Hi, I got the same error code when I forgot that VPN is set on VM. If above answers doesn’t work - maybe simply check connection :slight_smile: