MDM Freezes And Will Not Move To The Next Screen

When performing the mobile automation, in the Mobile device manager (MDM) the screen is not moving to the next screen or screen is not loading.

Description: While performing the mobile automation, in some scenarios after launching the mobile application we are trying to automate and in the MDM either the screen is not loaded or after navigating to another screen the screen is still freezes in the previous one.

Resolution: Due to some security restrictions, the application team might enable the Secure Flag, which disables the functionality of the taking the screenshot. But MDM works in a way it will query for the series of screenshots through appium every second and display the mobile screen in the UiPath MDM, since the secure flag is enabled the appium will not be able to take the screenshot of the mobile and send it to the MDM.

The same can be verified by replicating the issue once the screen got freezes in the MDM, go to the physical device and check if it successfully navigated to the actual application or page and also check the appium logs for the below error

{"error":"unable to capture screen","message":"Failed to capture a screenshot. Does the current view have 'secure' flag set?","stacktrace":"io.appium.uiautomator2.common.exceptions.TakeScreenshotException: Failed to capture a screenshot. Does the current view have 'secure' flag set?}

  1. Check with the application team
  2. Get a separate apk file (Android)/ ipa file (IOS) by disabling that flag for performing the mobile automation .