Has anyone been able to use ios simulator 9.1 with Appium 1.4.13?
Do you start the appium server via the terminal or the GUI app?
Are there any special steps you take to use it?
I’m having trouble running scripts for ios simulator 9.1.
Thanks.
I am using ios9.1 with Appium 1.4.13 for both Simulator and Real devices. it works fine. What is the issue you are facing? can you post some log details.
Some people have been reporting problems with Xcode 7.1, which I don’t think is supported yet. Could that factor into your problem?
I am using Xcode Version 7.1 (7B91b) with the above config for my project.
I have seen these 3 errors most frequently.
Error: Failed to start an Appium session, err was:
Error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version
Failed getting devices. Err: Error: Command failed: /bin/sh -c ‘/Applications/Xcode.app/Contents/Developer/usr/bin/instruments’ -s devices
. Stdout: . Stderr: .
Command failed: /bin/sh -c ideviceinstaller -u xxlongnumberxxx -i /var/folders/18/05xmf2y509db8_8bjsxlnfd40000gn/T/115931-1299-fhxjnk/SafariLauncher.app
Some logs
Launching Appium with command: ‘/usr/local/bin/node’ lib/server/main.js --command-timeout “7200” --debug-log-spacing --platform-version “9.1” --platform-name “iOS” --show-ios-log --device-name “iPhone 5S” --launch-timeout “900000” --command-timeout 300
info: Welcome to Appium v1.4.13 (REV c75d8adcb66a75818a542fe1891a34260c21f76a)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: [debug] Non-default server args: {“launchTimeout”:“900000”,“deviceName”:“iPhone 5S”,“platformName”:“iOS”,“platformVersion”:“9.1”,“showIOSLog”:true,“defaultCommandTimeout”:300,“debugLogSpacing”:true}
info: Console LogLevel: debug
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 10.348 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}
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 3.101 ms - 105 {“status”:0,“value”:{“build”:{“version”:“1.4.13”,“revision”:“c75d8adcb66a75818a542fe1891a34260c21f76a”}}}
info: --> POST /wd/hub/session {“desiredCapabilities”:{“browserName”:“Safari”,“platformName”:“iOS”,“deviceName”:“iPhone 5s”,“platformVersion”:“9.1”}}
info: Client User-Agent string: Apache-HttpClient/4.5.1 (Java/1.8.0_60)
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: [debug] Configuring Safari session
info: [debug] We’re on iOS8+ so not copying mobile safari app
info: [debug] Creating new appium session eff2ae38-8811-45f5-9062-99786dd788cf
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode version
info: [debug] Xcode version set to 7.1
info: [debug] Setting iOS SDK Version
info: [debug] Cleaning up appium session
error: Could not determine iOS SDK version
info: [debug] Error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version
at ChildProcess.exithandler (child_process.js:203:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:818:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
error: Failed to start an Appium session, err was: Error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version\n)”,“cause”:{“killed”:true,“code”:null,“signal”:“SIGTERM”,“cmd”:"/bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version"},“isOperational”:true,“killed”:true,“code”:null,“signal”:“SIGTERM”,“cmd”:"/bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version",“origValue”:“Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version\n”},“sessionId”:null}
info: <-- POST /wd/hub/session 500 9731.657 ms - 525
I am also using xcode 7.1 and appium 1.4.13. I don’t remember the error but with 1.4.13 in my Appium GUI I had to check custom server flag and made an entry --native-instruments-lib.
Please see if this helps.
Thanks Sunny. I tried to set custom server flag with --native-instruments-lib before, but it gave me the same error and then it caused my real iphone tests, android simulator, and android read device tests to fail. I had to reinstall appium from scratch to fix everything again.
Someone else tried it and says their appium won’t even start. Are you sure this works? I hate to waste another 2 days reinstalling and refiguring out what’s wrong and to get everything to work again. When I run real iphone tests and android tests, do I remove the --native-instruments-lib flag? When I unset the --native-instruments-lib flag will it go back to default mode? Because I think when I unset it before, my appium server still ran as if it had it set. Like it was cached. That’s why I had to reinstall appium. I spent a lot of time on this, so I want to make sure it works and that I’m doing it correctly before I actually make a change. Maybe I set the flag incorrectly because the appium docs says it is suppose to be false or true. What exactly do you paste in? Thanks for your help.
–native-instruments-lib true
or
–native-instruments-lib false
or
–native-instruments-lib
Someone in another thread said they can use the 9.1 simulator and I noticed they had checked use Native Instruments Library in the IOS advance settings. I don’t know what this is though. According to the Appium doc, it is to use the native Instruments library rather than the one included with Appium. What does the Native Instruments Library do?
@Sruthi,@sunny_sachdeva do you use this to get your iOS 9.1 simulator to work? Or is this something unrelated?
Thanks.
Do you have to uncheck the custom server flag when you run ios real device?
And when you uncheck it and remove the flag, does it revert back to default? It won’t be cached.
What does this server flag do? Why does ios 9.1 simulator work with this flag turned on?
Thanks Sunny.
Adding the --native-instruments-lib flag did the trick.