how to specify deviceName in appium.app

5,796 views
Skip to first unread message

Kamesh Velu

unread,
May 7, 2014, 5:34:20 PM5/7/14
to appium-...@googlegroups.com
I am trying to launch my app through appium.app (GUI), It thrown the below error message. Wondering how i can set 'deviceName' capability in appium.app.

Current settings iOS i have are
BundleID, Force Device: iPhone, No Reset, 

General Settings
Server IP: 127.0.0.1, port: 4925, Check for Updates, prelaunch Application, New command timeout: 7,200s, use colors, 

info: Starting Appium in pre-launch mode

info: Pre-launching app

info: Got configuration error, not starting session

info: Cleaning up appium session

error: Could not determine your device from Appium arguments or desired capabilities. Please make sure to specify the 'deviceName' capability

Kamesh Velu

unread,
May 7, 2014, 5:50:08 PM5/7/14
to appium-...@googlegroups.com
After many tries i found i have to do this for appium.app to run (looks like a bug to be fixed)


uncheck all options in iOS settings
Enable developer options
enable custom server flags

--platform-name ios --app <bundle id> -U auto --no-reset
Message has been deleted

Jonathan Lipps

unread,
May 8, 2014, 9:02:30 AM5/8/14
to Kamesh Velu, appium-...@googlegroups.com
Dan, are you setting up the deviceName cap correctly in appium.app?

--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss.
For more options, visit https://groups.google.com/d/optout.

Christopher Graham

unread,
May 8, 2014, 9:21:07 AM5/8/14
to appium-...@googlegroups.com, Kamesh Velu
In the Appium.app UI for iOS Settings you can choose any option from the Force Device listbox, such as iPhone Retina (4-inch), and if you have Prelaunch enabled it always throws "error: Could not determine your device from Appium arguments or desired capabilities. Please make sure to specify the 'deviceName' capability"   

However, you can uncheck Prelaunch and have your script successfully call desired_caps['deviceName'] = 'iPhone Retina (4-inch)'  and have no errors.

Jonathan Lipps

unread,
May 8, 2014, 9:29:15 AM5/8/14
to Christopher Graham, appium-...@googlegroups.com, Kamesh Velu
@penguinho I think that the .app needs to pass in the --device-name param when doing pre-launch

Christopher Graham

unread,
May 8, 2014, 9:34:46 AM5/8/14
to appium-...@googlegroups.com, Christopher Graham, Kamesh Velu
Can you specify how to accomplish this? This wasn't an issue when using Appium.app 0.18 and seems to have been introduced with the Appium 1.0.0 release.

I can successfully launch the simulator via my script when NOT using prelaunch. However, I cannot get the Inspector to work in that scenario and need to discover UI objects for new scripts. Hence why using prelaunch in Appium.app

Jonathan Lipps

unread,
May 8, 2014, 9:35:58 AM5/8/14
to Christopher Graham, appium-...@googlegroups.com, Kamesh Velu
I think this needs to be fixed in the .app itself.

Christopher Graham

unread,
May 8, 2014, 9:54:08 AM5/8/14
to appium-...@googlegroups.com
Thank you Kamesh! 

I found a list of the server args here: 


And then composed my own for launching the simulator instead of a real device:

--platform-name ios --app <absolute location to .app pulled from my script> --no-reset

This happens to be launching iPhone Retina (4-inch)  automatically, which is what I wanted anyway.

Katherine Yekhilevsky

unread,
May 8, 2014, 12:19:50 PM5/8/14
to appium-...@googlegroups.com
I have the same problem.
I followed your suggestions and included Custom Flags.
In version 1.0.0 it helped to Launch Appium Server and start my application with Prelaunch Application option selected.
But as soon as Inspector is loaded my application is shutting down.

This didn't happened in previous appium0.18.0 version.

Running the Appium Inspector always rotates my device orientation by 90 degrees. If I check Force Orientation option it rotates the device orientation by 180 degrees.

Please help!

Kamesh Velu

unread,
May 8, 2014, 1:49:00 PM5/8/14
to appium-...@googlegroups.com
I see the same issue. appium.app crashing my app as soon as it reads out the screen.
It is frustrating that i have to launch my app capture a screen shot, then redo this for every screen

Christopher Graham

unread,
May 14, 2014, 9:31:08 AM5/14/14
to appium-...@googlegroups.com
Note that I've logged the following ticket on Git for this issue:  https://github.com/appium/appium-dot-app/issues/296

For the simulator ONLY you can simply uncheck BundleID, select the App Path for the app in the iphonesimulator folder (not the iphoneos folder which is for real devices) and the simulator will prelaunch and the inspector will function.  

For real devices I have prelaunch working, but the inspector crashes the AUT and kills Appium. But if you want to try: uncheck App Path, check Bundle ID, check the UDID, then continue to use the Developer settings: --platform-name ios --app <path to your app in the iphoneos folder>   However, the inspector will crash the AUT every time and kill Appium with the error " error: uncaughtException: connect ECONNREFUSED  "

Vinu Joseph

unread,
May 30, 2014, 2:09:48 AM5/30/14
to appium-...@googlegroups.com
You need to pass both platformName and deviceName. platformName: iOS, deviceName: iPhone

i.e
Using Java :-

capabilities.setCapability("deviceName","iPhone");

 capabilities.setCapability("platformName","iOS");

Sean Lee-Loy

unread,
May 30, 2014, 12:35:17 PM5/30/14
to appium-...@googlegroups.com
I am trying to run on sauce labs iphone Retina (4-inch 64-bit)  via ruby script:

capabilities = {

        'appium-version' => '1.0',

        'platformName'=> 'iOS',

        'deviceName' => 'iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1',

        #'deviceName' => 'iPhone Retina 4-inch',

        'platformVersion'=> '7.1',

        'app' => APP_PATH

}


but I get the following error:

/Library/Ruby/Gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/http/common.rb:66:in `create_response': unexpected response, code=400, content-type="text/plain" (Selenium::WebDriver::Error::WebDriverError)

Invalid device name specified: iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1

I even tried many combinations:  If i use "iPhone Simulator" it will launch only the iPhone Retina 4-inch simulator which doesn't work because the app is compiled for 64-bit.

However if I run the same test on my local appium server with the Force option set to iPhone Retina (4-inch 64-bit)  It will work.

Seems like for defining deviceName capabilties it doesn't accept the strings that are found using "instruments -s devices"

instruments -s devices

Known Devices:

P21267 (com.apple.instruments.devices.local)

iPhone - Simulator - iOS 7.1

iPhone Retina (3.5-inch) - Simulator - iOS 7.1

iPhone Retina (4-inch) - Simulator - iOS 7.1

iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1

iPad - Simulator - iOS 7.1

iPad Retina - Simulator - iOS 7.1

iPad Retina (64-bit) - Simulator - iOS 7.1

Regards,

Jonathan Lipps

unread,
May 30, 2014, 12:42:00 PM5/30/14
to Sean Lee-Loy, appium-...@googlegroups.com
Sauce Labs is not currently configured to enable the different deviceNames (like 64-bit vs 32-bit). We're working on that right now though.

Sean Lee-Loy

unread,
May 30, 2014, 1:03:14 PM5/30/14
to Jonathan Lipps, appium-...@googlegroups.com
Thanks Jonathan,
Much appreciated for the quick reply, good to know.

Cheers,

Karthikeyan Kannappan

unread,
Jul 10, 2014, 10:57:01 AM7/10/14
to appium-...@googlegroups.com, jli...@saucelabs.com
I'm trying to run it on real device I get an Invalid device name error. 

This is what I'm using 

```
capabilities = {
       'appium-version' => '1.1.0',
        platformName:    'iOS',
        platformVersion: '7.1',
        deviceName:      'iPhone',
        app:             '/Users/xxx/Dropbox/iOSTest-Apps/UICatalog/Build/Products/Debug-iphoneos/UICatalog.app',
  }

Appium::Driver.new( caps: capabilities).start_driver

```

Error:::
  
```
Selenium::WebDriver::Error::WebDriverError: unexpected response, code=400, content-type="text/plain"
Invalid device name specified: iPhone
```

Other than  'iPhone', I tried 'deviceName' as
- 'iPhone Retina 4-inch' 
- 'mydevicename'

Still I get that Invalid device name error.

But with one condition I don't get an error with the same 'capabilites' but 

instead of  "Appium::Driver.new( caps: capabilities).start_driver" if I use "Selenium::WebDriver.for(:remote, :desired_capabilities => capabilities, :url => server_url)" that works fine. 

May I know what's the problem or any steps that I'm missing?!

Thanks!

Reply all
Reply to author
Forward
0 new messages