Desired capabilities "language" not working with Appium V1.5.1
See original GitHub issueThe problem
I need to test my application against many simulator with different language settings. For this, I set appium desired capabilities in the terminal by running: ➜ appium --language ‘fr’ in order to set the language of my simulator to “fr”. I tried also another method by creating different profiles in my cucumber.yml configuration file. Both methods are crashing my simulator(Please see logs below).
Environment
- Appium version: appium v1.5.1
- MAC OS 10.11.4
- Xcode v7.0.1
- cucumber v2.3.3
- ruby v2.3.0
=====Server logs:
~ appium --language 'fr'
[Appium] Welcome to Appium v1.5.1 (REV d183ff8065aafd3def71f9c9c728a3a92c1c4742)
[Appium] Non-default server args:
[Appium] language: 'fr'
[Appium] Deprecated server args:
[Appium] --language => --default-capabilities '{"language":"fr"}'
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium] language: 'fr'
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"iOS","deviceName":"iPhone 6s","app":"/Users/admin/Desktop/mbb_test_lang/mbb-ios.app"}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"platformName":"iOS","deviceName":"iPhone 6s","app":"/Users/admin/Desktop/mbb_test_lang/mbb-ios.app"},null,null,null]
[Appium] Creating new IosDriver session
[Appium] Capabilities:
[Appium] platformName: 'iOS'
[Appium] deviceName: 'iPhone 6s'
[Appium] app: '/Users/admin/Desktop/mbb_test_lang/mbb-ios.app'
[Appium] language: 'fr'
[BaseDriver] Session created with session id: 255d49e9-bd39-4eec-aad3-71e34319a924
[debug] [iOS] Not auto-detecting udid.
[BaseDriver] Using local app '/Users/admin/Desktop/mbb_test_lang/mbb-ios.app'
[debug] [iOS] Removing any remaining instruments sockets
[debug] [iOS] Cleaned up instruments socket /var/folders/tf/cts_89gj4ld8c0n48_xjsyt40000gn/T/instruments_sock
[debug] [iOS] Setting Xcode version
[debug] [iOS] Xcode version set to 7.0.1
[debug] [iOS] Setting iOS SDK Version
[debug] [iOS] iOS SDK Version set to 9.0
[debug] [iOS] Checking whether instruments supports our device string
[debug] [Instruments] Getting list of devices instruments supports
[debug] [Instruments] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
[debug] [Instruments] Available devices: Apple Watch - 38mm (2.0) [7BCFC41E-A8E3-45C6-B9CE-11BDB3F9BF8E],Apple Watch - 38mm (2.0) [2063DC10-F889-4D1C-AA90-8D32FA925152],iPad 2 (9.0) [CE07BC04-A6CE-4213-B9A3-CC4D6463788D],iPad Air (9.0) [7B765DDC-FC32-46D1-B37F-FEA7D29888B6],iPad Air 2 (9.0) [459DCCB6-B65D-4148-A570-3B8270140219],iPad Retina (9.0) [97790AC6-1817-4390-ADFA-C907DAD047D7],iPhone 4s (9.0) [6023C32D-46F2-4570-8C25-7312930AE267],iPhone 5 (9.0) [FC288EFD-D953-41C1-99A1-9FC5C733FF98],iPhone 5s (9.0) [C05E7744-2A6A-48AA-94B7-603FB84F38A7],iPhone 6 (9.0) [B51E5E51-B8A0-425D-AB5D-12A829DE0EE0],iPhone 6 (9.0) [7E249D0E-4C38-401F-AE20-85453876DEB6],iPhone 6 Plus (9.0) [BEA8193C-F798-4B4C-A675-2BD3EB67C8BA],iPhone 6 Plus (9.0) [12724A1C-6A86-4279-B560-F205BA3A8933],iPhone 6s (9.0) [34B94AC9-69AA-4D68-8A02-18C98D53844C],iPhone 6s Plus (9.0) [946A4044-C5F7-4352-A77C-5E34356986A2],iPhone 6s Plus (9.0) [BE929090-9A8A-472E-B941-1A7F2192A6C1],iPhone 6s Plus (9.0) + Apple Watch - 42mm (2.0) [25B3E12D-5347-4BCA-8832-EC4E923A8FAB]
[iOSSim] Retrieving device name string for Xcode version 7.0.1
[debug] [iOSSim] Getting device string from options: {"deviceName":"iPhone 6s","platformVersion":"9.0","forceIphone":false,"forceIpad":false}
[debug] [iOSSim] Fixing device. Changed from 'iPhone 6s' to 'iPhone 6s (9.0) ['
[debug] [iOSSim] Final device string is 'iPhone 6s (9.0) ['
[debug] [iOS] iOS sim UDID is 34B94AC9-69AA-4D68-8A02-18C98D53844C
[iOSSim] Constructing iOS simulator for Xcode version 7.0.1
[debug] [iOS] Parsed app 'Localizable.strings'
[debug] [ios-app-utils] Getting bundle ID from app
[iOS] Extracted bundleID: bnp.be.mbb-ios from app: /Users/admin/Desktop/mbb_test_lang/mbb-ios.app
[debug] [iOS] Creating instruments
[debug] [UIAuto] Preparing bootstrap code
[debug] [UIAuto] Dynamic bootstrap dir: /Users/admin/Library/Application Support/appium/bootstrap
[debug] [UIAuto] Dynamic env: {"nodePath":"/usr/local/Cellar/node/5.6.0/bin/node","commandProxyClientPath":"/usr/local/lib/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js","instrumentsSock":"/var/folders/tf/cts_89gj4ld8c0n48_xjsyt40000gn/T/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"oneByOne"}
...bug] [UIAuto] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
[debug] [UIAuto] Dynamic bootstrap path: /Users/admin/Library/Application Support/appium/bootstrap/bootstrap-0f443b56dc25b66c.js
[debug] [UIAuto] Reusing dynamic bootstrap: /Users/admin/Library/Application Support/appium/bootstrap/bootstrap-0f443b56dc25b66c.js
[debug] [iOS] User specified default device, letting instruments launch it
[debug] [iOS] Running ios sim reset flow
[debug] [iOS] Killing the simulator
[debug] [iOSSim] Killing all iOS Simulators
[debug] [iOS] Cleaning sim state.
[debug] [iOSSim] Cleaning app data files for 'mbb-ios.app', 'bnp.be.mbb-ios'
[iOSSim] Attempted to get an app path from a fresh simulator quickly launching the sim to populate its directories
[debug] [iOSSim] Attempting to launch and quit the simulator, to create directory structure
[debug] [iOSSim] Will launch with Safari? false
[iOSSim] Starting simulator with command: open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID 34B94AC9-69AA-4D68-8A02-18C98D53844C
[iOSSim] Tailing simulator logs until we encounter the string "System app "com.apple.springboard" finished startup"
[iOSSim] We will time out after 60000ms
[debug] [iOSSim] Waiting and extra 2000ms for the simulator to really finish booting
[debug] [iOSSim] Done waiting extra time for simulator
[iOSSim] Simulator booted in 20303ms
[debug] [iOSSim] Killing all iOS Simulators
[debug] [iOSSim] Building bundle path map
[debug] [iOSSim] Building bundle path map
[debug] [iOSSim] Could not find app directories to delete. It is probably not installed
[debug] [iOSSim] Killing any simulator daemons for 34B94AC9-69AA-4D68-8A02-18C98D53844C
[iOSSim] Cleaning simulator 34B94AC9-69AA-4D68-8A02-18C98D53844C
[debug] [iOS] No simulator directories found.
[debug] [iOSSim] Attempting to launch and quit the simulator, to create directory structure
[debug] [iOSSim] Will launch with Safari? false
[debug] [iOS] Setting locale information
[iOSSim] Starting simulator with command: open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID 34B94AC9-69AA-4D68-8A02-18C98D53844C
[debug] [iOSSim] New language: fr
[debug] [iOSSim] Writing new locale plist data
[debug] [iOS] Locale was updated. Stopping simulator.
[debug] [iOS] Killing the simulator
[debug] [iOSSim] Killing all iOS Simulators
[debug] [iOS] No iOS / app preferences to set
[debug] [iOSLog] Starting iOS 9.0 simulator log capture
[debug] [iOSLog] System log path: /Users/admin/Library/Logs/CoreSimulator/34B94AC9-69AA-4D68-8A02-18C98D53844C/system.log
[debug] [iOS] Not pre-launching simulator
[debug] [iOS] Starting UIAutoClient, and launching Instruments.
[debug] [UIAuto] Instruments socket server started at /var/folders/tf/cts_89gj4ld8c0n48_xjsyt40000gn/T/instruments_sock
[debug] [Instruments] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
[debug] [Instruments] Attempting to launch instruments, this is try #1
[Instruments] Launching instruments
[iOSSim] Tailing simulator logs until we encounter the string "System app "com.apple.springboard" finished startup"
[iOSSim] We will time out after 60000ms
[debug] [Instruments] Attempting to run app on iPhone 6s (9.0) [
[Instruments] On xcode 7.0+, instruments-without-delay does not work, skipping instruments-without-delay
[debug] [Instruments] Found Insruments-Without-Delay: /usr/local/lib/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-instruments/thirdparty/iwd7
[debug] [Instruments] Spawning instruments with command: '/Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /var/folders/tf/cts_89gj4ld8c0n48_xjsyt40000gn/T/appium-instruments/instrumentscli0.trace -w "iPhone 6s (9.0) [" /Users/admin/Desktop/mbb_test_lang/mbb-ios.app -e UIASCRIPT "/Users/admin/Library/Application Support/appium/bootstrap/bootstrap-0f443b56dc25b66c.js" -e UIARESULTSPATH /var/folders/tf/cts_89gj4ld8c0n48_xjsyt40000gn/T/appium-instruments'
[debug] [Instruments] And launch timeouts (in ms): {"global":90000}
[debug] [Instruments] [INST] Waiting for device to boot...
[debug] [iOSSim] Waiting and extra 2000ms for the simulator to really finish booting
[UIAuto] Instruments is ready to receive commands
[debug] [iOS] Instruments launched. Starting poll loop for new commands.
[debug] [iOS] Setting bootstrap config keys/values
[debug] [UIAuto] Socket data received (2 bytes)
[debug] [UIAuto] Got a result when we were not expecting one! Ignoring it
[debug] [UIAuto] Sending command to instruments: target = $.target();
au = $;
$.isVerbose = true;
[debug] [iOSSim] Done waiting extra time for simulator
[iOSSim] Simulator booted in 21395ms
[debug] [iOSSim] Killing all iOS Simulators
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Appium 1.5.1 Released! - News
General allow platformName to be any case Windows process handling is cleaned up Desired capabilities language and locale added iOS iOS 9.3 ...
Read more >Desired Capabilities
Desired Capabilities are keys and values encoded in a JSON object, sent by Appium clients to the server when a new automation session...
Read more >Queries regarding appium - Support
I am very new in appium and mobile automation testing.presently i am working on appium but i am little bit confused, I have...
Read more >Script is working with emulator but not with real device
DesiredCapabilities capabilites = new DesiredCapabilities(); capabilites. ... Script is working with emulator but not with real device.
Read more >DesiredCapabilities not working - Support
DesiredCapabilities cap = new DesiredCapabilities(); cap.SetCapability("deviceName", "Galaxy J3"); cap.SetCapability("platformVersion", "5.1.1"); ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had same error with language capability and Appium 1.5.2. I have been researching the problem and I think it’s solved with https://github.com/appium/appium-ios-driver/pull/140.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.