cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BG_Pig
Frequent Visitor

Unattended flow screen resolution

Hi All

 

I'm running an unattended Power Automate Desktop flow on an Azure VM running windows 10

 

My issue is that the unattended flow seems to run at a low resolution (maybe 768 x 1024) which means a number of UI elements are not visible, causing the flow to fail. The flow runs successfully in attended mode at 1920 x 1080.

 

Does anyone have any thoughts on how to force the unattended flow to run at a higher resolution?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
renan_mota
Frequent Visitor

I had the same problem.

 

Here is the solution:

 

Open the C:\Program Files (x86)\Power Automate Desktop\UIFlowService.exe.config set Microsoft.Flow.RPA.UIFlowService.ScreenDefaultResolutionEnabled to true.

 

Also, you can change the default width/height/scale as per the below screenshot.

 

renan_mota_0-1623691798639.png

 

Restart and done.

View solution in original post

21 REPLIES 21
matow
Power Automate
Power Automate

@BG_PigThere's a "Set screen resolution" action in Power Automate Desktop that should help with this. 

BG_Pig
Frequent Visitor

Hi @matow thanks for replying. I should have mentioned that I had unsuccessfully tried running 'Set screen resolution'. It seems that Azure VMs have a limitation that the screen resolution is set on login and you can't change it once you've logged in. 

matow
Power Automate
Power Automate

@BG_Pig Ah, gotcha. Looks like it might be possible to set the VMs to default to a certain resolution using Powershell, if this isn't out of date: 

 

How to change the VM default screen resolution? (microsoft.com)

 

Reaching out to check for other recommendations. 

yoko2020
Responsive Resident
Responsive Resident

Maximum screen resolution in AWS/Azure is 1280x1024.

You can change it using powershell.

rofi
Frequent Visitor

Hi @matow! I'm running PAD on a laptop with external screen attached and can't set the resolution above the default 1024 x 768 even with "Set screen resolution" action for unattended processes.


Thanks for help

matow
Power Automate
Power Automate

@rofi Looking into this. Does the action "Set screen resolution" fail with an error, or simply not set? 

rofi
Frequent Visitor

@matow There's no error, it just doesn't set it. I also tried the registry trick above with no success.

crelke
Frequent Visitor

@matow , I tried using the Set Resolution action too and it's not working. Is this a known issue? Is there a best practice to follow around handling different resolutions between your development machine and the VM that the unattended bot will be running on?

matow
Power Automate
Power Automate

@crelke Checking on more specific recommendations - in general would recommend testing with the same desktop resolution and/or web browser window size as the VM. Are you encountering similar issues with scrolling/element visibility with unattended?

Anonymous
Not applicable

Hi
We encounter same issue we have a application that cant be done becource the screen size is to low and many objects it not visible on it.
I have tryed alot of difrent ways to fix this and nothing helps. The set Screen Resolution is not working becource it cant set it when it does not have the size available.
My theory is becource it connects with RDP with the size setting 1024x768 it will be stuck here.
Take a look at the part of the log below

{"eventDataSchemaVersion":"1.0","schemaVersion":"1.0","agentClientId":"7Jx/Y9e+D7jCvHIYBu5komXLj6+Zr/Og","correlationId":"952f13df-0848-4bd8-a8db-a4d8da583ede","clientSessionId":"","clientRequestId":"","component":"UIFlowService","eventType":"NotSpecified","traceLevel":"Warning","operationName":"NamedPipeServer.ListenAsync","eventTimestamp":"2021-02-25T07:15:19.0798765Z","durationInMilliseconds":"-1","exception":"System.Threading.Tasks.TaskCanceledException: A task was canceled.\r\n   at Microsoft.Flow.RPA.Common.RpcOverNamedPipes.NamedPipeBase.<ExecuteWithTimeoutAsync>d__35.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Flow.RPA.Common.RpcOverNamedPipes.NamedPipeServer.<ConnectPipeAsync>d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Flow.RPA.Common.RpcOverNamedPipes.NamedPipeBase.<ConnectAsync>d__41.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Flow.RPA.Common.RpcOverNamedPipes.NamedPipeBase.<EnforceInitializationAsync>d__42.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at Microsoft.Flow.RPA.Common.RpcOverNamedPipes.NamedPipeBase.<ListenAsync>d__44.MoveNext()","message":"Failure while reading from Named Pipe 'NativeHost_447e7ad7-becf-4b28-ac3a-a24e1825a6d1' (isServerEnd 'True')","eventData":{"osInfo":{"name":"Microsoft Windows NT 6.2.9200.0","version":"Microsoft Windows 6.2.9200","architecture":"Win32NT"},"executionInfo":{"sessionId":0,"processName":"UIFlowService","threadId":4,"contextId":0},"machineInfo":{"screenResolution":"1024x768","processorCount":"4","netVersion":"4.0.30319.42000","windowsProductName":"Windows Server 2019 Standard"},"httpStatusCode":0,"agentVersion":"2.4.63.21036"},"roleInfo":{}}

The Gateway and Power Automate Desktop is up to date.

I have tryed on a non virtual Windows 10 PC this encouter same issue aswell.

 

Hope you can fix this maby with the option to set the Screen Resolution on the Gateway instead so it will connect with that on the RDP

drake
Advocate II
Advocate II

Is an update available for this?  

RPA-FRAY
Advocate II
Advocate II

The very short answer is that this can't be done. There are now some improvement requests / idea submissions for this. We need to be able to indicate the required resolution BEFORE the connection to the Gateway is made.

 

So please vote for the idea here: https://powerusers.microsoft.com/t5/Power-Automate-Ideas/Option-to-set-required-resolution-for-unatt...

 

Best regards,

Michael Fray

yoko2020
Responsive Resident
Responsive Resident

This is cloud vm machine limitation.


You will need to make use of a Windows Accelerated Computing instance type that have access to GPUs (Nvidia/Radeon) as this resolution is limited by the Microsoft Basic Display Adapter which is standard on most instance types.

RPA-FRAY
Advocate II
Advocate II

Hi Yoko2020.

 

It is Indeed. And that is why "we" need MS to give us an option to set required resolution before the RDP-session 🙂

 

Michael

renan_mota
Frequent Visitor

I had the same problem.

 

Here is the solution:

 

Open the C:\Program Files (x86)\Power Automate Desktop\UIFlowService.exe.config set Microsoft.Flow.RPA.UIFlowService.ScreenDefaultResolutionEnabled to true.

 

Also, you can change the default width/height/scale as per the below screenshot.

 

renan_mota_0-1623691798639.png

 

Restart and done.

@renan_mota, I tried this out and I have confirmed that this works! Thank you so much! Not more testing in low resolutions!!

@BG_Pig @crelke @renan_mota @RPA-FRAY @yoko2020 -

 

today MSFT released new version of PAD , probably which is exactly the fix for this problem. we can set the screen resolution based on the screen where we are accessing the window and we no need to set manually like earlier. 

action it self would provide the necessary options with dropdown. 

 

worth to check on this and confirm us. 

DanielOlsson
Helper II
Helper II

The august update has a new function for set screen resolution. I think it may be what you are looking for.

 

Improvement of the action ‘Set screen resolution’
In Power Automate Desktop, the ‘Set screen resolution’ action now provides the user with the option to select one of the available resolutions of their machine’s monitors during authoring, rather than the user having to manually provide the resolution values in the respective fields.

BG_Pig
Frequent Visitor

Hi @vamsi_varanasi  and @DanielOlsson 

 

Thanks for reaching out. Unfortunately the set screen resolution step in PAD still doesn't work on Azure VMs as the resolution is set when you first connect to the VM and can't be changed. When running the flow unattended the resolution is set at 768 x 1024.

 

Adding a drop down with screen sizes changes nothing.

 

A perfect solution for me would be the option to set the resolution on the Desktop Flow Operation step of the Cloud Flow builder (below)

Screen Shot 2021-08-19 at 10.35.59 AM.png

That being said I've just tried the solution proposed by @renan_mota and it works perfectly, so I'll continue to do that going forward.

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,507)