Environment:
Windows 10
Python 3.7.9
Appium 1.22.3
Node v12.15.0
Android Debug Bridge version 1.0.41
Version 33.0.2-8557947
Sdkmanager 4.0.1
Appium-Python-Client==2.4.0
Problem:
Appium doesn't detect my device:
UnknownError: An unknown server-side error occurred while processing the command. Original error: Device E531XE1ZM11302266 was not in the list of connected devices
at getResponseForW3CError (C:\Users\gauth\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:804:9)
at asyncHandler (C:\Users\gauth\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:380:37)
So I run the command "adb devices" which shows correctly my device.
Is there any process to fix this kind of issue please? How could I fix that?
Appium server is initiated and then throws Java.net Timeout exception
I'm trying to setup a Xamarin UITest without any luck.
When I try to run 'all tests', I get the following error:
execute: C:\Users\Brandon\AppData\Local\Android\android-sdk\platform-tools\adb.exe devices - exit code: 1
error: could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037: Only one usage of each socket address (protocol/network address/port) is normally permitted. (10048)
List of devices attached
adb server version (39) doesn't match this client (36); killing...
could not read ok from ADB Server
* failed to start daemon *
error: cannot connect to daemon
ADB seems to be started just fine and the weird thing is that it seems to be using an adb version from another user, even though..
1) Tools > Options > Xamarin > Android is set to different path than the above-mentioned, for the Android SDK.
2) There is no system environment path variable that I can find for the above-referenced adb.exe path!
Am I missing something?
In my case it was Android Emulator version mismatch. Somehow Emulator got updated to the newer version:
After uninstalling Emulator, switching Feed to Microsoft instead of google and re-installing Emulator - error was gone and everything worked just fine.
I have installed the chrome driver - version 37.0 and source -com.android.chrome-1.apk
Started the adb command and device is connecting properly. Enable the debug mode and checked usb device option
Capabilties -
below is code snippet which i have used to call the chrome browser
capabilities.setCapability("appium-version", "1.0");
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("platformVersion", "4.3");
capabilities.setCapability("deviceName", "abc");
capabilities.setCapability("browserNamex", "Chrome");
driver = new RemoteWebDriver(new URL("http://0.0.0.0:4723/wd/hub"),capabilities);
Getting below error -
error: Chromedriver create session did not work. Status was 200 and body was {"sessionId":"e70c1dff331b9b35ce5e4b974ae3d47e","status":13,"value":{"message":"unknown error: com.android.browser is not installed on device 43001beab8cb1161\n (Driver info: chromedriver=2.10.267517,platform=Mac OS X 10.9.2 x86_64)"}}
debug: Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Did not get session redirect from Chromedriver
info: <-- POST /wd/hub/session 500
i am using appium on windows for android. try using appium 1.1.0.0 just launch server through appium. set these capabilities in Eclipse
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.BROWSER_NAME,"Chrome");
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION,"4.3");
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME,"Android");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME,"GT-I9300");
driver = new RemoteWebDriver(new URL(:1:4723/wd/hub"), capabilities);
its working for me .
thanks
Rohit Vyas
I had the same issue and found that I was running version of chrome browser which is less than 33 and this requires devices to be rooted. I update chrome browser to 40+ (I guess it was 48) and issue disappeared.
Device rooting requirement for version of chrome lower than 33 is available here -
http://appium.io/slate/en/master/?ruby#mobile-chrome-on-emulator-or-real-device
Maybe it will help someone looking for solution to this error:
error: Chromedriver create session did not work. Status was 200 and
body was
{"sessionId":"e70c1dff331b9b35ce5e4b974ae3d47e","status":13,"value":{"message":"unknown
error: com.android.browser is not installed on device
43001beab8cb1161\n (Driver info: chromedriver=2.10.267517,platform=Mac
OS X 10.9.2 x86_64)"}} debug: Cleaning up appium session error: Failed
to start an Appium session, err was: Error: Did not get session
redirect from Chromedriver
After long struggle with that, what helped me was overwriting the original chromedriver (the one that gets automatically downloaded when you run ./reset.sh --android ) in [my appium installation location]/build/chromedriver/linux with a file manually downloaded from this site.
Make sure you delete old chromedriver and name the new one the same as the deleted one.
I am using chromedriver 2.12
Based on this "unknown error: com.android.browser is not installed on device", it appears to be looking for the default browser instead of Chrome.
I notice there is a capability misspelled. It should be "browserName" instead of "browserNamex" like you have. That may be why it's not looking for the correct app package.
Replace chromedriver 2.18.343845 to 2.20.353145, you problem will sove in C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win path
I am trying to run my script on iPHONE 5 which is connected to my windows machine. I am getting below error:
ERROR: debug: Appium request initiated at /wd/hub/session
info: Configuring Safari session
ERROR: debug: Request received with params: {"desiredCapabilities":{"browserName":"Safari","device":"iPhone 5s white"}}
info: Trying to use mobile safari, version 18
info: Looking for built in app MobileSafari
ERROR: error: xcode-select threw error Error: Command failed: 'xcode-select' is not recognized as an internal or external command,
ERROR: operable program or batch file.
ERROR:
info: Got configuration error, not starting session
ERROR: error: Stderr: 'xcode-select' is not recognized as an internal or external command,
ERROR: operable program or batch file.
ERROR:
ERROR: error: Stdout:
ERROR: error: Could not prepare mobile safari with version '18': Error: xcode-select threw an error
ERROR: error: Failed to start an Appium session, err was: Error: xcode-select threw an error
info: Cleaning up appium session
info: Error: xcode-select threw an error
at D:\QM_Work\AppiumForWindows-1.0.0\AppiumForWindows\node_modules\appium\lib\helpers.js:523:10
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: xcode-select threw an error)","origValue":"xcode-select threw an error"},"sessionId":null}
POST /wd/hub/session 500 1379ms - 204b
As mentioned in the doumenations of Appium you need OSX to test iOS:
http://appium.io/slate/en/master/?ruby#toc_25
It is possible to run the tests from a windows machine but not the way you are probably thinking. You will still need a mac. Here are the requirements:
A mac on your network with Appium server running
Has Appium environment installed properly
Has the .app on the machine
If you have these three reqirements fulfilled and there is no firewall blocking network access to the mac then you can do it. You will have to actual tests on the windows machine but instead of specifying 127.0.0.1:8080 in the setup method as the IP address of Appium server you will replace it with this: yourmacsipaddress:8080 and this should execute the test properly.
Remember that you have to specify the path of the .app in the test which is running from your windows machine. But the catch is that the path has to be the path of the .app in the mac and not on your windows machine.
So the tests will run from your Windows machine but the installation of the app, the automation, and the testing will be done on the mac but you will get the "pass" or "fail" update on your Windows machine.
You cannot use Windows for iOS testing because Appium requires Instruments and some other native, OSX-only libraries to tell the phone what to do. (source)
Workarounds:
look into a mac mini hosting service, where you can run your iOS tests on a virtual machine.
buy a mac mini