Error starting appium server

Make sure users get bug-free and consistent experience

Troubleshooting Appium

Last modified on Fri 20 Jan 2023

Right or wrong, it’s very pleasant to break something from time to time. — Fyodor Dostoevsky

Installing Appium

You just installed Appium (Server or Desktop) and you try to run it but nothing happens. Before you ask Google for help, run appium-doctor and make sure the necessary dependencies are ok.

Appium doctor

troubleshooting_appium_appium_doctor.png

Possible fixes:

  • Node.js might need an update.
  • Make sure you have Android SDK Platform-Tools package installed.
  • Make sure to install Xcode and Xcode Command Line Tools.
  • Set ANDROID_HOME and JAVA_HOME paths.

NOTE:

Appium Server and Appium Desktop are installed in two different places.

Appium Server:

/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent

Appium Desktop:

/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent

Errors

Errno 61 Connection refused

urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=4723): 
Max retries exceeded with url: /wd/hub/session (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x10a4adca0>: 
Failed to establish a new connection: [Errno 61] Connection refused'))

It may simply be that you did not start the server. Start the server and the error should be gone. :)

Could not proxy command

selenium.common.exceptions.WebDriverException: 
Message: An unknown server-side error occurred while processing the command. Original error: 
Could not proxy command to the remote server. Original error: socket hang up

This error often happens when the device is disconnected. Check the developer options and make sure that the device does not lose the connection because of screen lock, screen saver, etc.

If this error happens while you are using Android, check if the SDK is up-to-date.

After you have checked the developer options and made sure the SDK is up-to-date, try restarting Appium. If the issue persists, try killing the Appium process.

  1. Open Terminal
  2. Run command: lsof -Pn -i4
    • Lists all active processes
  3. Run command: kill -9 <processNumber>
    • Kills the specific Appium process,
    • Or run killall node to kill all instances of node.js
  4. Start Appium Server again

Unable to instantiate AppiumDriver

Happens sometimes if you had multiple Appium instances running. Maybe you had both Appium Server and Appium Desktop, or multiple Appium Inspectors running and some processes were not closed properly. Try to kill all those processes and restart Appium.

  1. Open Terminal
  2. Run command: killall node
    • Kills all instances of node.js
  3. Start Appium Server again

Error 65 / Unable to launch the test runner

[WebDriverAgent] xcodebuild exited with code '65' and signal 'null'

WebDriverAgentRunner-Runner.app encountered an error (Failed to install or launch the test runner. 
If you believe this error represents a bug, please attach the result bundle at /Users/user/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu/Logs/Test/Test-WebDriverAgentRunner-2021.12.13_10-50-28-+0100.xcresult. 
(Underlying Error: Unable to launch com.user.WebDriverAgentRunner.xctrunner. 
(Underlying Error: Request to launch com.user.WebDriverAgentRunner.xctrunner failed. The operation couldn’t be completed. 
Unable to launch com.user.WebDriverAgentRunner.xctrunner 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.user.WebDriverAgentRunner.xctrunner'. 
(Underlying Error: The operation couldn’t be completed. Unable to launch com.user.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.))))

Could happen if:

  • The developer is not trusted on the device.
  • WebDriverAgentRunner in the Xcode is not set up correctly.
  • The Appium version and the iOS version are not compatible.

Fix:

  1. Open WebDriverAgent.xcodeproj.
  2. Select WebDriverAgentRunner -> device_serial_number in the toolbar.
  3. Select Product -> Run or Product -> Test to install WebDriverAgentRunner to the selected device.
  4. Trust the device in the options.

If the issues persist, check that you have correctly set up the Xcode configuration.

SplashActivity never started

Original error: 
'com.infinum.app.ui.splash.SplashActivity' or 'com.infinum.app.repro.mock.com.infinum.app.ui.splash.SplashActivity' never started. 
Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting

DriverConfigurationError: Could not instantiate new WebDriver instance of type class io.appium.java_client.AppiumDriver 
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: Cannot start the 'com.infinum.app.staging' application. 

Test execution never starts

If the issue happens on start, you need to add one of the following capabilities:

  • appWaitActivity

  • appActivity

For example:

"appium:appActivity": "com.infinum.app.ui.project.ProjectActivity"

Read app activities for more information.

Test execution stops during test run

Another reason could be that the app opens a webview, or other screen outside the app, which stays open even after the test is done. When the following test starts, the execution could end with the SplashActivity error.

To fix the issue, rearrange the steps in your test and/or add a step that navigates back to the app or closes the screen before the test is done.

For example, step to navigate back to the app:

WebDriverAgent keeps getting deleted when opening Appium Inspector

There could be various problems occurring. Some might be related to faulty WebDriverAgent configuration. But it also could be there are still some Appium processes running or that simply there is another Appium Inspector screen already open. That will cause Appium to delete the WDA, which usually only happens on iOS.

IOException

java.io.IOException: Cannot run program "ideviceinstaller": error=2, No such file or directory

Fix by installing ideviceinstaller manually:

  1. Open Terminal
  2. Run command: brew install ideviceinstaller

Additional resources

Troubleshooting Appium

Selenium/Appium Troubleshooting

If your execution has not started and is still showing the Queued Status, please check the below guide for more details:
How to fix permanently ‘Queued’ executions for Local executions in my Testsigma Account?

Otherwise, if your execution failed or did not execute and gave an error message, please check the below list to see if the error is listed here. If not, please contact Support.

1.  java.net.ConnectException: Connection refused

Complete Error message:

Exception in initiating a browser session in path: java.net.ConnectException: Connection refused (Connection refused)

Solution:

This is mostly caused when there is a connection issue between the Appium Server and Testsigma. Please perform the following steps:

  1. Confirm that you have started the Appium Server on the local machine using Command line or Appium Desktop App. A running Appium-server is needed for Android/iOS Hybrid Executions.
  2. If the Appium server is indeed started, next check if the Appium listener IP:Port is the same as the Appium URL in the Execution Configuration.

Note: If it still doesn’t work, please contact Testsigma Support on Instant Chat or mail to support@testsigma.com and provide the Appium logs.


2. Unable to start WebDriverAgent session because of xcodebuild failure

Complete Error message:

[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.

Solution:

This is most probably a temporary issue. Please perform the following steps:

  1. Uninstall WebDriverAgentRunner app on iOS device if already installed.
  2. Reboot the iOS device and the Mac PC.
  3. Try again.

Note: If it still doesn’t work, please contact Testsigma Support on Instant Chat or mail to support@testsigma.com and provide the Appium logs.


3. Cannot start the <app_package_name> application. Original error: Error executing adbExec.

Complete Error message:

Exception in initiating a browser session in path:, An unknown server-side error occurred while processing the command. Original error: Cannot start the ‘com.jillstuart.beauty.app.stg’ application. Original error: Error executing adbExec. Original error: ‘Command ‘C:\Users\huy.nvt\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 3100dc566118a2a5 shell am start -W -n com.jillstuart.beauty.app.stg/com.jillstuart.beauty.app.activity.MainActivity -S’ exited with code 1′; Stderr: ‘java.lang.SecurityException: Permission Denial: starting Intent { flg=0x10000000 cmp=com.jillstuart.beauty.app.stg/com.jillstuart.beauty.app.activity.MainActivity launchParam=MultiScreenLaunchParams { mDisplayId=0 mBaseDisplayId=0 mFlags=0 } } from null (pid=30564, uid=2000) not exported from uid 10717

Reason for Error:

The permission to start <activity_name> activity has been denied. Make sure activity/package names are correct.The package name or activity name is not correct

OR
A user doesn’t have permission to start the Activity due to missing permissions in the manifest.Double check the Activity and package name or try another activity name.

Solution:

  • Double check the Application Package Name and Activity Name for spelling mistakes.
  • Make sure the user has permission set in the manifest to start the Activity or use another activity that has the permission. Usually, the Splash or Main Activity will be permitted to start from. Please check the following article — Permission to start activity denied while launching the app

Note: If it still doesn’t work, please contact Testsigma Support on Instant Chat or mail to support@testsigma.com and provide the Appium logs.


4. Unrecognized SSL message, plaintext connection?

Complete Error message: 

Exception in initiating a browser session in path:, javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

Solution:

Please check the Appium URL given in Execution Configuration(Create Run) page and make sure it starts with http and not https.

i.e the Appium URL should be similar to http://0.0.0.0:4723/wd/hub ( Not https://0.0.0.0:4723/wd/hub)

Note: If that’s not the case, please try again or contact Testsigma Support on Instant Chat or mail to support@testsigma.com and provide the Appium logs.

Here’s what to do if you’re experiencing problems, before you submit a ticket
to github or write to the appium-discuss discussion group.

General

  • Make sure you’ve followed the getting started steps in the README
  • Make sure your system is set up appropriately (i.e., XCode is updated,
    Android SDK is installed and ANDROID_HOME is set.
  • Make sure the paths to your applications are correct
  • On windows run appium.app as administrator or when running from source you need to run cmd as administrator.
  • When installing on Mac, make sure the user has write permissions for /usr/local/lib or install Appium with the command npm install -g appium --unsafe-perm=true --allow-root

If you’re running Appium.app

  • Update the app and restart. If you get a message saying the app can’t be updated,
    re-download it from appium.io.

If you’re running Appium from source

  • git pull to make sure you’re running the latest code
  • Remove old dependencies: rm -rf node_modules
  • Re-install dependencies: npm install
  • Re-transpile the code: gulp transpile

  • You can also use Appium Doctor to determine whether your system is configured correctly for Appium.

  • If you get this error after upgrading to Android SDK 22:
    {ANDROID_HOME}/tools/ant/uibuild.xml:155: SDK does not have any Build Tools installed.
    In the Android SDK 22, the platform and build tools are split up into their
    own items in the SDK manager. Make sure you install the build-tools and platform-tools.

Android

  • Make sure the Android emulator is up and running.
  • It’s sometimes useful to run adb kill-server && adb devices. This can
    reset the connection to the Android device.
  • If you’re running the Android emulator using Fastboot and the emulator isn’t being detected by adb, try doing a cold boot: Android Studio > Tools > AVD Manager > Actions > Cold Boot Now
  • Make sure you set ANDROID_HOME pointing to the Android SDK directory
  • After setting power state to off (e.g.: driver.setPowerAC(PowerACState.OFF);) you must create a new session.
  • When using -wipe-data in avdArgs the noReset capability will be ignored if set to true.

Android Espresso

  • Appium is supposed to disable animations by default, but if it doesn’t work try following the Espresso setup instructions which advises that «To avoid flakiness, we highly recommend that you turn off system animations on the virtual or physical devices used for testing. On your device, under Settings > Developer options, disable the following 3 settings: Window animation scale, Transition animation scale, Animator Duration scale»

Windows

  • Make sure developer mode is on
  • Make sure command prompt is Admin
  • Check that the URL Appium server is listening to matches the one specified in test script

IOS

  • Make sure Instruments.app is not open
  • If you’re running the simulator, make sure your actual device is not
    plugged in
  • Make sure the accessibility helper is turned off in your Settings app
  • Make sure the app is compiled for the version of the simulator that’s being
    run
  • Make sure the app is compiled for the simulator (or real device) as
    appropriate (e.g., in debug mode for the simulator), or you might get
    a posix spawn error.
  • If you’ve ever run Appium with sudo, you might need to sudo rm
    /tmp/instruments_sock
    and try again as not-sudo.
  • If this is the first time you’ve run Appium, make sure to authorize the use
    of Instruments. See the UIAutomation Driver doc.
  • If Instruments is crashing when running against a physical device («exited with code 253»), ensure Xcode has downloaded device symbols. Go to Window -> Devices, and it should start automatically. This is needed after iOS version upgrades.
  • If you see iOS Simulator failed to install the application. and the
    paths are correct, try restarting the computer.
  • Make sure your macOS keychain that holds the certificate(s) needed for building your app and the WebDriverAgent is unlocked. Especialy if you are using ssh. General symptom to look for is codesign failure.
  • If you have custom elements in your app, they will not be automatable by
    UIAutomation (and therefore Appium) by default. You need to set the
    accessibility status to ‘enabled’ on them. The way to do this in code is:

center
[myCustomView setAccessibilityEnabled:YES];

  • Tests on iOS may exhibit symptoms similar to a memory leak including sluggish
    performance or hangs. If you experience this problem, it’s likely due to a
    known issue with NSLog. One option is to remove NSLog from your code.
    However, there are several more nuanced approaches that may also help without
    requiring that you refactor.

### Workaround 1
NSLog is a macro and can be redefined. E.g.,
«`objectivec
// You’ll need to define TEST or TEST2 and then recompile.

#ifdef TEST
#define NSLog(…) _BlackHoleTestLogger(VA_ARGS);
#endif // TEST
#ifdef TEST2
#define NSLog(…) _StdoutTestLogger(VA_ARGS);
#endif // TEST2

void _BlackHoleTestLogger(NSString *format, …) {
//
}

void _StdoutTestLogger(NSString *format, …) {
va_list argumentList;
va_start(argumentList, format);
NSMutableString * message = [[NSMutableString alloc] initWithFormat:format
arguments:argumentList];

  printf(message);

  va_end(argumentList);
  [message release];

}
«`

### Workaround 2
Manually replace the underlying function that NSLog wraps. This method was recommended by
Apple in a similar context.

«`objectivec
extern void _NSSetLogCStringFunction(void()(const char , unsigned, BOOL));

static void _GarbageFreeLogCString(const char *message, unsigned length, BOOL withSyslogBanner) {
fprintf(stderr, «%sn», message);
}

int main (int argc, const char argv[]) {
NSAutoreleasePool
pool = [[NSAutoreleasePool alloc] init];
int exitCode;

 setbuf(stderr, NULL);

 _NSSetLogCStringFunction(_GarbageFreeLogCString);
 exitCode = WOApplicationMain(@"Application", argc, argv);
 [pool release];
 return exitCode;

}
«`

Webview/Hybrid/Safari app support

  • Make Sure you enable the ‘Web Inspector’ on the real device.
  • Make Sure you enable the Safari — Advance Preferences- Developer menu for
    simulators.
  • Make sure you are properly switching contexts using the context appium commands provided by your client library.
  • If you getting this error: select_port() failed, when trying to open the
    proxy, see this discussion
  • In a Safari session, if the logs indicate that the initial url cannot be entered, make sure that
    you have the software keyboard enabled. See this discussion.

Once you’ve tried the above steps and your issue still isn’t resolved,
here’s what you can do:

If you’re having trouble getting Appium working and the error messages Appium
provides are not clear, join the discussion group
and send a message. Please include the following:

  • How you’re running Appium (Appium.app, npm, source)
  • What operating system you are using
  • What device and version you are testing against (i.e. Android 4.4, or iOS 7.1)
  • Whether you are running against a real device or a simulator/emulator
  • The client-side and server-side errors you’re getting (i.e.,
    «In Python this is the exception I get in my test script,
    and here’s a link to a paste of the Appium server output)
  • Per above, it’s very important to include a paste of the Appium server
    output when it’s run in verbose mode so that we can diagnose what’s going on.

If you’ve found what you believe is a bug, go straight to the issue tracker
and submit an issue describing the bug and a repro case.

Known Issues

  • If you’ve installed Node from the Node website, it requires that you use sudo
    for npm. This is not ideal. Try to get node with nvm,
    n or brew install node instead!
  • Webview support works on real iOS devices with a proxy, see discussion.
  • Sometimes iOS UI elements become invalidated milliseconds after they are
    found. This results in an error that looks like (null) cannot be tapped.
    Sometimes the only solution is to put the finding-and-clicking code in a retry
    block.
  • Appium may have difficulties finding the node executable if you’ve
    installed Node and npm via MacPorts. You must make sure that the MacPorts bin
    folder (/opt/local/bin by default) is added to PATH somewhere in your
    ~/.profile, ~/.bash_profile or ~/.bashrc.

Specific Errors

Action Error Resolution
Running ios test [INST STDERR] posix spawn failure; aborting launch Your app is not compiled correctly for the simulator or device.
Running mobile safari test error: Could not prepare mobile safari with version '7.1' You probably need to run the authorize script again to make the iOS SDK files writeable. See the UIAutomation Driver

Appium is an automated testing tool for the mobile terminal, similar to selenium, which can drive Android, iOS, and other devices to complete automated testing, such as simulating click, slide, input, and other operations. Its official website is http://appium.io/. In this article, we’ll talk about how to install and use Appium.

1. Install Appium With Installer Directly.

  1. Download the Appium desktop installation package directly.
  2. Appium desktop supports full platform ( macOS, Linux, Windows) installation. We can install it directly from Appium GitHub releases download link.

2. Install  Appium With Node.js Package Installation.

  1. You can also install Appium with the Node.js package installation like below source code.
  2. First, you should install Node.js on your OS. On macOS, you can run the command $ brew install node in a terminal to install it.
  3. After installing Node.js on your OS, you can run the command node in the terminal to enter node interactive console.
    $ node
    Welcome to Node.js v14.16.0.
    Type ".help" for more information.
    >

  4. Input the command .exit to quit the Node.js REPL terminal.
    > .exit
    $
  5. Run the command $ node -v to show the installed Node.js version.
    $ node -v
    v14.16.0
  6. Run the command $ node -h to list Node.js help text.
  7. Now use the $ sudo npm install -g appium command to install Appium globally like below. If you do not add the -g parameter, it will install Appium under the current directory.  You can also first run the command su to change to the root user, then run the command npm install -g appium to install Appium.
    $ sudo npm install -g appium
  8. If you want to verify all the dependencies required by the Appium has been installed, you can install the appium-doctor with the command sudo npm install -g appium-doctor.
    $ sudo npm install -g appium-doctor

3. How To Fix The Error installing Chromedriver: EACCES: permission denied When Install Appium.

  1. When running the command $ sudo npm install -g appium, it may display an error message like below.
    Error installing Chromedriver: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/202124-5257-sg7cjb.mb3y'
    [14:06:56] Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/202124-5257-sg7cjb.mb3y'
    [14:06:56] Downloading Chromedriver can be skipped by using the '--chromedriver-skip-install' flag or setting the 'APPIUM_SKIP_CHROMEDRIVER_INSTALL' environment variable.
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] postinstall: `node install-npm.js`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the [email protected] postinstall script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/songzhao/.npm/_logs/2021-03-04T06_06_59_615Z-debug.log
    
  2. From the above error message Error: EACCES: permission denied, mkdir, we should go to the folder /usr/local/lib/node_modules/ and see that the user wheel does not have write permission, so it can not create the appium folder in it.
    $ ls -l /usr/local/lib/
    total 1912
    ......
    drwxr-xr-x  3 root      wheel      96 Mar  4 14:06 node_modules
    ......
  3. To fix this issue, you can run the command sudo npm install -g appium –unsafe-perm=true –allow-root to install it which will pass the safety error.
    $ sudo npm install -g appium --unsafe-perm=true --allow-root
    /usr/local/bin/appium -> /usr/local/lib/node_modules/appium/build/lib/main.js
    
    > [email protected] install /usr/local/lib/node_modules/appium/node_modules/appium-windows-driver
    > node install-npm.js
    
    Not installing WinAppDriver since did not detect a Windows system
    
    > [email protected] postinstall /usr/local/lib/node_modules/appium/node_modules/core-js
    > node -e "try{require('./postinstall')}catch(e){}"
    
    Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
    
    The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
    > https://opencollective.com/core-js 
    > https://www.patreon.com/zloirock 
    
    Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
    
    
    > [email protected] postinstall /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver
    > node install-npm.js
    
    [14:25:06] [Chromedriver Install] Installing Chromedriver version '86.0.4240.22' for platform 'mac' and architecture '64'
    [14:25:06] [Chromedriver Install] Opening temp file to write 'chromedriver_mac64' to...
    [14:25:06] [Chromedriver Install] Opened temp file '/tmp/202124-5397-19lh4at.a3a5/chromedriver_mac64.zip'
    [14:25:06] [Chromedriver Install] Downloading https://chromedriver.storage.googleapis.com/86.0.4240.22/chromedriver_mac64.zip to '/tmp/202124-5397-19lh4at.a3a5/chromedriver_mac64.zip'
    dbug Support https://chromedriver.storage.googleapis.com/86.0.4240.22/chromedriver_mac64.zip (7.44 MB) has been downloaded to '/tmp/202124-5397-19lh4at.a3a5/chromedriver_mac64.zip' in 2.687s
    dbug Support Approximate download speed: 2.77 MB/s
    [14:25:09] [Chromedriver Install] Extracting /tmp/202124-5397-19lh4at.a3a5/chromedriver_mac64.zip to /tmp/202124-5397-19lh4at.a3a5/chromedriver_mac64
    [14:25:09] [Chromedriver Install] Creating /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac...
    [14:25:09] [Chromedriver Install] Copying unzipped binary, reading from /tmp/202124-5397-19lh4at.a3a5/chromedriver_mac64/chromedriver...
    [14:25:09] [Chromedriver Install] Writing to /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver...
    [14:25:09] [Chromedriver Install] /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver successfully put in place
    + [email protected]
    added 769 packages from 627 contributors in 25.232s

  4. This is because you add -g option, this option will install Appium globally, when you use npm to install packages globally, it will throw EACCES: permission denied error.

4. How To Start Appium.

  1. Run the command appium to start the Appium in the macOS console.
    $ appium
    [Appium] Welcome to Appium v1.20.2
    [Appium] Appium REST http interface listener started on 0.0.0.0:4723

7 ответов

Запустите диспетчер задач Windows, нажав Ctrl + alt + Del. На вкладке «Процессы» node.exe процесс » node.exe «. Попробуйте снова запустить сервер Appium

zishan paya
03 июнь 2015, в 05:49

Поделиться

Если вы не найдете «node.exe» в диспетчере задач (что произошло со мной), вы можете попробовать следующее:

  1. Остановите «Appium Server»

  2. На сервере Appium щелкните значок «Настройки» и измените «порт» на что-то еще, скажем, 4725

  3. В вашем коде, где вы вызывали «AndroidDriver», измените порт на значение, которое вы обновили выше:

(AndroidDriver driver = новый AndroidDriver (новый URL (» http://127.0.0.1:4725/wd/hub «), cap);)

  1. Запустите Appium Server еще раз.

Santosh Pillai
12 июль 2016, в 08:51

Поделиться

appium -a 127.0.0.1 -p 4723

Здесь номер порта 4723. Если сервер подключен к одному порту, вы можете попробовать инициализировать сервер на другом порту.

Используйте команду

appium -a 127.0.0.1 -p (4724 или 4725 или любой номер порта). Это будет работать

anurag pattanayak
29 янв. 2019, в 05:24

Поделиться

Перейдите в настройку приложения Appium (Android) на любой номер порта и снова запустите сервер. после перезапуска сервера снова переключится на исходный порт.

Sakthi
24 июнь 2016, в 12:37

Поделиться

Запустите диспетчер задач Windows, удерживая клавиши Ctrl + Alt + Del вместе. Убейте процесс adb.exe. Закройте appium и снова подключите свое мобильное устройство, затем запустите appium.

Я также столкнулся с этой проблемой, и я решил ее решить с помощью этих шагов.

user6082016
18 март 2016, в 08:17

Поделиться

Я пытался убить процесс, как указано выше node.js Я не нашел running.js. Одно из решений, которое я хотел бы поделиться, которое сработало для меня, — это… попытаться установить разные номера портов в настройке appium: 4725 по умолчанию там меняет его на 4726… Он будет работать в следующий раз, если вы столкнетесь с тем же вопросом назад к ранее 4725.

Nitin
18 янв. 2016, в 02:00

Поделиться

Остановите текущий запущенный сервер приложений и запустите его снова.

Shasak Singh Sengar
04 авг. 2015, в 07:50

Поделиться

Ещё вопросы

  • 0Все переключается на стиль переключения
  • 0Как пройти цикл в JavaScript
  • 1Android: высвобождение ресурсов в onDestroy (); метод
  • 1Как запустить файл MATLAB (файл .m) из Java?
  • 0Переадресация .htaccess в index.html и index.php не работают вместе
  • 0setTimeout срабатывает слишком быстро
  • 1Время, прошедшее с момента отключения питания от сети
  • 0Ионная функция запуска приложения при втором нажатии
  • 1Удалить только окружающие одинарные кавычки?
  • 1Как приложение Android может инициировать соединение Bluetooth HFP и A2DP с гарнитурой Bluetooth?
  • 1Зеркальное отображение пользовательских элементов управления в C #
  • 1Печать всех вхождений сопоставленных данных из 2 кадров данных в пандах
  • 0SQL объединяет два оператора (CROSS JOIN)
  • 1Хранение пользовательских данных в MSI
  • 0setTimeout и clearTimeout на альтернативных кликах
  • 1Должны ли мы хранить символы / специальные символы в файле StringConstants?
  • 0Проблема совместимости браузера для HTML-файла с Internet Explorer
  • 0ASP логин не отправляется
  • 0Переподключение клиента C ++ к серверу C # через NamedPipe
  • 1Log4j отлично работает на localhost, но в jenkins все операторы журнала печатаются в одной строке
  • 0Как только сдвинуть часть страницы с помощью меню?
  • 0Проблема с угловым материалом
  • 0Транспортир не работает с Firefox 40.0.2
  • 0JQuery / JavaScript исчезают в каждом элементе?
  • 0У меня проблемы с помощником HTML, почему он не работает?
  • 1повторить элементы галереи
  • 1Сдвиг рядов в панде df
  • 0slideUp-slideDown не работает должным образом
  • 0Как вызвать разные шаблоны директив, основанные на разных видах объектов в коллекции?
  • 0Как я могу взять эти табличные данные и правильно сгруппировать поля?
  • 1список с переменной высотой
  • 0«Место чтения нарушения доступа 0xcdcdcdfd» при сериализации
  • 1Регулярное выражение для не повторяющихся специальных символов (C #)
  • 1Android эмулятор не запускается при использовании масштаба (Win7 x64)
  • 1Откройте две Windows одновременно — JavaFX
  • 1Используйте один метод для возврата данных с разными типами
  • 1vcalendar vs icalendar
  • 1Как сделать эту функцию с помощью apply
  • 1Разделение строки Юникода в общем списке
  • 2Ошибка 5xx или 4xx с отсутствующим заголовком «Access-Control-Allow-Origin»
  • 1Как выйти из внешнего цикла из внутреннего оператора if
  • 0C ++ Статический массив
  • 0генератор экспоненциальных чисел c ++, иногда возвращает inf
  • 0В одном запросе MySQL я могу вернуть массив строк из поля с массивом первичных ключей
  • 0Использование jQuery для определения индекса ссылки на основе текста ссылки
  • 1WCF, структура сущности и олицетворение
  • 0Uncaught SyntaxError: Неожиданный токен var в javascript?
  • 0c ++ возвращает одно значение из связанного списка
  • 0_mysql_exceptions.OperationalError
  • 0доступ к многомерному массиву в c

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

Понравилась статья? Поделить с друзьями:
  • Error start tag body seen but an element of the same type was already open
  • Error start stop system
  • Error standard matlab
  • Error stack traces are turned on
  • Error stack trace python