The invocation of the constructor on type 'UiPath.Core.Activities.SAP.Login' that matches the specified binding constraints threw an exception

Hi,

I made a process in Studio and it can successfully run on my development computer. Yet, when I deployed it into server and try to run it from Orch/Robot I have the following error:

System exception at initialization: The invocation of the constructor on type 'UiPath.Core.Activities.SAP.Login' that matches the specified binding constraints threw an exception. at Source: Invoke SAP_Login workflow

For the first time I am using inbuilt SAP actions (they have not been used in any other project by anyone). I am using following packages:

“UiPath.Excel.Activities”: “[2.9.3]”,
“UiPath.Mail.Activities”: “[1.12.3]”,
“UiPath.System.Activities”: “[20.10.1]”,
“UiPath.UIAutomation.Activities”: “[20.10.6]”

All of them are also located on the server in .nuget\packages
I tried to change the UIAutomation package to lower version like 21.4.4 and 20.10.11 but it not helped.

This might be a silly question but is your Orchestrator and Robot on the Robot server in the same version as your Studio? Perhaps there’s a difference between the versions in your environment causing this misbehaviour with this set of activities.

Hi,

Orch: 2020.10.4
Studio: 2020.10.2
Robot: 2020.10.2

Well, the only thing that occurs to me is that all the UiPath packages in your project should be equal or below 2020.10.4, because that’s what your Orchestrator can handle without a doubt and has all depency packages for.
Other than that, I can’t thing about anything more, I haven’t worked with SAP activities as of yet myself.

Good luck!

Unfortunately it seems not to be the case. Gradually I went back as much as:

"UiPath.System.Activities": "[20.10.4]",
"UiPath.UIAutomation.Activities": "[20.4.3]"

And still the same error happens.

Maybe review if the parameters for the SAP instance in your machine and in the robot machine are ok.

But it’s a strech, I’m really out of ideas.
I’ll keep an eye in the topic to see how you solve this.

Good luck!

I solved the problem.
Firstly I used exception.ToString to identify what really was the problem:

System.Xaml.XamlObjectWriterException: The invocation of the constructor on type ‘UiPath.Core.Activities.SAP.Logon’ that matches the specified binding constraints threw an exception. —> System.IO.FileNotFoundException: Could not load file or assembly 'UiPath.Interop

Then I copied from my dev machine all files from C:\Users\USER\.nuget\packages\UiPath to prod machine. I did the same for .nuget\packages\UiPath.platform just to be sure.

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.