UIPath Studio crashed when automating BlueStacks

I tried to automate an Android app running on an BlueStacks4 emulation. I am aware that this will be something similar to Citrix. So i tried to automate a click in a graphic element.
First spying the graphic didnt work as expected but I found a workaround. The problem now is that UIPath Studio crashes and I need task manager to kill UIPath Studio when I try to run this. The app in the emulator continues to run fine.
Any idea what to do?

when you are using emulator, your ram space will be occupied by the emulator. this may cause the system to hang . try to reduce the android ram space hope it helps.

Hi @moenk

Could you collect relevant information about the crash (even viewer log, studio logs) and provide it together with your Studio version?

Normally Studio should not crash because of another app.

Sure I will - what you need exactly? Latest UIPath Studio and there is no error message or log, because it simply crashes (white screen and studio no reacting any more).
I guess you would be able to reproduce this with any app in BlueStacks4, just a simple click in any icon would do it.
I also tried PyAutoGUI to do the same, that works fine, but I want to automate with UIPath.

Would running Studio as administrator help here? Could you check?

I reproduce the same issue with Blustack 4 (Admin mode is not help)

It makes no difference who starts the BlueStacks4 emulator. Of course I can imagine that this is no trivial application, but even if it will not work the UIPath studio should not just crash.

Could you test with the latest Community Edition 2019.2?

Tried version 2019.7.0 - also crashes.

Workaround that worked for my pupose: Wrote small Python function use PyAutoGUI and did it this way, but this need Python installed. Calling Python from UIPath works great btw and has potential to do many other things.

This is still an issue in Studio.2020.2.0 Beta 108.

Will update if I find a fix. Have a feeling its a process permission / ownership issue

1 Like

Hi @Ryan42

Welcome to our UiPath Forum! :slight_smile:

It seems to be working on this BlueStack version:
image

And this UiAutomation activity package version:
image

Could you give it a try? :slight_smile:
We were able to make a click with this selector:

<wnd app='bluestacks.exe' cls='HwndWrapper*' title='BlueStacks' />
<ctrl automationid='mImage' idx='2' role='graphic' />

So I was able to narrow down the issue, not sure if this falls on bluestacks side or UIPaths.

The Android App being used in the following steps is: https://play.google.com/store/apps/details?id=com.duy.calculator.free&hl=en_US (source: GitHub - tranleduy2000/ncalc: Power calculator for Android. Solve some problem algebra and calculus.)

The following two sequences were tested:

Example 1: Imgur: The magic of the Internet
Example 2: Imgur: The magic of the Internet

UIPath is able to preform the first click on both sequences, however, the first example causes Bluestacks to freeze on any clicks after the first.

Spent way to long trying to compare both processes but could not see a difference.

TLDR: use the RunApplication activity to launch Bluestacks

Can’t seem to edit but this was user error: looks like I should be using attach

If it is still an issue, feel free to share the sample project that reproduces the issue, it would help here I think.

Simply create a new project in Studio and provide minimal flow that will cause either Studio or BlueStacks to crash.

Hi Guys,

I am able to automate clicks on bluestacks on my UiPath. Besides the trick mentioned above

  • Use Bluestacks 4.160
  • Use preview version of Automation.Activities.

When you simulate the click, make sure that you set “SendWindowsMessage” to “False” if you use click on image function.

Good luck

1 Like

Hi Guys, perhaps I was too optimistic. The solution clicks for first time, however, if there is any click afterwards, bluestack crash… Need to dig further …

Hi Guys, Finally got it working in a different way.

It seems that when using “click image” for BlueStack, the process hangs up when UiPath try to do it second time. So I use the following solution

Step 1: Use “Find Image” and output images found to a UIElement
Step 2: Use “Click” directly on the output element from Step 1.

The above solution works for me.

Note: I also use “High Light” on the image found after step 1. But it should not be mandatory.

Let me know if it works for you guys as well.

Best regards,
Xin