AppiumDriver fails to install io.appium.settings on Android 12 - API 31 when booting the emultator for the first time.
See original GitHub issueThe problem
AppiumDriver fails to install io.appium.settings on Android 12 - API 31 when booting the emulator for the first time.
Environment
- Appium version (or git revision) that exhibits the issue: 2.0.0-beta.40
- Last Appium version that did not exhibit the issue (if applicable): -
- Desktop OS/version used to run Appium: Ubuntu 20.10
- Node.js version (unless using Appium.app|exe): v16.14.2
- Npm or Yarn package manager: 8.13.2
- Mobile platform/version under test: Android 12 (API 31)
- Real device or emulator/simulator: emultator (Pixel_5_API_31)
- Appium CLI or Appium.app|exe: -
- Espresso Driver: 2.8.1
Details
Appium/Espresso driver fails to install io.appium.settings when using an emulator with Android 12 (API 31) when booting for the first time (emulator just created or data wiped beforehand). If I close the emulator and run the test again everything works fine. This does NOT happen when using Android 11 (API 30) or Android 10 (API 29).
I think this might be related to https://github.com/appium/appium/issues/17200 - I had the same error when using espresso 2.7.1 with API 31, after upgrading espresso to 2.8.1 the error changed. And because this happens only when booting for the first time - I watched the emulator with log in real time and it seems it tries to install the io.appium.settings before Android has finished loading.
I tried using the timeout options, but it had no effect.
.setAvdLaunchTimeout(Duration.ofMinutes(10))
.setAvdReadyTimeout(Duration.ofMinutes(10))
.setAndroidInstallTimeout(Duration.ofMinutes(10))
.setAdbExecTimeout(Duration.ofMinutes(10))
Link to Appium logs
API 29 log API 30 log API 31 log - first boot API 31 logcat - first boot API 31 log - second run
Code To Reproduce Issue [ Good To Have ]
Issue Analytics
- State:
- Created a year ago
- Comments:18 (1 by maintainers)
Describe the stcktrace you get in adb logs and the steps to reproduce it. Perhaps, they could advice some more reliable way of emulator startup detection if such behaviour is expected (which I have doubts).
The update has been published