Taking Screenshot not working in PiP mode

PiP mode can causing issues with take screenshot activity while capturing screenshot.
Error is showing as below:-

UiPath.Core.ImageOperationException: 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.Core.Image..ctor(Region screenRegion) —> System.ComponentModel.Win32Exception: 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)

            --- End of inner exception stack trace ---

at UiPath.Core.Activities.ObsoleteTaskAsyncCodeActivity`1.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)

at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)

at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Please suggest any solution.

Which mode of PIP are you using?

There are few known limitations for PIP mode which you could see in the UiPath site. One of the limitation is taking screenshot

Check below link

If you are using windows mode, I would suggest you to test it using session

Goto project settings and change the mode

I believe none of the thread have a solid solution for this. Kindly check with your UiPath spoc as well to get the latest update