Could not pre-launch appium and app doesn't get installed in iphone real device using appium - ios

I am using appium version 1.3.7.
I have connected physical device via usb.
I have launched appium server,after a while appium get crashed.
I have pasted that full log below.
I have attached the screen shot below.
Launching Appium with command: '/Applications/Appium.app/Contents/Resources/node/bin/node' lib/server/main.js --command-timeout "7200" --pre-launch --platform-version "8.1" --platform-name "iOS" --app "/Users/al/work/sample.app" --udid "f5de3fd5ccded92e40e86c652ce2a6f9414fe1a0" --device-name "iPhone 4s"
info: [debug] Starting Appium in pre-launch mode
info: Pre-launching app
info: [debug] Using local app from command line: /Users//al/work/sample.app
info: [debug] Creating new appium session 1cdc5dc0-36d2-40b9-922b-33601f28846b
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder
info: [debug] Setting Xcode version
info: [debug] Setting iOS SDK Version
info: [debug] Getting sdk version from xcrun with a timeout
info: [debug] iOS SDK Version set to 8.1
info: [debug] Not checking whether simulator is available since we're on a real device
info: [debug] Detecting automation tracetemplate
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Parsed app Info.plist (as binary)
info: [debug] Parsed app Localizable.strings
info: [debug] Getting bundle ID from app
info: [debug] Parsed app Info.plist (as binary)
info: [debug] Creating instruments
info: On some xcode 6 platforms, instruments-without-delay does not work. If you experience this, you will need to re-run appium with the --native-instruments-lib flag
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/alk/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {"nodePath":"/Applications/Appium.app/Contents/Resources/node/bin/node","commandProxyClientPath":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"grouped"}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...
info: [debug] Dynamic bootstrap path: /Users/alk/Library/Application Support/appium/bootstrap/bootstrap-d5a0fb924946d8d3.js
info: [debug] Reusing dynamic bootstrap: /Users/alk/Library/Application Support/appium/bootstrap/bootstrap-d5a0fb924946d8d3.js
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"6.1.1","iOSSDKVersion":"8.1","deviceName":"iPhone 4s","platformVersion":"8.1"}
info: [debug] fixDevice is on
info: [debug] Final device string is: 'iPhone 4s (8.1 Simulator)'
info: [debug] Not setting device type since we're on a real device
info: [debug] Checking whether we need to set app preferences
info: [debug] Not setting iOS and app preferences since we're on a real device
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killall iOS Simulator
info: [debug] Killing any other simulator daemons
info: [debug] On a real device; cannot clean device state
info: [debug] Not setting locale because we're using a real device
info: [debug] No iOS / app preferences to set
info: [debug] Starting iOS device log capture via deviceconsole
info: [debug] Not pre-launching simulator
info: [debug] Creating iDevice object with udid f5de3fd5ccded92e40e86c652ce2a6f9414ee1a2
info: [debug] Checking app install status using: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id f5de3fd5ccded92e40e86c652ce2a6f9414ee1a2 --bundle com.vr.iphone.sample
info: [debug] App is not installed. Will try to install the app.
info: [debug] Installing app using cmd: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap install --id f5de3fd5ccded92e40e86c652ce2a6f9414ee1a2 --bundle "/Users/al/work/sample.app
info: [debug] Cleaning up appium session
error: Could not pre-launch appium: Error: Unable to install [/Users/al/work/sample.app] to device with id [f5de3fd5ccded92e40e86c652ce2a6f9414ee1a2]. Error [Error: Command failed: /bin/sh -c /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap install --id f5de3fd5ccded92e40e86c652ce2a6f9414ee1a2 --bundle "/Users/al/work/sample.app"
Assertion failed: (AMDeviceStartService(device, CFSTR("com.apple.afc"), &afcFd, NULL) == 0), function handle_device, file fruitstrap.c, line 523.
]

You can use Appium to install your app on your device, Just uninstall your App manually and in setUp code use absolute path of .apk file like this:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("VERSION", "5.1.1");
capabilities.setCapability("deviceName", "Name");
File appDir = new File("/home/filename/ProjectFile");
File app = new File(appDir, "appname.apk");
capabilities.setCapability("app",app.getAbsolutePath());
It will install your app on your device.

You said you tried to launch on real device, but your logs saying you tried to launch on simulator.
If you are using UI version of appium, Please uncheck Force Device option in appium and give UDID of real device which you connected in appium and prelaunch. your app will be installed.

Related

How to Run Appium on ios Simulator 8.x/7.x

I am trying to do the automation using Appium on ios simulators.
My config is:
OS version: 10.10.x
Appium: 1.4.0
Xcode: 6.3.2
and caps for appium is:
automationName = "Appium"
platformName = "iOS"
platformVersion = "8.3"
deviceName = "iPhone 5s"
app = "/Users/skaram200/Desktop/ios_build/XfinityMyAccount_6.3.app"
When I run the appium it is giving me an error:
info: [debug] Attempting to run app on iPhone 5s (8.3 Simulator)
info: [debug] Spawning instruments with command: /Applications/xcode6.3/Xcode6.3.2.app/Contents/Developer/usr/bin/instruments -t /Applications/xcode6.3/Xcode6.3.2.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w "iPhone 5s (8.3 Simulator)" /Users/skaram200/Desktop/ios_build/XfinityMyAccount_6.3.app -e UIASCRIPT "/Users/skaram200/Library/Application Support/appium/bootstrap/bootstrap-4d92d75355d74eeb.js" -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/Users/skaram200/Documents/workspace/appium_1/node_modules/appium-instruments/thirdparty/iwd6/InstrumentsShim.dylib","LIB_PATH":"/Users/skaram200/Documents/workspace/appium_1/node_modules/appium-instruments/thirdparty/iwd6"}
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST STDERR] 2015-09-10 10:47:20.672 instruments[36855:1272282] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: [debug] [INST] Waiting for device to boot...
info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: Unable to install app with path: /Users/skaram200/Desktop/ios_build/XfinityMyAccount_6.3.app: "(null)"
info: [debug] [INSTSERVER] Instruments exited with code 253
info: [debug] Killall instruments
info: [debug] Instruments crashed on startup
info: [debug] We exceeded the number of retries allowed for instruments to successfully start; failing launch
info: [debug] Stopping iOS log capture
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killing any other simulator daemons
info: [debug] Killall iOS Simulator
info: [debug] Cleaning sim data files
info: Executing: xcrun simctl erase F54870E7-17FD-4A07-B6EE-1636F6AB5757 with timeout 2000
info: Executing: xcrun simctl erase F54870E7-17FD-4A07-B6EE-1636F6AB5757 with timeout 2000
info: [debug] Cleaning app data files
warn: Applications directory /Users/skaram200/Library/Developer/CoreSimulator/Devices/F54870E7-17FD-4A07-B6EE-1636F6AB5757/data/Applications doesn't exist. Have you run this simulator before?
info: Couldn't find app directories to delete. Probably it's not installed
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
info: [debug] Error: Instruments crashed on startup
at [object Object].Instruments.onInstrumentsExit (/Users/skaram200/Documents/workspace/appium_1/node_modules/appium-instruments/lib/instruments.js:440:31)
at [object Object].<anonymous> (/Users/skaram200/Documents/workspace/appium_1/node_modules/appium-instruments/lib/instruments.js:353:12)
at ChildProcess.emit (events.js:110:17)
at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Instruments crashed on startup)","origValue":"Instruments crashed on startup"},"sessionId":null}
```
Please let me know, how can I resolve these errors and start automating on ios simulators using appium.
Here you need to pass the --default-device or -dd as true for simulators and need to specify the --bundleID of the app. And we need to have debug .ipa or .app file to do automation.
Creating a successfull Build without an error.
I'm using Cordova, got some issues with that as well, this is what Idid in order to generate the .app:
cordova build ios --emulator
That's it, after that I was able to use Appium and push the .app to the simulator.
I hope it helps somebody else!

How to address Could not set the device type in Info.plist issue in appium, while launching the ios simulator?

I have installed appium version 1.3.6.
I have launched appium server to inspect an ios app.
I have furnished the error below.
Launching Appium with command: '/Applications/Appium.app/Contents/Resources/node/bin/node'; lib/server/main.js --command-timeout "7200" --pre-launch --log "/tmp/appium.log" --platform-version "8.1" --platform-name "iOS" --app "com.iphonewidget.iphone.testapp" --show-ios-log --device-name "iPhone 6"
info: [debug] Starting Appium in pre-launch mode
info: Pre-launching app
info: [debug] App is an iOS bundle, will attempt to run as pre-existing
info: [debug] Creating new appium session 255637cf-2d12-41c3-8610-e53f804d229b
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder
info: [debug] Setting Xcode version
info: [debug] Setting iOS SDK Version
info: [debug] Getting sdk version from xcrun with a timeout
info: [debug] iOS SDK Version set to 8.1
info: [debug] Checking whether instruments supports our device string
info: [debug] Getting list of devices instruments supports
info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"6.1.1","iOSSDKVersion":"8.1","deviceName":"iPhone 6","platformVersion":"8.1"}
info: [debug] fixDevice is on
info: [debug] Final device string is: 'iPhone 6 (8.1 Simulator)'
info: [debug] iOS sim UDID is 4391D23F-BA21-4FB8-8887-0972D2911420
info: [debug] Detecting automation tracetemplate
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Could not parse plist file (as binary) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.iphonewidget.iphone.testapp/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.iphonewidget.iphone.testapp/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn´t exist
info: [debug] Creating instruments
info: On some xcode 6 platforms, instruments-without-delay does not work. If you experience this, you will need to re-run appium with the --native-instruments-lib flag
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/alk/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env:
{
"nodePath":"/Applications/Appium.app/Contents/Resources/node/bin/node",
"commandProxyClientPath":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js",
"instrumentsSock":"/tmp/instruments_sock",
"interKeyDelay":null,
"justLoopInfinitely":false,
"autoAcceptAlerts":false,
"autoDismissAlerts":false,
"sendKeyStrategy":"oneByOne"
}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...
error: Could not set the device type in Info.plist
Unchecking "Prelaunch Application" under General Settings resolved this issue for me.

Error while launching appium inspector with ipa package on mac

I am using Appium inspector in Mac Os to inspect an elements on iOS app.
http://appium.io/
When I launch Appium inspector with ios package details, I am unable to launch ios app using appium and getting the below error as follows:-
Used tools version are listed below:-
Appium version:- 1.3.7
Xcode version:- 6.1.1
Mac os: 10.10.2
Error log:-
Launching Appium with command: '/Applications/Appium.app/Contents/Resources/node/bin/node' lib/server/main.js --command-timeout "7200" --pre-launch --log "/tmp/appium.log" --platform-version "8.1" --platform-name "iOS" --app "com.vervewireless.iphone.qa.beta" --show-ios-log --device-name "iPhone 6"
info: [debug] Starting Appium in pre-launch mode
info: Pre-launching app
info: [debug] App is an iOS bundle, will attempt to run as pre-existing
info: [debug] Creating new appium session 62b3e6af-2864-4256-9559-97b5a17fcb44
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder
info: [debug] Setting Xcode version
info: [debug] Setting iOS SDK Version
info: [debug] Getting sdk version from xcrun with a timeout
info: [debug] iOS SDK Version set to 8.1
info: [debug] Checking whether instruments supports our device string
info: [debug] Getting list of devices instruments supports
info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"6.1.1","iOSSDKVersion":"8.1","deviceName":"iPhone 6","platformVersion":"8.1"}
info: [debug] fixDevice is on
info: [debug] Final device string is: 'iPhone 6 (8.1 Simulator)'
info: [debug] iOS sim UDID is 4391D23F-BA21-4FB8-8887-0972D2911420
info: [debug] Detecting automation tracetemplate
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Could not parse plist file (as binary) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.vervewireless.iphone.qa.beta/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.vervewireless.iphone.qa.beta/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn't exist
info: [debug] Creating instruments
info: On some xcode 6 platforms, instruments-without-delay does not work. If you experience this, you will need to re-run appium with the --native-instruments-lib flag
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/alkaffkhan/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {"nodePath":"/Applications/Appium.app/Contents/Resources/node/bin/node","commandProxyClientPath":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"oneByOne"}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...
info: [debug] Dynamic bootstrap path: /Users/alkaffkhan/Library/Application Support/appium/bootstrap/bootstrap-931e8d7703a594e3.js
error: Could not set the device type in Info.plist
info: [debug] Reusing dynamic bootstrap: /Users/alkaffkhan/Library/Application Support/appium/bootstrap/bootstrap-931e8d7703a594e3.js
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"6.1.1","iOSSDKVersion":"8.1","deviceName":"iPhone 6","platformVersion":"8.1"}
info: [debug] fixDevice is on
info: [debug] Final device string is: 'iPhone 6 (8.1 Simulator)'
info: [debug] We're on iOS7.1+ so forcing defaultDevice on
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"6.1.1","iOSSDKVersion":"8.1","deviceName":"iPhone 6","platformVersion":"8.1"}
info: [debug] fixDevice is on
info: [debug] Final device string is: 'iPhone 6 (8.1 Simulator)'
info: [debug] Could not parse plist file (as binary) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.vervewireless.iphone.qa.beta/Info.plist
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.vervewireless.iphone.qa.beta/Info.plist
info: [debug] Cleaning up appium session
Launching Appium with command: '/Applications/Appium.app/Contents/Resources/node/bin/node' lib/server/main.js --command-timeout "7200" --pre-launch --log "/tmp/appium.log" --platform-version "8.1" --platform-name "iOS" --app "com.vervewireless.iphone.qa.beta" --show-ios-log --device-name "iPhone 6"
info: [debug] Starting Appium in pre-launch mode
info: Pre-launching app
info: [debug] App is an iOS bundle, will attempt to run as pre-existing
info: [debug] Creating new appium session 255637cf-2d12-41c3-8610-e53f804d229b
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder
info: [debug] Setting Xcode version
info: [debug] Setting iOS SDK Version
info: [debug] Getting sdk version from xcrun with a timeout
info: [debug] iOS SDK Version set to 8.1
info: [debug] Checking whether instruments supports our device string
info: [debug] Getting list of devices instruments supports
info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"6.1.1","iOSSDKVersion":"8.1","deviceName":"iPhone 6","platformVersion":"8.1"}
info: [debug] fixDevice is on
info: [debug] Final device string is: 'iPhone 6 (8.1 Simulator)'
info: [debug] iOS sim UDID is 4391D23F-BA21-4FB8-8887-0972D2911420
info: [debug] Detecting automation tracetemplate
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Could not parse plist file (as binary) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.vervewireless.iphone.qa.beta/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com.vervewireless.iphone.qa.beta/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn't exist
info: [debug] Creating instruments
info: On some xcode 6 platforms, instruments-without-delay does not work. If you experience this, you will need to re-run appium with the --native-instruments-lib flag
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/alkaffkhan/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {"nodePath":"/Applications/Appium.app/Contents/Resources/node/bin/node","commandProxyClientPath":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"oneByOne"}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
...
error: Could not set the device type in Info.plist
I'm assuming you're using the appium.app. I had this issue before and disabling the BundleID bypassed this error message for me.
Also, make sure that the device you are selecting does not have the UDID included. You can delete the UDID after you select the device in the dropdown.
Try running the inspector with only App Path and Force Device checkboxes enabled.

Appium iOS real device - issue with ideviceinstaller

I am running the appium test script on iOS real device., where I am getting the ideviceinstaller error.
I have installed ideviceinstaller manually using "brew install --HEAD ideviceinstaller" still getting the same error.
error: Failed to start an Appium session, err was: Error: Command failed: /bin/sh -c ideviceinstaller -u 0e0615c84ad9c68c7b0f42d2651541c3f38fd4b9 -l dyld: Library not loaded: /usr/local/lib/libplist.3.dylib Referenced from: /usr/local/bin/ideviceinstaller Reason: image not found
Please check the below logs.Using xcode 6.1.1 and iOS 8.1.
info: Appium REST http interface listener started on 0.0.0.0:4723
info: Console LogLevel: debug
info: --> POST /wd/hub/session {"desiredCapabilities":{"platformVersion":"8.1.1","app":"/Users/rajesh.madaswamy/FlydotREZ.ipa","deviceName":"iPhone","platformName":"iOS","fullReset":true,"browserName":"","bundleId":"com.accenture.ams.dev.london.Voyage-Air","udid":"0e0615c84ad9c68c7b0f42d2651541c3f38fd4b9"}}
info: Client User-Agent string: Apache-HttpClient/4.3.6 (java 1.5)
info: [debug] Using local .ipa from desired caps: /Users/rajesh.madaswamy/FlydotREZ.ipa
info: [debug] Copying local zip to tmp dir
info: [debug] /Users/rajesh.madaswamy/FlydotREZ.ipa copied to /var/folders/bc/7qkw5sfd221dbcm_fg2fp0g9dhyybh/T/115224-74086-ga247s/appium-app.zip
info: [debug] Unzipping /var/folders/bc/7qkw5sfd221dbcm_fg2fp0g9dhyybh/T/115224-74086-ga247s/appium-app.zip
info: [debug] Testing zip archive: /var/folders/bc/7qkw5sfd221dbcm_fg2fp0g9dhyybh/T/115224-74086-ga247s/appium-app.zip
info: [debug] Zip archive tested clean
info: [debug] Unzip successful
info: [debug] Using locally extracted app: /var/folders/bc/7qkw5sfd221dbcm_fg2fp0g9dhyybh/T/115224-74086-ga247s/Payload/Fly dotREZ.app
info: [debug] Creating new appium session 153304f6-3daf-4ee3-b72c-3f181d3a8ffa
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder
info: [debug] Setting Xcode version
info: [debug] Setting iOS SDK Version
info: [debug] Getting sdk version from xcrun with a timeout
info: [debug] iOS SDK Version set to 8.1
info: [debug] Not checking whether simulator is available since we're on a real device
info: [debug] Detecting automation tracetemplate
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Parsed app Info.plist (as binary)
info: [debug] Parsed app Localizable.strings
info: [debug] Creating instruments
info: On some xcode 6 platforms, instruments-without-delay does not work. If you experience this, you will need to re-run appium with the --native-instruments-lib flag
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/rajesh.madaswamy/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {"nodePath":"/usr/local/Cellar/node/0.12.0_1/bin/node","commandProxyClientPath":"/Users/rajesh.madaswamy/.npm-packages/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"grouped"}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. D...ot manually modify!
info: [debug] Dynamic bootstrap path: /Users/rajesh.madaswamy/Library/Application Support/appium/bootstrap/bootstrap-4f4c08d246c5f17c.js
info: [debug] Reusing dynamic bootstrap: /Users/rajesh.madaswamy/Library/Application Support/appium/bootstrap/bootstrap-4f4c08d246c5f17c.js
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"6.1.1","iOSSDKVersion":"8.1","deviceName":"iPhone","platformVersion":"8.1.1"}
info: [debug] fixDevice is on
info: [debug] Final device string is: 'iPhone (8.1.1 Simulator)'
info: [debug] Not setting device type since we're on a real device
info: [debug] Checking whether we need to set app preferences
info: [debug] Not setting iOS and app preferences since we're on a real device
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killall iOS Simulator
info: [debug] Killing any other simulator daemons
info: [debug] On a real device; cannot clean device state
info: [debug] Not setting locale because we're using a real device
info: [debug] No iOS / app preferences to set
info: [debug] Starting iOS device log capture via deviceconsole
info: [debug] Not pre-launching simulator
info: [debug] Creating iDevice object with udid 0e0615c84ad9c68c7b0f42d2651541c3f38fd4b9
info: [debug] Checking app install status using: /Users/rajesh.madaswamy/.npm-packages/lib/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 0e0615c84ad9c68c7b0f42d2651541c3f38fd4b9 --bundle com.accenture.ams.dev.london.Voyage-Air
info: [debug] App is installed.
info: [debug] fullReset requested. Forcing app install.
info: [debug] Installing ipa found at /Users/rajesh.madaswamy/FlydotREZ.ipa
info: [debug] Creating iDevice object with udid 0e0615c84ad9c68c7b0f42d2651541c3f38fd4b9
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Command failed: /bin/sh -c ideviceinstaller -u 0e0615c84ad9c68c7b0f42d2651541c3f38fd4b9 -l
dyld: Library not loaded: /usr/local/lib/libplist.3.dylib
Referenced from: /usr/local/bin/ideviceinstaller
Reason: image not found
info: [debug] Error: Command failed: /bin/sh -c ideviceinstaller -u 0e0615c84ad9c68c7b0f42d2651541c3f38fd4b9 -l
dyld: Library not loaded: /usr/local/lib/libplist.3.dylib
Referenced from: /usr/local/bin/ideviceinstaller
Reason: image not found
at ChildProcess.exithandler (child_process.js:744:12)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1008:16)
at Socket.<anonymous> (child_process.js:1176:11)
at Socket.emit (events.js:107:17)
at Pipe.close (net.js:476:12)
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 ideviceinstaller -u 0e0615c84ad9c68c7b0f42d2651541c3f38fd4b9 -l \ndyld: Library not loaded: /usr/local/lib/libplist.3.dylib\n Referenced from: /usr/local/bin/ideviceinstaller\n Reason: image not found\n)","killed":false,"code":null,"signal":"SIGTRAP","cmd":"/bin/sh -c ideviceinstaller -u 0e0615c84ad9c68c7b0f42d2651541c3f38fd4b9 -l ","origValue":"Command failed: /bin/sh -c ideviceinstaller -u 0e0615c84ad9c68c7b0f42d2651541c3f38fd4b9 -l \ndyld: Library not loaded: /usr/local/lib/libplist.3.dylib\n Referenced from: /usr/local/bin/ideviceinstaller\n Reason: image not found\n"},"sessionId":null}
info: <-- POST /wd/hub/session 500 2042.905 ms - 714
I was getting this error after installing the Appium Inspector. What ultimately fixed it for me was what you have already tried, specifically installing ideviceinstaller manually.
Until I figured that out, I just put 'libplist.3.dylib' on my path so it would be found. It felt like a hack, but it worked.
to install ideviceistaller
Install the App
Press Command+F and type Terminal and press enter/return key.
Run in Terminal app:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
and press enter/return key. Wait for the command to finish.
Run:
brew install ideviceinstaller

Log capture did not start in a reasonable amount of time - Error when trying to run iOS tests on a remote appium server - appium log attached

I am trying to run appium tests on iPhones using a remote appium server.
When I run the tests locally they pass but when I just send the remote server's ip and try to execute the test I get the following errors in my log:
info: Client User-Agent string: Apache-HttpClient/4.3.3 (java 1.5)
info: [debug] App is an iOS bundle, will attempt to run as pre-existing
info: [debug] Creating new appium session 87610d1a-b873-46e5-96b0-b54b412f10a0
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder
info: [debug] Setting Xcode version
info: [debug] Setting iOS SDK Version
info: [debug] Getting sdk version from xcrun with a timeout
info: [debug] iOS SDK Version set to 8.1
info: [debug] Not checking whether simulator is available since we're on a real device
info: [debug] Detecting automation tracetemplate
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Could not parse plist file (as binary) at /usr/local/lib/node_modules/appium/com.viber.testing/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /usr/local/lib/node_modules/appium/com.viber.testing/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings; assuming it doesn't exist
info: [debug] Creating instruments
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/Desktop-QA/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {"nodePath":"/usr/local/bin/node","commandProxyClientPath":"/usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"sendKeyStrategy":"grouped"}
...o: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
info: [debug] Dynamic bootstrap path: /Users/Desktop-QA/Library/Application Support/appium/bootstrap/bootstrap-d0f21a5b61bb08af.js
info: [debug] Reusing dynamic bootstrap: /Users/Desktop-QA/Library/Application Support/appium/bootstrap/bootstrap-d0f21a5b61bb08af.js
info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"6.1.1","iOSSDKVersion":"8.1","deviceName":"none","platformVersion":"8.0.2"}
info: [debug] fixDevice is on
info: [debug] Final device string is: 'none (8.0.2 Simulator)'
info: [debug] Not setting device type since we're on a real device
info: [debug] Checking whether we need to set app preferences
info: [debug] Not setting iOS and app preferences since we're on a real device
info: [debug] Reset not set, not ending sim or cleaning up app state
info: [debug] Not setting locale because we're using a real device
info: [debug] No iOS / app preferences to set
info: [debug] Starting iOS device log capture via deviceconsole
error: Log capture did not start in a reasonable amount of time
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Log capture did not start in a reasonable amount of time
info: [debug] Error: Log capture did not start in a reasonable amount of time
at null.onTimeout (/usr/local/lib/nodemodules/appium/lib/devices/ios/ios-log.js:139:10)
at Timer.listOnTimeout as ontimeout
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Log capture did not start in a reasonable amount of time)","origValue":"Log capture did not start in a reasonable amount of time"},"sessionId":null}
info: <-- POST /wd/hub/session 500 11148.632 ms - 234
I tried newer devices ,cleaning the logs from the device and restarting it but all of these didn't help.
Any help will be more then welcome.
Thanks in advance!
A temporary solution for me was to run appium from source,replacing Deviceconsole with devicesyslog (the previous one) and now it works and i can get the logs from the device even when i am running on a remote appium with a remote device

Resources