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.

[Android] Setup failed when using avd capabilities

See original GitHub issue

The problem

I’m using capability avd and uiautomator2 for launching emulator from my local windows desktop and getting error : Error: Appium Settings app is not running after 5000ms. I saw the log and notice this command :

[debug] [ADB] Running 'C:\Users\root\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am start -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'C:\Users\root\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep -f io\\.appium\\.settings'

Later i try to run this command manually and getting no results. However using the same capabilities for pre launched android emulator this command showing result. Seems there are problems when launching the io.appium.setting activity.

adb -P 5037 -s emulator-5554 shell pgrep -f io\\.appium\\.settings

Environment

Appium version -v1.17.1 Node.js version -v12.13.1 Npm or Yarn package manager: 6.14.2 Mobile platform/version under test: Android API 28 Real device or emulator/simulator: Android emulator Appium CLI or Appium.app|exe: appium cli

Details

Launch with uiautomator2

Link to Appium logs-https://gist.github.com/zethyscythe/f74dd3d729117a939bb58a1f8fb9476e

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17

github_iconTop GitHub Comments

1reaction
mykola-mokhnachcommented, Aug 7, 2020

This makes sense. I’ll add a patch. Thanks for the update @Enrico204

0reactions
Enrico204commented, Aug 7, 2020

I just found this issue in the Google Android Emulator issue tracking: https://issuetracker.google.com/issues/142533355

In short: comment 4 from a Google employee says that the delay-adb flag should be used only on API 28 and later (API <= 27 images don’t send the “boot completed” signal required).

So the correct implementation is to enable this flag only on Android versions >= 9

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot known issues with Android Emulator
On ChromeOS, Android Virtual Devices (AVDs) might fail to launch because the libnss3 dependency is missing. To launch the AVDs successfully, run ...
Read more >
Error on "app" capability launching Android app with ...
I'm trying to use Appium on Visual Studio. I stablished the desired capabilities but when I try to run my test I receive...
Read more >
Appium no longer working with an AVD after latest Android ...
This has been occuring on a Windows 10 machine, running Android Studio 3.4.1 and using Android SDK 29.0.0, and running Appium 1.13. My...
Read more >
Android Emulator app test failing with the error ...
This error implies that the application was built for a different architecture than the emulator it's being run on. We support x86 or...
Read more >
Solved: An Appium server error occurred: Failed to create
1. Appium server setup · 2. Android Studio setup · 3. download and setup the mobile sample from smartbear website · 4. Execute...
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