Reputation: 1395
When attempting to "Start Session" in Appium Inspector, the following error is displayed:
Error
Could not connect to server; are you sure it's running? If you are using the browser version, also ensure your Appium server has been started with --allow-cors.
I am running the desktop version of Appium Server and have set "Allow CORS" to true from the advanced menu.
The android emulator is running and I have inputted the correct value for udid as shown when entering "adb devices" command in the cmd:
Any ideas on how to fix this so that the Appium Inspector works correctly? It seems that Appium Inspector used to be built into the Appium Server application, but is now a separate app.
Upvotes: 2
Views: 12010
Reputation: 4487
Finally, it worked for me.
I followed the discussion here https://github.com/appium/appium-desktop/issues/1927
I entered 127.0.0.1
as a remote host instead of 0.0.0.0
and it got connected
Upvotes: 1
Reputation: 728
A start to help you out with your problem is to fix your Capabilities. Please remove all appium: keywords from your capabilities and have them like this:
appPackage: com....
appActivity: com...
platformName: Android
platformVersion: xx
deviceName: emulator-5554
Also, remove the udid Capability as this is actually the deviceName. Everytime you see UDID, you must always think of a 40-digit lowercase hex code or a 25-digit uppercase hex code. At least, not a String.
Upvotes: 0