Empty clipboard does not work with the new Library feature

Scenario:

In a shared library, I empty (clear) the clipboard before sending CTRL+C to an application. The library fails with an error. This error does not occur when running the library directly in Studio.

Steps to reproduce:

Create a Library with a Set Clipboard activity with the string “”. Publish it to Orchestrator and install the library from another project. Use the Clear Clipboard library in your project and receive an error.

Current Behavior:

An error occurs when invoking the library from another project. This does not happen when running the library workflow directly (instead of invoking it from another project)

Expected Behavior:

The clipboard should be cleared without throwing an error.

Studio/Robot/Orchestrator Version:

Current Studio and Orchestrator version: 2018.3.1

Last stable behavior: The new Library feature was not available in the last stable version, so this is not applicable.
Last stable version: 2018.2.3
OS Version: Windows 7 Enterprise
Others if Relevant: (workflow, logs, .net version, service pack, etc):

Error is thrown:

18.3.1+Branch.master.Sha.4c05f670b311e90ee097c589605b399e9bee4874

Source: Clear clipboard (Set To Clipboard)

Message: One or more errors occurred.

Exception Type: System.AggregateException

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.AggregateException: One or more errors occurred. ----> System.ArgumentException: Value does not fall within the expected range.
at UiPath.UiSystemClass.SetClipboardText(String bstrText)
at UiPath.Core.Setup.SetClipboardText(String text)
at UiPath.Core.Activities.ClipboardWrapper.<>c__DisplayClass5_0.b__0()
at UiPath.Core.Retry.<>c__DisplayClass1_0.b__0()
at UiPath.Core.Retry.Do[ResultType](Func1 action, Int32 timeoutMS, Int32 retryCount) --- End of inner ExceptionDetail stack trace --- at UiPath.Core.Activities.TaskAsyncCodeActivity1.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Does anyone have any ideas how to resolve this?

Is nobody else experiencing this issue?

It can be reproduced with this library: Clear clipboard.xaml (4.6 KB)

You must publish it to Orchestrator and invoke it from another project.

This is still an issue in UiPath 2018.3.3.

Hi @krbg00

Thanks for reporting, I was able to reproduce the issue and recorded it as bug. We will look into it!