Skip to content

Uiautomator2 error in appium logs : [MJSONWP] Encountered internal error running command: TypeError: helpers.installApkRemotely is not a function #828

@shagupta92042

Description

@shagupta92042

Description

I am working on automation for an android app using appium . When i use uiautomator with appium then it works fine and my test case passes on android real device but when i switch to uiautomator2 , it throws error . Uiautomator is working fine for andorid version 6.0 but i need uiautomator2 for android device 8.1

Environment

  • java client build version or git revision if you use some shapshot: 5.0.0-BETA9
  • Appium server version or git revision if you use some shapshot: 1.7.2 beta
  • Desktop OS/version used to run Appium if necessary: Widows 7
  • Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe: 8.9.4
  • Mobile platform/version under test: Android 6.0
  • Real device or emulator/simulator: Motorola real device

Details

I am running my android device (6.0) test cases on an android app using selenium and appium which is currently using the uiautomator but i require uiautomator2 as uiautomator gets crashed while running test cases on android version 8+ . I am getting error while using uiautomator2 .
[MJSONWP] Encountered internal error running command: TypeError: helpers.installApkRemotely is not a function

Code To Reproduce Issue [ Good To Have ]

DesiredCapabilities capabilities = new DesiredCapabilities();

		capabilities.setCapability("automationName", "uiautomator2");
		capabilities.setCapability("platformName", "Android");
		capabilities.setCapability("app", "D:\\release.apk");
		capabilities.setCapability("deviceName", "TA99300E8V");
		capabilities.setCapability("platformVersion", "6.0");
		capabilities.setCapability("appPackage","com.iongroup.ionweb.testagt");
		capabilities.setCapability("appActivity","com.iongroup.ionweb.WebViewActivity");
		driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);

Ecxeption stacktraces

https://gist.github.com/shagupta92042/e46bad36c73b84c72936959a9d44043f

Link to Appium logs

https://gist.github.com/shagupta92042/e46bad36c73b84c72936959a9d44043f

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions