Issue in take a screenshot on VM

Indeed! I have just double checked and it seems like I gave you outdated information.

Unfortunately, the MSI installer no longer works with the Community license. Therefore, this solution will not work here.

In this case, I would still try to see if the issue can be fixed by running the process on another machine, just to remove the possibility that it is a local machine issue.

In the meantime, I will register this topic in our internal issue tracker for further consideration by our team. I will update this thread when new updates are available.

@loginerror thanks for update , please let us know after fixing the issue

@loginerror is there any update when can we get the this fix in uipath community edition version please confirm sir

Hi,

We’re experiencing a similar issue but with the enterprise version.

Our screen resolution is 1920x1080 depth of 32.

The error occurs sporadically and only with the take screenshot activity. This is when we’re unattended.

Have you heard anything more about a solution?

Exact error:
ComponentModel.Win32Exception (0x80004005): The handle is invalid
at System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize, CopyPixelOperation copyPixelOperation)
at System.Drawing.Graphics.CopyFromScreen(Point upperLeftSource, Point upperLeftDestination, Size blockRegionSize, CopyPixelOperation copyPixelOperation)
at UiPath.Vision.UiImage.FromScreenRegion(Rectangle region)
at UiPath.Core.Image…ctor(Region screenRegion)

In this case, please register a ticket with our technical support:

It always helps to push the tickets forward.

Sounds good. If I find anything applicable for this thread from the ticket, I’ll respond here. Thanks!

1 Like

Just an update… our issue was related to how we were logging out of bot machines.

For reference, we have “Login To Console” set to “No” and our bot resolution set to 1920x1080 with a depth of 32 through orchestrator.

The problem was that developers and support staff were only disconnecting from the RDP sessions and not signing out of the machines. (We have specific bot user accounts that the team can access to monitor the bots if necessary). Since that bot account was being left signed in, the RDP session set the screen resolution and when orchestrator went to sign in, it was unable to apply the appropriate screen resolution. While I’m not 100% sure of why this was our issue, ever since we have started signing out instead of disconnecting from the bot machines, the exception related to Win32 has not occurred.

Hope some of this information helps!

Hope some of these details help so

1 Like

I feel the need to answer this once and for all.
In order to explain this, I have to explain complicated stuff(didn’t even realize Windows was this complicated before joining UiPath).

Many UiPath Activities including Take Screenshot requires a Default Desktop where Interactive Window Station is attached. And wow that was mouthful.
Here are some documents you can read.

“default desktop with interactive window station attached”, Let me just call this GUI, because that is what it essentially is. UiPath can run on a session without any GUI being depicted, or GUI being depicted. Typically you should log out of the user instead of disconnect, because UiPath will use the disconnected session when you disconnect(Thats how it works as of 2021/2/17). This session would not have GUI. Taking screenshot requires a GUI, which has the coordinate details of the place to take screenshot, and because the GUI doesn’t exist, you get a null reference error(which in java is called null pointer exception).
Anyways, as dwyrock explained, signing off is needed.

3 Likes