"The device under test does not have reboot_readiness service. " during the start of the test

Hello.
I’m new with Appium and currently’s setting up the first project.
It contains both iOS and Android platform tests, that are running on the native apps.
Appium server starts automatically before the tests as well as emulators.
On this step I faced strange behaviour: iOS emulator starts and runs tests just fine directly from the test, Android emulator: if launched manually, this way runs tests fine, but if started automatically, is failing with "The device under test does not have reboot_readiness service. " error.
The debug shown that the test even didn’t start.
Tried to google the error, but didn’t find anything proper.
Would really appreciate any kind of suggestion or help, capabilities list would also be attached below.

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: "The device under test does not have reboot_readiness service. " is not a function 
Host info: host: '--', ip: '--'
Build info: version: '4.17.0', revision: 'e52b1be057*'
System info: os.name: 'Mac OS X', os.arch: 'aarch64', os.version: '14.5', java.version: '19.0.2'
Driver info: io.appium.java_client.android.AndroidDriver
Command: [null, newSession {desiredCapabilities=Capabilities {appium:app: /Users/--/IdeaProj..., appium:appActivity: com.--.--.p..., appium:appPackage: com.--.--.i..., appium:autoGrantPermissions: true, appium:automationName: UiAutomator2, appium:avd: Pixel_6_Pro, appium:deviceName: sdk_gphone64_arm64, appium:fullReset: false, appium:newCommandTimeout: 11, appium:platformVersion: 13.0, platformName: ANDROID}, capabilities=[{appium:autoGrantPermissions=true, appium:newCommandTimeout=11, appium:appActivity=com.--.--.presentation.activity.main.MainActivity, appium:avd=Pixel_6_Pro, appium:deviceName=sdk_gphone64_arm64, platformName=ANDROID, appium:automationName=UiAutomator2, appium:fullReset=false, appium:app=/Users/--/IdeaProjects/app-frontent-tests/src/test/resources/app/app.apk, appium:platformVersion=13.0, appium:appPackage=com.--.--.internal.debug}]}]
Capabilities {appium:app: /Users/--/IdeaProj..., appium:appActivity: com.--.--.p..., appium:appPackage: com.--.--.i..., appium:autoGrantPermissions: true, appium:automationName: UiAutomator2, appium:avd: Pixel_6_Pro, appium:deviceName: sdk_gphone64_arm64, appium:fullReset: false, appium:newCommandTimeout: 11, appium:platformVersion: 13.0, platformName: ANDROID}
public WebDriver createDriver(Capabilities capabilities) {
        // Restart adb service to ensure there're no issues on its side
        stopEmulator();
        stopAdbServer();
        startAdbServer();

        initPackageAndActivity();
//        File app = downloadApk();
        UiAutomator2Options options = new UiAutomator2Options();
        options.merge(capabilities);
        options.setAutoGrantPermissions(true);
        options.setFullReset(false);

        options.setAutomationName(AUTOMATION_NAME);
        options.setDeviceName(DEVICE_NAME);
        options.setAvd(DEVICE_NAME_AVD);
        options.setPlatformVersion(VERSION);
        options.setAppPackage(APP_PACKAGE);
        options.setAppActivity(APP_ACTIVITY);

        options.setApp(getAbsolutePath(APP));
//        options.setApp(app.getAbsolutePath());

        options.setNewCommandTimeout(Duration.ofSeconds(11));

        driver = new io.appium.java_client.android.AndroidDriver(getUrl(), options);
        return driver;
    }

make sure the uiautomator2 driver is up date

1 Like

It helped, thanks!
But now I faced other issue:
test runs just fine after the wipe data on the emulator, but once you’re starting it over again, I receive the error:
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: Appium Settings app is not running after 30000ms