Default appium locale and language capability values

Hello All ,

Could you please share What is the default appium’s locale and language in case if i not sending the following caps

capabilities.setCapability(“locale”, “en_US”);
capabilities.setCapability(“language”, “en”);

if it appium will set default as english could you please point me the code where its been set default as English

Why i am asking this question ? because of the below issue

Thanks ,
Muthu Selvan SR

Could the problem be that you are sending ‘Simulator only’ Capabilities to a real device?

language(Sim/Emu-only) Language to set for the simulator / emulatore.g. fr
locale(Sim/Emu-only) Locale to set for the simulator / emulatore.g. fr_CA

Thanks for you replay , currently this issue coming only emulator , let me know in case if you need further question please ?

What are the names of the Emulators that you are trying to connect to? Are the names unique?

No Simulator name is different like , emulator-1 , emulator-2

Can you post the Appium Server log? I’d just like to see what’s happening there.

Below is the server log :

As i mentioned in my issue , This issue is coming when running two appium instance with two emulator running and passing the below caps :

capabilities.setCapability(“locale”, “en_US”);
capabilities.setCapability(“language”, “en”);

SERVER LOGS :

2015-11-13 07:00:17:466 - info: [debug] executing cmd: $HOME/android-sdk-linux/platform-tools/adb shell “getprop persist.sys.language”
2015-11-13 07:00:17:476 - error: Error getting device property persist.sys.language: Error: Command failed: error: more than one device/emulator

2015-11-13 07:00:17:477 - info: [debug] Sent shutdown command, waiting for UiAutomator to stop…
2015-11-13 07:00:24:480 - warn: UiAutomator did not shut down fast enough, calling it gone
2015-11-13 07:00:24:481 - info: [debug] Cleaning up android objects
2015-11-13 07:00:24:481 - info: [debug] Cleaning up appium session
2015-11-13 07:00:24:482 - error: Failed to start an Appium session, err was: Error: Command failed: error: more than one device/emulator

2015-11-13 07:00:24:485 - info: [debug] Error: Command failed: error: more than one device/emulator

at ChildProcess.exithandler (child_process.js:637:15)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)

2015-11-13 07:00:24:485 - info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Command failed: error: more than one device/emulator\n)”,“killed”:false,“code”:255,“signal”:null,“origValue”

If you give the above command from the command line do you get the same error? Keep in mind adb may not be in your path so you may need to type the path out.

i check that , adb is path and also adb shell “getprop persist.sys.language” this is returning “en” when one instance is running .

but my clarification is "Why i am getting “Error: Command failed: error: more than one device/emulator” when running two appium instance with two emulator running and passing the below caps :

capabilities.setCapability(“locale”, “en_US”);
capabilities.setCapability(“language”, “en”);
Appium will use default as english if we are not setting any local via capabilities , could you please confirm ?

I’m trying to figure out if this is a limitation of adb. But if you won’t test it in your setup then how can we know? I guess you can just keep asking the same question over and over with no resolution.