An unknown server side error occurred while processing the command

An unknown server-side error occurred while processing the command. Original error: Could not find adb.exe in C:UsersAdministratorAppDataLocalAndroidandroid-sdk;platform-toolsadb.exe,C:

An unknown server-side error occurred while processing the command.

Original error: Could not find adb.exe in
C:UsersAdministratorAppDataLocalAndroidandroid-sdk;platform-toolsadb.exe,C:UsersAdministratorAppDataLocalAndroidandroid-sdk;emulatoradb.exe,C:UsersAdministratorAppDataLocalAndroidandroid-sdk;toolsadb.exe,C:UsersAdministratorAppDataLocalAndroidandroid-sdk;toolsbinadb.exe.
Do you have the Android SDK installed at
‘C:UsersAdministratorAppDataLocalAndroidandroid-sdk;’?

please help me

Ashok kumar Ganesan's user avatar

asked Jul 26, 2018 at 6:55

chandu chandra's user avatar

I came across same problem.

  1. Open the Control Panel.
  2. Go to Advanced System Settings.
  3. Click on Environment Variables.
  4. Now you will see User environment for hp and System Variables.
  5. Click on new and add 2 paths:

    • ANDROID_HOME

    • Path Generally this one (C:UsershpAppDataLocalAndroidSdk)

  6. Close all tabs of Appium.
  7. Open Appium.

If this is not working follow next process along with the above.

  1. Close all tabs of Appium.
  2. Open Appium.
  3. Click on Edit Configuration.
  4. Now give the Android home and Java Home path here.
  5. Click on Save and Restart.
  6. Now fill all the previous data and click on Start Session.

frianH's user avatar

frianH

7,1756 gold badges19 silver badges43 bronze badges

answered Jul 30, 2019 at 11:23

pallavi puri's user avatar

This might be definitely caused by wrong folder names in the PATH variable:
Please check your PATH environment variable and make sure you have (at least) the following folder (no semi colon on it):

C:UsersAdministratorAppDataLocalAndroidandroid-sdkplatform-tools

answered Jul 26, 2018 at 7:58

Lino's user avatar

LinoLino

4,6393 gold badges20 silver badges38 bronze badges

The problem

I can’t launch ui inspector from Appium when I select Start session I get this error:
An unknown server-side error occurred while processing the command. Original error: You must include a platformName capability

Environment

  • Appium version (1.13)
  • Last Appium version that did not exhibit the issue (if applicable):
  • Desktop OS/version used to run Appium:
  • Mobile platform/version under test: Galaxy s7
  • Real device :
  • Appium.app|exe:

Link to Appium logs

I get error when I select Start Session with ui inspector on Appium

{
«platformName «: «Android»,
«platformVersion»: «9.0»,
«appPackage»: «com.samsung.android.phonemessage»,
«appActivity»: «com.android.phonemessage.ui.dialermessage»,
«deviceName»: «Galaxy s7»

Operating System:
<!macOS Mojave—>

Actual Behavior

Appium Logs

base-driver/lib/basedriver/driver.js:319:19)
[MJSONWP] at AppiumDriver.executeCommand (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/lib/appium.js:471:26)
[MJSONWP] at executeCommand (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:352:34)
[MJSONWP] at asyncHandler (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:489:15)
[MJSONWP] at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/layer.js:95:5)
[MJSONWP] at next (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/route.js:137:13)
[MJSONWP] at Route.dispatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/route.js:112:3)
[MJSONWP] at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/layer.js:95:5)
[MJSONWP] at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/index.js:281:22
[MJSONWP] at Function.process_params (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/index.js:335:12)
[MJSONWP] at next (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/index.js:275:10)
[MJSONWP] at logger (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/morgan/index.js:144:5)
[MJSONWP] at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/layer.js:95:5)
[MJSONWP] at trim_prefix (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/index.js:317:13)
[MJSONWP] at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/index.js:284:7
[MJSONWP] at Function.process_params (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/index.js:335:12)
[MJSONWP] at next (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/index.js:275:10)
[MJSONWP] at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/body-parser/lib/read.js:130:5
[MJSONWP] at invokeCallback (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/raw-body/index.js:224:16)
[MJSONWP] at done (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/raw-body/index.js:213:7)
[MJSONWP] at IncomingMessage.onEnd (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/raw-body/index.js:273:7)
[MJSONWP] at phonemessage.emit (events.js:182:13)
[MJSONWP] at endReadableNT (_stream_readable.js:1090:12)
[MJSONWP] at process._tickCallback (internal/process/next_tick.js:63:19)
[HTTP] <— POST /wd/hub/session 500 5 ms — 179
[HTTP]
[HTTP] —> DELETE /wd/hub/session
[HTTP] {}
[HTTP] No route found. Setting content type to ‘text/plain’
[HTTP] <— DELETE /wd/hub/session 404 1 ms — 57
[HTTP]

Code To Reproduce Issue [ Good To Have ]

My Capabilities

{
«platformName «: «Android»,
«platformVersion»: «8.0»,
«appPackage»: «com.samsung.android.phonemessage»,
«appActivity»: «com.android.phonemessage.ui.dialermessage»,
«deviceName»: «Galaxy s7»

This Appium error is sometimes misleading. Here is how I fixed this error.

Check if Path variables are present

Check if the $ANDROID_HOME and$ JAVA_HOME path variables are set. Also check if the path variables are added to the $PATH. You can add these variables by adding these lines to your ~/.bashrc file:

export ANDROID_HOME=~/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$JAVA_HOME/bin

source ~/.bashrc

Install Appium doctor

Sometimes we miss other things in our setup. The best way forward is to start appium doctor. You can install appium doctor by:

npm install appium-doctor -g
$ appium-doctor

Thats how the appium doctor check should look like:

Screenshot from 2018-04-19 23:01:12

Restart Appium in a new terminal

Yes this is required if you have made PATH changes. Appium should be restarted in a new terminal to get the path changes.

Alternatively, closing Appium, running source on ~/.bashrc and restarting Appium also works. But restarting Appium in a new terminal is always a safer option.

That’s all for this post. Hope it helps.

If you have still not solved the issue please run appium in debug mode and post the error logs here in comments:

$ appium --debug

Appium mobile testing is an open-source tool and system for automating mobile web, native, and hybrid applications on both iOS and Android platforms. It runs great on native apps – the ones that are written utilizing the iOS or Android SDKs, mobile web applications that are reached utilizing a mobile browser and hybrid apps that are using the webview and are covered within your app.

It has NO reliance on Mobile device OS. Since APPIUM has wrapper or framework that makes the translation of Selenium Webdriver commands into UIAutomator (Android) or UIAutomation (iOS) commands relying upon the type of device, no OS type.

All languages that have Selenium client libraries are supported by the Appium such as – Objective-C, Java, JavaScript with node.js, Ruby, PHP, Python, C#, and so on.

But today, we’ll try to propose the fresh look at this system. There are several diverse blogs out there that concentrate on Appium and give tips and tricks for different topics. In this blog series, we will disclose to you the possible errors one might encounter using Appium.

Let’s begin.

  • Error #1. Could not connect to Lockdownd (on iOS)

Exiting
sudochmod -R 777 /var/db/lockdown/
In case that you still face the problem then use below steps to solve the issue-
try to uninstall the ios-webkit-debug-proxy and install once more.
brew uninstall — force libimobiledeviceios-webkit-debug-proxy
brew install — HEAD libimobiledeviceios-webkit-debug-proxy
OR
brew update
brew reinstall — HEAD libimobiledevice
brew reinstall -s ios-webkit-debug-proxy

  • Error #2. Misusing XPath

Misusing XPath locators is a mutual mistake with Selenium, in spite of the fact that it’s more unfortunate error in the Appium environment.

Appium XPath is a great method to discover elements, yet it accompanies a really enormous execution cost. This is because of XML-and XPath-type questions, that are not locally given by Apple and Google – in any event in the form that we’d prefer them to be.

Also Read : How to Install Appium Server and Node on Windows through Command Line

This drives Appium to make a ton of costly calls in the engine to help to discover elements assuredly when utilizing XPath.

So, you can utilize XPath, however, there are far superior locator methods you can apply – such as the accessibility IDs.

  • Error #3. Script taking longer to Load (on iOS)

The script will be taking forever to load and launch on a real device.

Try these ways to solve the error –

If before installed, then uninstall or delete the WebDriverAgent app from your real test simulator or device.

In case that uninstalling doesn’t fix the issue, restart the mobile and attempt running your tests.

  • Error #4. The Issue during swiping down action on the iOS Device

When the configuration is done and the execution is triggered, strangely there are issues simply for the scripts in which there was a swipe down action to perform for opening the spotlight search on the phone.

There is a potential suspect for this unknown server error. This is –

driver.manage().window().getSize();
The reason behind the error was WDA. So, clean it and build it over.
1. Open the WebDriverAgent.xcodeproj in Xcode and choose WebDriverAgentRunner in the scheme prior to developing, ensure that it is signed.
2. Start the runner by running the tests.
3. In case all is fine, the screen on the device will become black and afterward revert to the application screen. The newly installed WebDriverAgentRunner. on the phone is seen.
4. The server is working while the tests run.

  • Error #5. Found Internal Error while running the Command. (on iOS)

Error: Could not initialize ios-deploy make sure it is installed (npm install -g ios-deploy) and works on your system.
You have to ensure that you have enabled turned ON the UI Automation toggle running Appium scripts for the device.
Settings > Developer > Enable UI Automation
Additionally, note that while working with native safari, make sure you begin the iOS debug proxy, also that the connection to your device is set prior to starting of the appium server either through app UI or the command line.
In the terminal, run these commands –
ios_webkit_debug_proxy -c <device udid>:27753
Start appium
Now try running your test scripts.

  • Error #6. Could not find adb. Please set the ANDROID_HOME environment variable with the Android SDK root directory path.

You apparently need to configure the SDK root directory path in system ‘Environment Variables’ under ‘Path’ column.
Error- The following desired capabilities are needed but were not provided: platformName, device Name
Add needed capabilities: platformName, device Name in APPIUM script.

  • Error #7. Error on connecting the real iOS device with Appium server

When you open an app through Appium server though get the following error –
An unknown server-side error occurred while processing the command. Original error: Unknown device or simulator UDID: ‘046e4469d6cb14ff57e378599bd4b1d09390472b’
{
“platformName”: “iOS”,
“deviceName”: “iPad”,
“automationName”: “XCUITest”,
“udid”: “046e4469d6cb14ff57e378599bd4b1d09390472b”,
“bundleId”: “com.***”,
“platformVersion”: “11.2.6”,
“app”: “/Users/***/***.ipa”
}
To solve the issue, use the below-given configuration –
{
“platformName”: “iOS”,
“platformVersion”: “10.2.1″,
“deviceName”: “——”,
“udid”: “fdbe0d55ced1fd6fa842681b6a058438573fb762″,
“app”: “/Users/—-/—/—/—.ipa”,
“automationName”: “XCUITest”
}
Depending upon app path, it will detect the app that needs to be loaded, further, you have to implement the iOS version (device OS version for the device or XCode ios simulator version for simulator/).

  • Error #8. Xcode9.1+IOS 11.1.2+APPIUM1.2.7 runtime throws exceptions,’11.1.2’does not exist in the list of simctl SDKs. (on iOS)

Run with the accessible version of the simulator.

  • Error #9. Running iOS test.

Error message – [INST STDERR] posix spawn failure; aborting launch
Your app is not assembled precisely for the device or simulator.

  • Error #10. Issue while running mobile safari test.

Error message – Could not prepare mobile safari with version ‘7.1’
You apparently have to run the authorize script newly to make the iOS SDK files writeable.

  • Error #11. Appium Java JUnit test package unzip failed (on Linux x86_64 or Mac)

You will see the following error message –
Warning
We could not open your test ZIP file. Please verify that the file is valid and try again.
You have to ensure that you can unzip the test package with no errors. In the following case, the name of the package is zip-with-dependencies.zip.
Copy your test package in your working directory. Then run the given command –
$ unzip zip-with-dependencies.zip
When you have successfully unzipped the package, you can see the operating directory tree structure by running the below-given command –
$ tree .
A valid Appium Java JUnit package must provide an output as following –
|— acme-android-appium-1.0-SNAPSHOT.jar (this is the JAR containing everything built from the ./src/main directory)
|— acme-android-appium-1.0-SNAPSHOT-tests.jar (this is the JAR containing everything built from the ./src/test directory)
|— zip-with-dependencies.zip (this .zip file contains all of the items)
`— dependency-jars  (this is the directory that contains all of your dependencies, built as JAR files)
|— com.some-dependency.bar-4.1.jar
|— com.another-dependency.thing-1.0.jar
|— joda-time-2.7.jar
`— log4j-1.2.14.jar

I’m Working in appium. previously, my code doesn’t work in above 5.o
When I changed its working fine. android version. driver = new AndroidDriver(new URL("http://192.168.1.2:4723/wd/hub"), capabilities); above code works fine in above 5.0 android version. And the app was launch and couldn’t open the app and still got the same error.

Android setup

public class AndroidSetup {

    protected AndroidDriver driver;

    protected void prepareAndroidForAppium() throws MalformedURLException {
        DesiredCapabilities capabilities = new DesiredCapabilities();
        capabilities.setCapability("appium-version", "1.6.3");
        capabilities.setCapability("platformName", "Android");
        capabilities.setCapability("platformVersion", "6.0");
        capabilities.setCapability("deviceName", "Mi Phone");
        capabilities.setCapability("app", "/home/naveen/IdeaProjects/QberLoginPage/app/Qber_Customer_V1.6.0.apk");
        capabilities.setCapability("appPackage", "com.ionicframework");
        capabilities.setCapability("appActivity", "");
        driver = new AndroidDriver(new URL("http://192.168.1.2:4723/wd/hub"), capabilities);
    }
}

Logintest

public class Logintest extends AndroidSetup {
    
    @BeforeClass
    public void setUp() throws Exception {
        prepareAndroidForAppium();
    }
    
    @AfterClass   
    public void tearDown() throws Exception {
        driver.quit();
    }

    @Test
    public void login() {
        new Login(driver).invalidLogin();
    }
}

loginpage

public class Login extends BasePage {

    public Login(WebDriver driver) {
        super(driver);
    }

    public Login invalidLogin() {
        return new Login(driver);
    }
}

Error:

Mar 21, 2017 2:02:10 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end
Mar 21, 2017 2:02:35 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Falling back to original OSS JSON Wire Protocol.
Mar 21, 2017 2:02:52 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Falling back to straight W3C remote end connection
    org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{app=/home/naveen/IdeaProjects/QberLoginPage/app/Qber_Customer_V1.6.0.apk, appPackage=com.ionicframework.qber653346, appActivity=Main Activity, appium-version=1.6.3, platformVersion=6.0, platformName=Android, deviceName=Mi Phone}], required capabilities = Capabilities [{}]
    Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
    System info: host: 'naveen-Inspiron-3542', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-66-generic', java.version: '1.8.0_121'
    Driver info: driver.version: AndroidDriver

While running Appium file I get the following error:

Unable to create a new remote session. Please check the server log for more details.

Original error: An unknown server-side error occurred while processing the command.
Original error: Error occured while starting AndroidBootstrap.
Original error: Error: Error executing adbExec.
Original error: ‘Command ‘C:UsersvsultanAppDataLocalAndroidandroid-sdkplatform-toolsadb.exe -P 5037 -s ce08171870a97e1704 push C:WindowsSystem32node_modulesappiumnode_modulesappium-android-driverbootstrapbinAppiumBootstrap.jar /data/local/tmp/’ exited with code 1′; Stderr: ‘cannot stat ‘C:WindowsSystem32node_modulesappiumnode_modulesappium-android-driverbootstrapbinAppiumBootstrap.jar’: No such file or directory’; Code: ‘1’
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’

I have set the environment variable for Android home and the path variable correctly; adb command is also working properly on my system.

I have tried re-installing the adb set again and set the environment variable. I don’t see anything getting saved under c:windowssystem32.

Понравилась статья? Поделить с друзьями:

Читайте также:

  • An unknown error occurred with your bluetooth software license
  • An unknown error occurred while saving the project premiere pro
  • An unknown error occurred while maxscript was performing garbage collection
  • An unknown error occurred while attempting to configure an interface
  • An unknown error occurred while accessing перевод

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии