Knight Kolas
Knight Kolas

Reputation: 88

Appium will not start

I changed my configuration to try and run two appium sessions at a time, that way I could inspect and also run automation on a parallel port. Somehow, I broke the avd startup on the appium inspector. I have tried to revert everything back, killall sessions, stop all command line instances of appium, but the problem persists.

full error message:

error: Failed to start an Appium session, err was: Error: You must pass in either the 'app' or 'browserName' cap

info: [debug] Error: You must pass in either the 'app' or 'browserName' cap at e (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/capabilities.js:171:34) at [object Object].Capabilities.checkStrictValidity (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/capabilities.js:188:12) at [object Object].Capabilities.checkValidity (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/capabilities.js:140:10) at [object Object].Appium.configure (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:238:35) at [object Object]. (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:118:10) at [object Object].Appium.start (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:129:5) at exports.createSession (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:188:16) at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:110:13) at Route.dispatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:91:3) at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5) at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:267:22 at Function.proto.process_params (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:321:12) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:261:10) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:100:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:39:7 at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:110:13) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:10 4:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:104:14) at Route.dispatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:91:3) at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5) at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:267:22 at Function.proto.process_params (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:321:12) at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:261:10) at methodOverride (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/method-override/index.js:79:5) at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/layer.js:82:5) at trim_prefix (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:302:13) at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:270:7 info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: You must pass in either the 'app' or 'browserName' cap)","origValue":"You must pass in either the 'app' or 'browserName' cap"},"sessionId":null} info: <-- POST /wd/hub/session 500 5.350 ms - 230

info: --> GET /wd/hub/status {}

info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"}}} info: <-- GET /wd/hub/status 200 0.664 ms - 105 {"status":0,"value":{"build":{"version":"1.4.13","revision":"c75d8adcb66a75818a542fe1891a34260c21f76a"}}}

screeshot of alert: enter image description here

settings:

enter image description here

enter image description here

enter image description here

Please let me know if more information is required. Thank you.

Upvotes: 0

Views: 272

Answers (3)

Suban Dhyako
Suban Dhyako

Reputation: 2526

Update your appium desktop to the latest version. Currently i am using 1.8.1 version.

Steps:

  1. Start appium Desktop
  2. Click on Advance tab
  3. Enter server address=127.0.0.1, port=4723, check Allow Session Override checkbox
  4. Click Start Server button. It will start appium server
  5. Click on eye glass icon in top right corner of appium desktop app. A new window will appear.
  6. In appear window, you will see desired capabilities menu. You need to insert following parameters.

    • deviceName
    • platformName
    • appPackage
    • appActivity

Appium desktop desired capabilites

  1. Click on Start Session button

Make sure your device to is connected to your computer and usb debugging is enable in your device.

Upvotes: 0

Vaibhav K
Vaibhav K

Reputation: 45

app package and activity name missing . Need to add package and activity name into desiredcapabilities

Upvotes: 0

Naman
Naman

Reputation: 32036

Please check(tick) the following options :

Android Settings -> Basic -> Package [possible cause of failure]
Android Settings -> Advanced -> SDK 

By the way this would be just in case you want to run your application using the UI capabilities(maybe using Appium inspector standalone), otherwise if you are using some client to setup the capabilities it would be great to see the code for your setup to suggest any required changes.

Upvotes: 0

Related Questions