Not able to launch iOS application using Appium Desktop to inspect the element - appium

Test Environment: iOS 11, OSX 10.12, Appium Desktop 1.2.5, Xcode 8.1
Desired Capabilities :
{
"platformName": "iOS",
"deviceName": "iPhone 7",
"udid": "93551a7d721b790b0188642402f1ada96892b816",
"app": "/Users/globalit/Desktop/IntegrationApp.app",
"automationName": "XCUITest"
}
I am able to launch integration app in the device using xcode.
also successfully deployed web-driver agent in my device.
But i am getting following error when i tried to launch my ios application via appium desktop.
Error:
An unknown server-side error occurred while processing the command. Original error: Unable to start WebDriverAgent session because of xcodebuild failure: "Could not proxy command to remote server. Original error: Error: socket hang up". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
Appium Logs:
XCUITest] Failed to create WDA session. Retrying...
[BaseDriver] Event 'wdaSessionAttempted' logged at 1509096179356 (14:52:59 GMT+0530 (IST))
[XCUITest] Sending createSession command to WDA
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[XCUITest] Failed to create WDA session. Retrying...
[XCUITest] Unable to start WebDriverAgent session because of xcodebuild failure: "Could not proxy command to remote server. Original error: Error: socket hang up". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down iproxy process (pid 576)
[XCUITest] iproxy exited with code 'null'
[XCUITest] Shutting down xcodebuild process (pid 577)
[XCUITest] xcodebuild exited with code 'null' and signal 'SIGTERM'
[XCUITest] Removing WDA application from device
[XCUITest] Error: Unable to start WebDriverAgent session because of xcodebuild failure: "Could not proxy command to remote server. Original error: Error: socket hang up". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:381:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
Error: Unable to start WebDriverAgent session because of xcodebuild failure: "Could not proxy command to remote server. Original error: Error: socket hang up". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:381:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[XCUITest] Not clearing log files. Use `clearSystemFiles` capability to turn on.
[iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: Unable to start WebDriverAgent session because of xcodebuild failure: "Could not proxy command to remote server. Original error: Error: socket hang up". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:381:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session 500 118446 ms - 526

Related

Error occured while starting App. Original error: com.abc.xyz.ui.SplashActivity or com.abc.xyz.dev.com.abc.xyz.ui.SplashActivity never started

I recently started facing this issue.
I upgraded my appium version to 1.6.5 but while running automation when i try to launch app i am getting following error.
[ADB] Error: com.abc.xyz.ui.SplashActivity or com.abc.xyz.dev.com.abc.xyz.ui.SplashActivity never started
at Object.wrappedLogger.errorAndThrow (../../lib/logging.js:63:13)
at ADB.callee$0$0$ (../../../lib/tools/apk-utils.js:153:7)
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 next] (/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 <anonymous>
Appium couldn't automatically match the activity when your android app been launched.
This can be solved by providing activity and package name you want appium to wait for in capabilities:
E.g
"appWaitActivity" : "com.abc.xyz.ui.SomeActivity",
"appWaitPackage" : "com.abc.xyz"
You can use adb shell dumpsys activity to get current activity of your app

Appium path issue

I'm trying to run an apk file from my test suite in appium, the emulator runs successfully but at the time of launch of the apk it says apk not found. The path looks correct to me still unable to figure out the solution.
Below is the error from Appium.
AndroidDriver] Using device: emulator-5554
[ADB] Checking whether adb is present
[ADB] Using adb from /Library/Android/sdk/platform-tools/adb
[debug] [ADB] Setting device id to emulator-5554
[BaseDriver] Using local app '/src/test/resources/myapp.apk'
[debug] [AndroidDriver] Checking whether app is actually present
[debug] [AndroidDriver] Shutting down Android driver
[AndroidDriver] Cannot shut down Android driver; it has already shut down
[HTTP] <-- POST /wd/hub/session 500 25028 ms - 212
[AndroidDriver] Error: Could not find app apk at /src/test/resources/myapp.apk
at Object.wrappedLogger.errorAndThrow (lib/logger.js:60:13)
at AndroidDriver.checkAppPresent$ (lib/driver.js:274:11)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at run (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:104:47)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:115:28
at flush (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/$.microtask.js:19:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
[Error: Could not find app apk at /src/test/resources/myapp.apk]
I tried following path apart from the one listed above:
1. ./src/test
2. Start from the module name which is part of /src/test i.e. modulename/src/test
3. Tried ~./src/test
4. Tried ~/src/test
Any pointers as to what is it that I'm missing?
Also, why am I getting this ([debug] [AndroidDriver] Shutting down Android driver) before the apk launch?
Code:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.FULL_RESET,"true");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME,"Nexus10");
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION,"4.4");
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME,"Android");
capabilities.setCapability(MobileCapabilityType.APP,"myapp.package");
capabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, "20");
capabilities.setCapability("app", "/src/test/resources/myapp.apk");
AndroidDriver = new AndroidDriver(new URL("http://127.0.0.1:4724/wd/hub"), capabilities);
AndroidDriver.rotate(ScreenOrientation.PORTRAIT);
log.info("Set up done for capabilities");
Thanks in advance.
If the 'src' folder is in the same location as you're running from, you want to remove the preceding '/' as that's telling Appium to look starting at the root of the entire file system rather than from your local path.
src/test/resources/myapp.apk
My experience is that using '~' does not work with Appium. I personally have parameterized the app location and pull it from an environment variable to account for it being in different places on different systems, but in all cases I provide the path from the file system root as it's simplest.

xcodebuild failure: "xcodebuild failed with code 65 is displaying when tried to start session with Appium Desktop

When i tried to start session with appium desktop i am getting following error:
An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
Desired Capabilities Used in Appium Desktop:
{
"platformName": "iOS",
"deviceName": "iPhone 7",
"udid": "93551a7d721b790b0188642402f1ada96892b816",
"app": "/Users/globalit/Desktop/IntegrationApp.app",
"automationName": "XCUITest",
"noReset": true
}
Configuration:
IOS 11, OSX 10.12, Xcode 8.1, Appium Desktop 1.2.5
Error logs:
[Xcode] 2017-10-27 15:27:28.943 xcodebuild[871:24036] Error Domain=com.apple.platform.iphoneos Code=-12 "Unable to launch com.apple.test.WebDriverAgentRunner-Runner" UserInfo={NSLocalizedDescription=Unable to launch com.apple.test.WebDriverAgentRunner-Runner, NSUnderlyingError=0x7fd602a29400 {Error Domain=DTXMessage Code=1 "(null)" UserInfo={DTXExceptionKey=The operation couldn’t be completed. Unable to launch com.apple.test.WebDriverAgentRunner-Runner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user. : Failed to launch process with bundle identifier 'com.apple.test.WebDriverAgentRunner-Runner'}}}
[Xcode] 2017-10-27 15:27:28.943 xcodebuild[871:24036] Error Domain=IDETestOperationsObserverErrorDomain Code=5 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
[Xcode] ** TEST EXECUTE FAILED **
[Xcode]
[Xcode]
[XCUITest] xcodebuild exited with code '65' and signal 'null'
[BaseDriver] Event 'wdaStartFailed' logged at 1509098248985 (15:27:28 GMT+0530 (IST))
[XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down iproxy process (pid 870)
[XCUITest] iproxy exited with code 'null'
[XCUITest] Removing WDA application from device
[XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:381:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
Error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:381:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[XCUITest] Not clearing log files. Use `clearSystemFiles` capability to turn on.
[iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:381:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session 500 29571 ms - 470
[HTTP] --> DELETE /wd/hub/session {}
[HTTP] No route found. Setting content type to 'text/plain'
[HTTP] <-- DELETE /wd/hub/session 404 13 ms - 57
Please run the Xcode project which is located here on your device once: /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj
And let me know if you face any problems.
WebdriverAgent is not built and tested in your mobile device. I faced the same issue and resolved it by getting the Webdriver agent to open in my mobile device.
I had same issue with Appium-desktop after upgrading to Xcode 12.4 and trying to run on ios 14.4, it worked for me after adding the following capabilities:
{
"xcodeOrgId": "OrgID",
"xcodeSigningId": "SignId",
}
i'm using appium-desktop 1.18.3
The configs from Ashraf answer worked for me. I was facing this issue for more than 24 hours. I have similar configs, iPad with iOS 14.4 and Appium desktop 1.20.2 version, and XCode in 12.4 version.
You can use this command on the terminal:
cd /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent
xcodebuild -allowProvisioningUpdates -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=Your Device UDID' test
I updated my appium server and my old tests which were giving me this error started working.

The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file

I have installed Appium 1.6.4 on Mac using Terminal. Also I can able to inspect iPhone WebElements using Safari Browser in MAC.
But I need to inspect the keyboard elements and date picker elements on iPhone real device. For this, I have again installed Appium-desktop 1.0.2 beta2 version. When I launch the Appium desktop(GUI) and run the selenium code. It throws the below error.
XCUITest] Log file for xcodebuild test: /Users/msubramaniam/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Logs/Test/D3F3B94A-A324-4996-B60F-0732CEBFB00D/Session-WebDriverAgentRunner-2017-05-30_125049-1uf7KZ.log
[Xcode] 2017-05-30 12:50:49.364 xcodebuild[87735:236610] Error Domain=NSCocoaErrorDomain Code=260 "The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/msubramaniam/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7fb4306026c0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
[Xcode] 2017-05-30 12:50:49.364 xcodebuild[87735:236610] Error Domain=IDETestOperationsObserverErrorDomain Code=6 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
[Xcode]
[Xcode] ** TEST EXECUTE FAILED **
[Xcode]
[Xcode]
[XCUITest] xcodebuild exited with code '65' and signal 'null'
[BaseDriver] Event 'wdaStartFailed' logged at 1496128849419 (12:50:49 GMT+0530 (IST))
[XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down iproxy process (pid 87701)
[XCUITest] iproxy exited with code 'null'
[XCUITest] Removing WDA application from device
[BaseDriver] Event 'wdaStartAttempted' logged at 1496128859998 (12:50:59 GMT+0530 (IST))
As per the above log, I have navigated to the below location,
/Users/msubramaniam/Library/Developer/Xcode/DerivedData
I found that there are two WebDriverAgents
WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy
WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs
It is calling the second WebDriverAgent and it does not have the "WebDriverAgentRunner-Runner.app".
First WebDriverAgent has "WebDriverAgentRunner-Runner.app".
So how to call the first WebDriverAgent.
I have also tried to remove the WebDriverAgent by using the below command.
rm -rf /WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs
But it is not deleted.
Kindly provide the solution for this to resolve.
There was issue with carthage. Ran below commands and it got resolved :
rm '/usr/local/bin/carthage'
brew install carthage
brew link carthage

Error: Unable to find an active device after upgrade to Appium 1.5.3

I upgraded to Appium1.5 and now when I launch and try to run my tests I am seeing this error :
Checking my settings and all seems fine and even the inspector works fine .
[AndroidDriver] Error: Unable to find an active device or emulator with OS 1. The following are available: 192.168.99.101:5555 (4.3)
at Object.wrappedLogger.errorAndThrow (lib/logger.js:60:13)
at Object.callee$0$0$ (lib/android-helpers.js:154:16)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at run (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:104:47)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:115:28
at flush (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/$.microtask.js:19:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
[Error: Unable to find an active device or emulator with OS 1. The following are available: 192.168.99.101:5555 (4.3)]
[MJSONWP] Encountered internal error running command: Error: Unable to find an active device or emulator with OS 1. The following are available: 192.168.99.101:5555 (4.3)
at Object.wrappedLogger.errorAndThrow (lib/logger.js:60:13)
at Object.callee$0$0$ (lib/android-helpers.js:154:16)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at run (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:104:47)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:115:28
at flush (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/$.microtask.js:19:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
You need to specify the platform version as capability as following -
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "7.1");
My version is 7.1, use the version which is right for you
1.If you want to work with appium version 1.5 again then you can do following things.
Uninstall appium and then install appium for specific version
npm uninstall -g appium
npm install -g appium#1.5
appium -v
2.Now suppose in case if you update appium version then you need to update then all maven dependencies,java,testng etc.
Suppose if you install latest appium then you need to check first your previos xcode,android and all dependencies works for it.
3.If upgrading the version not working then it could be problem with appium version so you have to revert back to your old version which was working fine as 1st option.
craj, may be it is the problem of the adb not of appium.
Had you tried adb devices on cmd?

Resources