1

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.

enter image description here

I am running the desktop version of Appium Server and have set "Allow CORS" to true from the advanced menu.

enter image description here

The android emulator is running and I have inputted the correct value for udid as shown when entering "adb devices" command in the cmd:

enter image description here

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.

minTwin
  • 1,181
  • 2
  • 21
  • 35

2 Answers2

1

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

paul
  • 4,333
  • 16
  • 71
  • 144
0

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.

kenneth
  • 478
  • 4
  • 11
  • It is still not connecting – paul Feb 27 '22 at 13:57
  • @paul try to downgrade to Appium v1.21.0, they have overhauled some things in the newest Appium with regard to drivers. I have not yet dived into this, v1.21.0 might work simplistic in this case. – kenneth Mar 01 '22 at 12:01