Windows Server - Error Save Image

uiautomation
server
imageautomation
screenshots

#1

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.


#2

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.


#3

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


#4

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


#5

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


#6

‘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.


#7

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)


#8

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