Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Error:Appium Settings app is not running after 30000ms" while running emulator in headless in Android version 13 and 14 #20074

Open
3 tasks done
SanskarTx opened this issue May 6, 2024 · 3 comments
Labels
Android related to Android-native driver(s) Needs Triage bugs which are not yet confirmed

Comments

@SanskarTx
Copy link

Do I have the most recent component updates?

  • I use the most recent available driver/plugin and server versions

Is the component officially supported by the Appium team?

  • I have verified the component repository is present under the Appium organization in GitHub

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I want to run the emultaor in headless , on Android 10 it is running fine but in Android 13 and 14 i am getting the issue as

“Error: Appium Settings app is not running after 30000ms” while everything is running fine when i am not using headless mode.
Due to which app is not launching

Expected Behavior

Want app to launch without getting the below error

“Error: Appium Settings app is not running after 30000ms”

Minimal Reproducible Example

I am using Android Studio to create emulator and i am using below code to run in headless. I am getting this issue with Android version 13 and 14 on Android 10 it is running fine

UiAutomator2Options options=new UiAutomator2Options();
options.setAutomationName(property.returnProperty("automationName"));
options.setPlatformName(Platform.ANDROID.name());
options.setPlatformVersion(platformVersion);
options.setAppPackage(property.returnProperty("appPackage"));
options.setAppActivity(property.returnProperty("appActivity"));
options.noReset();
options.autoGrantPermissions();
options.setNewCommandTimeout(Duration.ofSeconds(120));
options.setIsHeadless(true);
options.setAvdArgs("-no-window");
options.setAvdArgs("-no-skin");
options.setAvdArgs("-no-audio");
options.setAvdArgs("--log-level debug");
options.setAvdLaunchTimeout(Duration.ofMillis(120000));
options.setAvdReadyTimeout(Duration.ofMillis(120000));
options.setCapability("avd",emulatorName());
options.setCapability("ignoreHiddenApiPolicyError",true);
options.setCapability("avdArgs","-netfast -no-boot-anim");

Environment

  • Operating system:
  • Appium server version (output of appium --version):
  • Appium driver(s) and their version(s):
  • Appium plugin(s) and their version(s):
  • Node.js version (output of node --version):
  • npm version (output of npm --version):
  • Last component(s) version which did not exhibit the problem:
  • Platform and version under test:
  • Real device or emulator/simulator:

Link to Appium Logs

https://gist.github.com/SanskarTx/35324127d0da5fe59a048fa72159c321

Further Information

No response

@SanskarTx SanskarTx added Bug a problem that needs fixing Needs Triage bugs which are not yet confirmed labels May 6, 2024
@mykola-mokhnach
Copy link
Collaborator

It looks like the emulator startup performs too slow. Try to preboot it before the test starts or get a faster machine

@mykola-mokhnach mykola-mokhnach added Needs Info typically non-actionable; needs author to respond and removed Bug a problem that needs fixing Needs Triage bugs which are not yet confirmed labels May 6, 2024
@SanskarTx
Copy link
Author

But i am already using the below capabilities
"appium:avdReadyTimeout": 120000,
"appium:avdLaunchTimeout":120000

And according to appium logs , device is getting recognized

[ADB] Getting connected devices
[ADB] Connected devices: [{"udid":"emulator-5554","state":"device"}]
[ADB] 1 emulator connected
[ADB] Overriding C:\Users\Sanskar.emulator_console_auth_token with an empty string to avoid telnet authentication for emulator commands
[ADB] Executing Emulator console command: avd name
[ADB] Found emulator 'Android13' on port 5554
[ADB] Setting device id to emulator-5554
[ADB] Running 'C:\Users\Sanskar\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 wait-for-device'
[ADB] Running 'C:\Users\Sanskar\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
[ADB] Current device property 'ro.build.version.sdk': 33
[ADB] Getting device platform version
[ADB] Running 'C:\Users\Sanskar\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
[ADB] Current device property 'ro.build.version.release': 13
[ADB] Device API level: 33

@mykola-mokhnach mykola-mokhnach added Android related to Android-native driver(s) Needs Triage bugs which are not yet confirmed and removed Needs Info typically non-actionable; needs author to respond labels May 6, 2024
@SanskarTx
Copy link
Author

SanskarTx commented May 6, 2024

@mykola-mokhnach One more info , it sometimes run fine . When i hit adb logcat simultaneously and sometimes even on hitting adb logcat it gives same above mentioned issue. But adb logcat just log the messages. It should not have any impact over the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android related to Android-native driver(s) Needs Triage bugs which are not yet confirmed
Projects
None yet
Development

No branches or pull requests

2 participants