Save Image Error in Unattended Session

Hi guys,

I’m just making a simple test.xaml with 2 activities, “Take Screenshot” and “Save Image”. When I launch it in front, it works perfect, taking the whole screen as an image and saving it in the correct path.

The problem becomes when I launch it from Orchestrator. The robot has unattended license, and the process is launched in background, without screen:

Job Exception

image

screenshot var is empty when is launched in back, but it isn’t when is launched in front.

Details:

Orchestrator Version: 2020 UiPath Platform Community License
Stduio: 2019.10.4 Community License

Thank you very much folks.
Regards,
Pablo

2 Likes

Its not a timing issue, and the process is launched in unattended session because I can trace logs of the actions which the robot performs…

Just the “Take Screenshot” actitivity is not working in background anymore for me. I made a test with a retry/wait system logic, but always getting output image as False.

Anyone has experienced some issue like this before? could be a problem with the Orchestrator version or uipath 2020 beta?

KR,
Pablo

@Pablo_Sanchez Can you tell us what Screenshot are you trying to get, is it whatever appears in the front Display Screen or is it of a Specific thing?

Hi @supermanPunch

Im trying to get the wholescreen, without selector in the activity:

When i launch this simple test through Orchestrator in unattended session, the image variable is always empty

Those are the properties of Retry Scope
image

(Sorry for my spanish version ^^, should be something like numberOfRetries and delayBetween)

@Pablo_Sanchez I was able to do the same operation and was not able to Save the Image in my Folder, but I hadn’t received any errors though :sweat_smile:, Can you Try Changing the Wait For Ready Property to Complete and Check.

Like that, true? :slight_smile:

I’m neither getting any error msg when I make the Screenshot, but I get the error msg when I save the image because its empty (object reference not set to an instance of an object)

@supermanPunch im still getting empty variable :confused:

@Pablo_Sanchez I guess you might need help from the officials, Its working fine for me. :sweat_smile: , There might be something to do with your Community Edition.

@supermanPunch Yes, I was thinking the same… any problem with the community edition :confused:

Lets hope some official will help hehe

Thank you very much friend :slight_smile:

@Pablito ? ^^

1 Like

Hi @Pablo_Sanchez,
Please check if same will happen if you will choose some existing object to take the screenshot of.

1 Like

Hi @Pablito

First of all, thank you very much for your time and help. I’ve tried what you told me, getting the same selector which works fine for a get text. Image variable still empty :confused:

When I launch the process from orchestrator in an unattended robot, if I see the logs, I can read the get text output and the output of Take Screenshot -> (image is Nothing).toString = True.

KR,
Pablo

What comes to my mind… You are using Community Edition right? So I guess when you are trying to use process in unattended way all users are completely logged off from the machine so your robot could process as a user to take the screenshot right? But using community edition has one thing which is important here. The Robot service is by default installed as a User thread service so once you are logged off the service is gone and Robot connection is not available. You could install robot using MSI package so the Robot service will be installed as System thread and available for whole machine even without any active user session. I’m not sure if this is the case here. Could you describe your environment, machine state etc. during your process?

3 Likes

@Pablito you are right in almost everything.

When I close the remote desktop connection , I’m still seeing the machine available (the machine is always connected), and I can launch the process (more than that, the process work!. It opens a web page and I read the main text of the web, which specifies the screen resolution of the current execution)

The machine where the process is launched is Robot_1

Details:

Orchestrator Version: 2020 UiPath Platform Community License
Studio: 2019.10.4 Community License
Remote Machine: UiPath 2019.10.4 installed with respective Agent Desktop

@ClaytonM has been helping me a lot but we couldn’t fix it yet :confused:

Thank you very much folks. You don’t know how much I appreciate it.

KR,
Pablo

Interesting. Seems that you have installed a Robot (Agent Desktop/UiPath Assistant) on remote machine using MSI so it’s working on System thread. To confirm it you can check the services on the machine and if there is host process related to it used as a System (in my case it’s running as me so it’s only for my user not for machine):
image

Regarding the issue. You can also check if maybe experimenting with resolution will help here. It’s described in this topic:

2 Likes

Mmmm

I’ve loged into machine and I see what you said:
image

The user is “Robot”, but is the same user of the Orchestrator, so it should work, correct? Or ir should be System? Maybe this is the problem?

I dont think is resolution issue, because I can open a web page which tells the current resolution of the execution. When the process is launched thru orchestrator, that page indicates that the resolution is 1920x1080 (which is the same that the Robot has in its settings, and its UiPath.settings file). If that process is launch when I’m loged in the “virtual machine”, that page tell me my resolution is 1534x870, which makes me think that the process is being well launched in unattended mode.

It seems to be a problem with the image variable types. No image activities are working at all in unattended mode.

Thank you very much folks,

KR,
Pablo

Hmmm if username you are using for automation is Robot and you see only this then it might be an issue. I’m wondering how automation is working for you this way. Is this user logged off from machine when automation is starting?

1 Like

Yes, it is logged off. Also, I can launch with 2 more different users.

Please check services if there is nothing related to robot:
Go to RUN -> services.msc

You should have something there. I gues UiRobotSvc or something like that. Please show me it’s details.

Meanwhile this is what I was mentioning previously:

2 Likes

Hi @Pablito

I was thinking on it, and I realized that I used the file UiPathStudio.exe to install the Uipath files for the robot in the unattended machine.

After reading your last post, I was wondering if I’ve to install the files in the remote machine using UiPathInstaler.msi instead use UiPathStudio.exe

Could it be the problem?

Thank you guys, as always.

KR,
Pablo

Hi @Pablo_Sanchez,
It wouldn’t be a problem at all. This is the only possible way to have active robot session without any user logged on machine. The reason why I asked you to check services is that I’m curious how it’s possible that you see your machine active in Orchestrator and the process are even starting if you installed Robot from executable installer. I wonder if by any mistake it somehow installed a robot service on your remote machine :smiley:

2 Likes

Okay, understood @Pablito

Should I check for any service installed in the remote computer os something like that? Maybe reinstalling all again?

Thank you :slight_smile: