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

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.

Hi Poof,

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

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)

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:

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

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

Hi Andrei,

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

Regards,
M

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

Missing dll

this worked for me in 2018.1.3
but not in 2018.2.3

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

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

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

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

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:

when using the uipath.web.activity, i get the following error : ‘System.String RestSharp.Extensions.MiscExtensions.AsString(Byte)’.

Hi @Guillaume_Labs

Welcome to our UiPath Forum! :slight_smile:

Could you maybe provide more context? Feel free to open a new topic with more details about your particular issue (sample project screenshots, activity package version, etc).