Windows Server - Error Save Image

Greetings,
I’m using UiPath on a Windows server, however, there have been errors.

When I close the remote desktop on which I am logged into the windows server, the following error occurs (while I am active, it does not occur):
Main has thrown an exception

Source: Save Image

Message: Object reference not set to an instance of an object. This error usually occurs when using a non-set variable (not initialized).

Exception type: NullReferenceException

System.NullReferenceException: Object reference not set to an instance of an object.
in UiPath.Core.Activities.ScopeActivity.OnFaulted (NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke (NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute (Executor ActivityExecutor, BookmarkManager bookmarkManager)

Apparently, it can not start the several, the screen should freeze when I disconnect on the server.

Is there a different version of UiPath just for windows?

I count on the help of colleagues, regards.

If you minimize or close your VM, robot may end up in throwing error looking for an active desktop session which is not available, unless its configured as Unattanded robot and you are running from orchestrator.

Try using ‘Launch Workflow Interactive’ activity and Invoke the workflows from within that.

Thanks,
Rammohan B.

thanks for listening,
However the same error still occurs but I have never used the launch workflow, this method is unknown in uipath, maybe I’m using the method incorrectly, could you explain how to do it?

regards

Hello @AdemarGr,

It seems that your save image activity is throwing an exception because variables might not have been initialized. there are two properties Filename and Image. please create a uipath.core.Image variable and place in image field and write path where you want to save it,

Cheers,
Pankaj

Exactly @Pankaj.
But they are already created.
the flow works when vm is not minimized, when v m becomes minimized is where the error occurs.

regards

‘Launch Workflow Interactive’ is just like ‘Invoke Workflow’ activity. You have to invoke the xaml file that contains your activities which needs an active desktop session in your case may be its ‘Save Image’. If you have all those activities in a single file then i would suggest to seperate that particular area that throws the error into a seperate xaml and invoke using this activity.

Let me know if it helps.

Thanks,
Rammohan B.

The problem persists, I added the “start the interactive workflow” by passing the path of the screenshot flow, after that I added the invoke workflow file, passing the same path as the take screenshot flow.

I will add the .xaml file here, could you check for me if there are any errors?

Thank you

rotinas1h.xaml (19.8 KB)

take-screenshot.xaml (7.7 KB)

I am having this same issue, did you resolve this?

I am facing the same issue. Please can someone help on this.

  1. Launch Workflow interactive won’t be available in the future, is Deprecated
  2. This info can be useful
    Executing Tasks in a Minimized RDP Window