I am executing a job via UiRobot.exe command line and when I look into the Jobs table on Orchestrator the unattended bot picks it up with the source of “Agent” but then fails with the following error : " System.IO.DirectoryNotFoundException: Could not find a part of the path". But when I execute the same job on the same unattended robot through Orchestrator, it runs without a problem.
I have checked if the VM can reach that path destination and it can. Any recommendations will help.
Thank you for the recommendation but it looks like the command is going through with UiRobot.exe to Orchestator though so I am not too sure if that would be the issue. I have also looked at the activity of where it is crashing at, and it also has the full file location. For this location, it is located on a remote drive.
This is in powershell that will execute a process that is located in the Default folder. But I believe there might be something that is being cached when executing jobs via UiRobot.
It looks like that command was able to execute and saw the job begin to run in Orchestrator but in the Orchestrator logs it still says: System.IO.DirectoryNotFoundException: Could not find a part of the path" and fails the job.
Ok, then check what is doing that workflow as it is not clear from where exactly you receive “System.IO.DirectoryNotFoundException: Could not find a part of the path”. Maybe you have some input arguments to that job and you are not providing them. There can be various reasons.
I looked at the workflow to see exactly where that error is at, and it looks like the error is coming from an append line activity not being able to find that file path. Before, the file path had a variable in it (ex: var + “filename.txt”), so I went ahead and put the full file path without the variable (ex: “R:\Programs\filename.txt”) and still getting that error. The file path is located on a mapped drive and the bot has access to it. But is there another protocol that UiPath uses when a job is executed via agent vs manually to locate a file on a mapped drive? Because executing the job on Orchestator(Manually), I don’t get an error but with executing it through the agent, I do.
In powershell scripts the relative paths are not working. You need to provide full paths. Double check all the paths which you are using in your scripts.
My apologies, the file path is not being called in the powershell script but rather in the UiPath Studio work flow in the append line activity of where to write the line at.
I was looking more into the issue and was thinking, is there a way to look at the credentials and security set up for the unattended robots because the robot may not have access to the path location, which would throw this error.
It looks like that didn’t work either. It is weird because when I do the PowerShell script, it hits the Robot Agent on the VM and fails but when I click retry on the VM, it is successful. It may be a bug with this version but most likely will open a ticket.