Hi,
I am trying to automate Appium testing process using a docker based appium server and emulator. I can see appium detecting my X86 emulator and accepting the apk file. However, I am getting below error soon after this.
[139651515938560]./android/base/files/IniFile.cpp:158:Failed to process .ini file /root/.android/emu-update-last-check.ini for reading.
[HTTP] --> POST /wd/hub/session {“capabilities”:[{“desiredCapabilities”:{“app”:"/usr/app/src/ApiDemos-debug.apk",“platformName”:“Android”,“deviceName”:“emulator-5554”}},{“requiredCapabilities”:{}}],“desiredCapabilities”:{“app”:"/usr/app/src/ApiDemos-debug.apk",“platformName”:“Android”,“deviceName”:“emulator-5554”},“requiredCapabilities”:{}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{“app”:"/usr/app/src/ApiDemos-debug.apk",“platformName”:“Android”,“deviceName”:“emulator-5554”},{},[{“desiredCapabilities”:{“app”:"/usr/app/src/ApiDemos-debug.apk",“platformName”:“Android”,“deviceName”:“emulator-5554”}},{“requiredCapabilities”:{}}]]
[debug] [BaseDriver] Event ‘newSessionRequested’ logged at 1500279215898 (08:13:35 GMT+0000 (UTC))
[Appium] Creating new AndroidDriver (v1.20.0) session
[Appium] Capabilities:
[Appium] app: ‘/usr/app/src/ApiDemos-debug.apk’
[Appium] platformName: ‘Android’
[Appium] deviceName: ‘emulator-5554’
[debug] [AndroidDriver] AndroidDriver version: 1.20.0
[BaseDriver] Session created with session id: 4b5b2aed-45ec-4a82-b968-c05ed454ed6e
[debug] [AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_131
[ADB] Checking whether adb is present
[ADB] Using adb from /root/platform-tools/adb
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices…
[debug] [ADB] 1 device(s) connected
[AndroidDriver] Using device: emulator-5554
[ADB] Checking whether adb is present
[ADB] Using adb from /root/platform-tools/adb
[debug] [ADB] Setting device id to emulator-5554
[BaseDriver] Using local app ‘/usr/app/src/ApiDemos-debug.apk’
[debug] [AndroidDriver] Checking whether app is actually present
[AndroidDriver] Starting Android session
[debug] [ADB] Running ‘/root/platform-tools/adb’ with args: ["-P",5037,"-s",“emulator-5554”,“wait-for-device”]
[debug] [ADB] Getting connected devices…
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running ‘/root/platform-tools/adb’ with args: ["-P",5037,"-s",“emulator-5554”,“shell”,“echo”,“ping”]
[debug] [Logcat] Starting logcat capture
[debug] [AndroidDriver] Pushing settings apk to device…
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Getting connected devices…
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running ‘/root/platform-tools/adb’ with args: ["-P",5037,"-s",“emulator-5554”,“shell”,“pm”,“list”,“packages”,“io.appium.settings”]
[debug] [ADB] Running ‘/root/platform-tools/adb’ with args: ["-P",5037,"-s",“emulator-5554”,“shell”,“pm”,“list”,“packages”,“io.appium.settings”]
_[ADB] Error: Error finding if app is installed. Original error: Error executing adbExec. Original error: ‘Command ‘/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages io.appium.settings’ exited with code 1’; Stderr: ‘Error: Could not access the Package Manager. Is the system running?’; Code: ‘1’_
_ at Object.wrappedLogger.errorAndThrow (…/…/lib/logging.js:63:13)_
_ at ADB.callee$0$0$ (…/…/…/lib/tools/apk-utils.js:21:9)_
_ at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)_
_ at GeneratorFunctionPrototype.invoke [as invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)****
_ at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)_
_ at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)_
_ at run (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/es6.promise.js:108:47)_
_ at /usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/es6.promise.js:119:28****
**** at flush (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/$.microtask.js:19:5)_
_ at nextTickCallbackWith0Args (node.js:419:9)_
_ at process.tickCallback (node.js:348:13)****
_ [Error: Error finding if app is installed. Original error: Error executing adbExec. Original error: ‘Command ‘/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages io.appium.settings’ exited with code 1’; Stderr: ‘Error: Could not access the Package Manager. Is the system running?’; Code: ‘1’]_
_[AndroidDriver] Ignored error while installing Appium Settings helper: “Error finding if app is installed. Original error: Error executing adbExec. Original error: ‘Command ‘/root/platform-tools/adb -P 5037 -s emulator-5554 shell pm list packages io.appium.settings’ exited with code 1’; Stderr: ‘Error: Could not access the Package Manager. Is the system running?’; Code: ‘1’”. Expect some Appium features may not work as expected unless this problem is fixed._
[debug] [ADB] Getting connected devices…
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running ‘/root/platform-tools/adb’ with args: ["-P",5037,"-s",“emulator-5554”,“shell”,“getprop”,“ro.build.version.sdk”]
Kindly note that i am able to run my test locally using same server version and emulator.
Any help is much appreciated.
Thank You.
Regards,
Manoj