Dear All
We are trying to capture a screenshot on VM via orchestrator
We trigger the bot and got error like this
Object reference not set to an instance of an object
And sometimes we get
System.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.Vision.UiImage…ctor(Rectangle region, Int32 rotationDegree)
at UiPath.Core.Image…ctor(Region screenRegion)
It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.
First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.
You can check out some of our resources directly, see below:
Always search first. It is the best way to quickly find your answer. Check out the icon for that.
Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.
Topic that contains most common solutions with example project files can be found here.
Read our official documentation where you can find a lot of information and instructions about each of our products:
Meet us and our users on our Community Slack and ask your question there.
Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.
Thank you for helping us build our UiPath Community!
System.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.Vision.UiImage…ctor(Rectangle region, Int32 rotationDegree)
at UiPath.Core.Image…ctor(Region screenRegion)
System.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.Vision.UiImage…ctor(Rectangle region, Int32 rotationDegree)
at UiPath.Core.Image…ctor(Region screenRegion)
could you please confirm what is the below error while we are taking the screenshot on VM with Community Edition.
We are using community Edition.
run the job via orchestrator with unattended bot.
Please help us.
System.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.Vision.UiImage…ctor(Rectangle region, Int32 rotationDegree)
at UiPath.Core.Image…ctor(Region screenRegion)
System.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.Vision.UiImage…ctor(Rectangle region, Int32 rotationDegree)
at UiPath.Core.Image…ctor(Region screenRegion)
@loginerror could please provide exact solution for the below error still we tried with uninstall and reintall still we are facing same error on VM while taking screenshot via unattended bot in cummunity Edition.Please help us .
System.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.Vision.UiImage…ctor(Rectangle region, Int32 rotationDegree)
at UiPath.Core.Image…ctor(Region screenRegion)
Please find the steps:
Push a package on orchestrator
Run a Job at sheduled time on virtual machine via unattended bot and set the resolution in robot settting width =1920 height 1080 and depth =32 and login to console set it “No”
After triggered unattended bot on Vm we are getting below error with take screenshot actvivity …
System.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.Vision.UiImage…ctor(Rectangle region, Int32 rotationDegree)
at UiPath.Core.Image…ctor(Region screenRegion) @loginerror sir please help asap it will be greatful for us …
We have disabled firewall and antivirus on VM as well and trigger the jon still we are facing same issue sir could you please help us also we uninstall ui and reinstall ui path facing same issue with take screenshot on VM.
It might be caused by the type of robot service that is used by the Community Edition, see here:
The solution could be to install the Robot as the The SCM-managed Robot service (UiPath.Service.Host.exe) via the MSI installer (it is available for download on your Cloud account).
Just keep in mind that the Studio version which comes with the MSI installer will be the latest Enterprise version and not equal to the current Community Edition (this means that sometimes projects made with latest version will not run on the older version of Robot).
Hello Sir @loginerror we downloaded.msi insatller where we can see that we need a license key for activation is there any way to get license key for trial or how to get it?
@loginerror sir I didn’t get you please can you confirm while I am installing .MSI installer from community edition orchestrator that time there is required licence key from where can I get licence key or is it possible without paid as trail version we can do it please help us we are stuck from long time still we don’t have solution please clear below things
with community edition screen capture automation possible or not on virtual machine?
if yes then please confirm how can we do it ? It will be fruitful for us to understand .
I believe it might not work as expected in some circumstances.
Could you post a screenshot of the splash screen that you see after you run Studio installed via the MSI installer? There should be an option there to allow you to license it with a Community license. This can also be done by connecting your Robot (via the Assistant) to Community Orchestrator.
@loginerror hello sir thanks for update we tried a install a .msi installer from community edition and after connecting machine to orchestrator trying to acquire license from orchestrator with community edition we are getting below error. we are folllowing below steps after installed .msi installer from community edition:
orchestrator is connected to machine with machine key
after that we are trying to start studio getting below error.