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)
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 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?
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,
‘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.
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?