AppiumTestDistribution / appium-device-farm

This is an Appium 2.0 plugin designed to manage and create driver sessions on available devices.
https://devicefarm.org
Other
340 stars 102 forks source link

Unexpected pressing home action every time create new session with the "appium-device-farm" plugin on Android devices #1429

Closed Sin-Nguyen closed 3 weeks ago

Sin-Nguyen commented 3 weeks ago

Describe the bug

Hi guys, In the previous , I used the api to delete currently running session and use our plugin to create new session to bypass Wechat mini program application on Android device. But when I install new version of Appium , Uiautomator2 and appium-device-farm. My functions does not work anymore. I noticed that every time appium server create new session, our plugin used ADB command to press Home button when the capabilities object is missing appPackage and appActivity . Could you please revert that action or add it in optional ?

Link to Appium logs

Allowing recording permissions
2024-10-25 07:49:58:086 - [ADB] Running '/Users/nsin/Library/Android/sdk/platform-tools/adb -P 5037 -s xxxxxxxxxx shell appops set com.device.farm PROJECT_MEDIA allow'
2024-10-25 07:49:59:228 - [ADB] Running '/Users/nsin/Library/Android/sdk/platform-tools/adb -P 5037 -s xxxxxxxxxx shell am start -W -n com.device.farm/com.device.farm.ScreenCaptureActivity'
2024-10-25 07:50:00:638 - [ADB] Running '/Users/nsin/Library/Android/sdk/platform-tools/adb -P 5037 -s xxxxxxxxxx forward tcp:53814 tcp:1991'
Pressing home
2024-10-25 07:50:01:665 - [ADB] Running '/Users/nsin/Library/Android/sdk/platform-tools/adb -P 5037 -s xxxxxxxxxx shell input keyevent KEYCODE_HOME'

full log in here : https://gist.github.com/Sin-Nguyen/f35227103913426c827961bc5033efbe#file-device-farm-log

Environment

  1. Appium version (or git revision) that exhibits the issue: 2.12.1
  2. Last Appium version that did not exhibit the issue (if applicable): 2.12.1
  3. Node.js version (unless using Appium.app|exe): 16.18.0
  4. Npm or Yarn package manager: 8.19.2
  5. Mobile platform/version under test:Android 13
  6. Real device or emulator/simulator: Real device
  7. Appium CLI or Appium.app|exe: Appium CLI
sudharsan-selvaraj commented 3 weeks ago

@Sin-Nguyen Pushed a fix in version 9.4.4. Now you can pass df:liveVideo as false in the capabilities to disable the live streaming.

github-actions[bot] commented 3 weeks ago

:tada: This issue has been resolved in version 9.4.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket: