question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't run Android Appium tests "this.shell(...).trim is not a function"

See original GitHub issue

The problem

Since I upgraded appium from 1.4.9 to 1.6.0 I’m not able to run my python appium tests anymore.

Environment

  • Appium version (or git revision) that exhibits the issue: 1.6.0
  • Last Appium version that did not exhibit the issue (if applicable): 1.4.9
  • Desktop OS/version used to run Appium: OS X El Capitan 10.11.6
  • Node.js version (unless using Appium.app|exe): 5.7.1
  • Mobile platform/version under test: Android
  • Real device or emulator/simulator: Real device, Sony Xperia Z3
  • Appium CLI or Appium.app|exe: Appium CLI

Link to Appium logs

https://gist.github.com/lallish/3c210e8c41eaa3fb43b0845f9e798bbe

Code To Reproduce Issue [ Good To Have ]

This is my desired capabilities:

    self.desired_caps['platformName'] = 'Android'
    self.desired_caps['platformVersion'] = '6.0.1'
    self.desired_caps['deviceName'] = 'Android'
    self.desired_caps['automationName'] = "Appium"
    self.desired_caps['app'] = self.app_file
    self.desired_caps['app-package'] = 'com.axis.acc'
    self.desired_caps['appActivity'] = self.START_ACTIVITY
    self.desired_caps['appWaitActivity'] = '%s,%s,%s' % \
       (OAuthView.ACTIVITY, self.START_ACTIVITY, SitesView.ACTIVITY)
    self.desired_caps['newCommandTimeout'] = '6000'

I’ve tried with other platform versions but they seem to give the same result. Appium manages to start the app but then 1 sec after appium kills the app.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jlippscommented, Oct 26, 2016

it should look like this:

let stdout = (await this.shell(["ps"])).trim();

and not this:

let stdout = await this.shell(["ps"]).trim();

And that’s how you’ll know you’ve got the right version of appium-adb

0reactions
lock[bot]commented, Apr 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting - Appium
If you're running the Android emulator using Fastboot and the emulator isn't being detected by adb, try doing a cold boot: Android Studio...
Read more >
Running protractor with Genymotion Android emulator "this ...
Hey guys when I try running a protractor test suite on Appium 1.6 using a genymotion Android emulator I am getting stuck on...
Read more >
Extending custom test environments in Device Farm
Instructs Appium to compress the Android UI hierarchy only to relevant views for the test, speeding up certain element lookups. However, this can...
Read more >
All Editions - Appium Pro
In this edition we take a look at how to use Appium to inject accelerometer values into an Android virtual device, so you...
Read more >
AppiumLibrary - GitHub Pages
This run-on-failure functionality only works when running tests on Python/Jython 2.4 or newer and it does not work on IronPython at all. Remove...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found