3

Having problems in running Appium app for automation mobile app testing

Following tool versions I'm using Appium version: 1.2.1 Xcode: 5.1.1

Following are the steps which I’m doing,

  1. Download Appium.dmg
  2. Run dmg file and then launched appium.app file
  3. Build application for 7.1 simulator from Xcode
  4. On appium.app, enabled ‘App Path’ option and provided .app file path “/Users/umairrashid/Library/Application Support/iPhone Simulator/7.1/Applications/878133B5-7078-4E92-B3A2-607A3A3C2AC3/Recipes.app”
  5. In ‘General Settings’, Server Address: 127.0.0.1, Port: 4723
  6. Check for Updates: Enabled
  7. New Command Timeout: 7200s

When I click ‘Launch’ button then everything seems to be okay.

When I click ‘Inspector’ button then following errors displayed,

Could Not Launch Appium Inspector

Could not start a new session

Be sure the Appium server is running with an application opened by using the "App Path" parameter in Appium.app (along with package and activity for Android) or by connecting with selenium client and supplying this in the desired capabilities object.

In Appium Console, I got following error,

2014-08-21T17:57:57.789Z - info: --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"iOS","platformVersion":"7.1","newCommandTimeout":"999999","automationName":"Appium"}}

2014-08-21T17:57:57.792Z - info: <-- POST /wd/hub/session 500 3.235 ms - 286 



2014-08-21T17:57:57.772Z - debug: Request received with params: {}

2014-08-21T17:57:57.772Z - debug: Responding to client with success: {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}}}

2014-08-21T17:57:57.775Z - debug: Appium request initiated at /wd/hub/sessions

2014-08-21T17:57:57.775Z - debug: Request received with params: {}

2014-08-21T17:57:57.775Z - debug: Responding to client with success: {"status":0,"value":[]}

2014-08-21T17:57:57.789Z - debug: Appium request initiated at /wd/hub/session

2014-08-21T17:57:57.789Z - debug: Request received with params: {"desiredCapabilities":{"platformName":"iOS","platformVersion":"7.1","newCommandTimeout":"999999","automationName":"Appium"}}

2014-08-21T17:57:57.790Z - error: The following desired capabilities are required, but were not provided: deviceName

2014-08-21T17:57:57.790Z - debug: Got configuration error, not starting session

2014-08-21T17:57:57.791Z - debug: Cleaning up appium session

2014-08-21T17:57:57.791Z - error: Failed to start an Appium session, err was: Error: The following desired capabilities are required, but were not provided: deviceName

2014-08-21T17:57:57.791Z - debug: Error: The following desired capabilities are required, but were not provided: deviceName

    at Capabilities.checkValidity (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/lib/server/capabilities.js:120:13)

    at Appium.configure (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:256:35)

    at Appium.start (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:100:10)

    at Object.exports.createSession [as handle] (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:159:16)

    at next_layer (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:103:13)

    at Route.dispatch (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:107:5)

    at /Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:213:24

    at Function.proto.process_params (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:286:12)

    at next (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:207:19)

    at next (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:182:38)

2014-08-21T17:57:57.791Z - debug: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: The following desired capabilities are required, but were not provided: deviceName)","origValue":"The following desired capabilities are required, but were not provided: deviceName"},"sessionId":null}



2014-08-21T17:58:08.130Z - info: --> GET /wd/hub/status {}



—————————————————



When Launching with ‘Prelaunch Application’:Enabled, got following errors



2014-08-21T18:00:55.417Z - debug: Attempting to retry launching instruments, this is retry #3

2014-08-21T18:00:55.418Z - debug: Killall iPhoneSimulator



2014-08-21T18:01:00.420Z - info: Launching instruments



2014-08-21T18:01:00.421Z - debug: Attempting to run app on iPhone Retina (4-inch) - Simulator - iOS 7.1



2014-08-21T18:01:00.422Z - debug: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w iPhone Retina (4-inch) - Simulator - iOS 7.1 /Users/umairrashid/Library/Application Support/iPhone Simulator/7.1/Applications/878133B5-7078-4E92-B3A2-607A3A3C2AC3/Recipes.app -e UIASCRIPT /Users/umairrashid/Library/Application Support/appium/bootstrap/bootstrap-7a459bb511e03f3b.js -e UIARESULTSPATH /tmp/appium-instruments

2014-08-21T18:01:00.422Z - debug: And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd/InstrumentsShim.dylib","LIB_PATH":"/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd"}

2014-08-21T18:01:00.422Z - debug: And launch timeouts (in ms): {"global":90000}



2014-08-21T18:01:01.415Z - debug: [INST STDERR] Instruments Usage Error : Could not remove existing output document 'file:///Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/instrumentscli0.trace': Error Domain=NSCocoaErrorDomain Code=642 "You can’t save the file “instrumentscli0.trace” because the volume “Appium” is read only." UserInfo=0x7fac5e2d6100 {NSFilePath=/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/instrumentscli0.trace, NSUnderlyingError=0x7fac5d92d760 "The operation couldn’t be completed. Read-only file system"}.





2014-08-21T18:01:01.483Z - debug: [INSTSERVER] Instruments exited with code 254



2014-08-21T18:01:01.483Z - debug: Killall instruments



2014-08-21T18:01:01.486Z - debug: Instruments crashed on startup

Here I'm expecting that when I click Inspect button from Appium then Simulator is launched and I can see XPaths etc in that view.

r0-
  • 2,388
  • 1
  • 24
  • 29
OsamaA
  • 451
  • 1
  • 8
  • 13
  • Your error message indicates you're missing the 'devicename' desired capability. – bcar Aug 22 '14 at 02:59
  • Thanks staaar. Issue resolved by placing appium.app in 'Application' folder of Mac and by providing 'devicename' in desired capability. – OsamaA Aug 22 '14 at 12:51

2 Answers2

0
  1. Are you sure you have the icon of apple selected(Sometimes we do silly misclicks)

  2. If you have have "force device" checked please uncheck it.

If you still have problems it would be better for you to take screenshots of your appium gui and post it here so I can help in a more through way

SthQA
  • 389
  • 2
  • 6
  • Can you please let me know the issue ? http://stackoverflow.com/questions/26003675/appium-not-able-to-launch-the%E2%80%8C%E2%80%8B-inspector%20– – Ramesh Sangili Sep 23 '14 at 21:48
0

Are you sure that you have installed Appium by dragging Appium.app to your apps folder?

The below error message suggests that you are just launching it from the DMG file.

Instruments Usage Error : Could not remove existing output document 'file:///Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/instrumentscli0.trace'
Jamie Edge
  • 121
  • 1
  • 6
  • Thanks edgy. Issue is resolved by dragging the Appium.app into Applications folder. – OsamaA Aug 25 '14 at 08:23
  • I am also having the same issue.. Can you please take a look? http://stackoverflow.com/questions/26003675/appium-not-able-to-launch-the%E2%80%8C%E2%80%8B-inspector%20– – Ramesh Sangili Sep 23 '14 at 21:49