Android Simulator reports error on custom application Make sure the 'LayoutParams.FLAG_SECURE'

Good morning,

Katalon works fine when replaying the Android test cases provided by Katalon. We moved forward to record on our custom application which does have a secure login screen.

I select Start recording and selecting the device we receive the following errorAn unknown server-side error occurred while processing the command. Original error: Cannot get screenshot data because of ‘The size of the taken screenshot equals to zero.’. Make sure the ‘LayoutParams.FLAG_SECURE’ is not set for the current view (WARNING: The server did not provide any stacktrace information)

Command duration or timeout: 0 milliseconds

Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’

System info: host: ‘Pauls-MacBook-Pro.local’, ip: ‘fe80:0:0:0:1c27:d66a:88f2:b52c%en0’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.14’, java.version: ‘1.8.0_181’

Driver info: com.kms.katalon.core.appium.driver.SwipeableAndroidDriver

Capabilities {app: /Users/paulkanaris/devero/d…, autoGrantPermissions: true, automationName: uiautomator2, deviceName: emulator-5554 (Android SDK …, fullReset: false, javascriptEnabled: true, newCommandTimeout: 1800, noReset: true, platform: ANDROID, platformName: ANDROID, udid: emulator-5554}

Session ID: d2ded320-f5d9-489c-9678-c541b2881721

Is there a way to disable FLAG_SECURE in a session or how do we bypass this error?

Some objects are recorded but I am unable to record the text boxes to enter the Site URL to open the login page or click Save.

Thank you,

Paul

Hi Paul,

I think `FLAG_SECURE` is something set in the Android app itself. You’d have to get a new build without that on those particular screens from the app developers - perhaps this can be done for a debug build of the app only.

Hope this helps,

Chris

Hi Chris,

We discovered the original development team had added a component to secure all screens. There was no flag to turn this off. To correct the issue, we removed the component and the dev team is looking into other options for securing screens against screen scraping or snapshots.

Thank you,
Paul