Log capture did not start in a reasonable amount of time

Hi

i am using xcode 6.1 and appiumn version 1.3.1

But i am unable to run the app on device.
And i am getting the following issue in it :

Log capture did not start in a reasonable amount of time)

Following are the logs of appium server :smile :

POST /wd/hub/session {“desiredCapabilities”:{“app”:"/Users/ashish/Desktop/UICatalog.ipa",“ipa”:“UICatalog.ipa”,“platformName”:“iOS”,“deviceName”:“Ashish’s iPad”,“device”:“iPad”,“BundleId”:“com.example.apple-samplecode.UICatalog”,“udid”:“77cdc8b753b987b3099f913abd632704edd”,“version”:“8.0”}}

info: Client User-Agent string: Apache-HttpClient/4.3.2 (java 1.5)
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : ipa, device, BundleId, version
info: [debug] Using local .ipa from desired caps: /Users/ashish/Desktop/UICatalog.ipa
info: [debug] Copying local zip to tmp dir

info: [debug] /Users/ashish/Desktop/UICatalog.ipa copied to /var/folders/sm/4d_lqtcd6_g24_s6bwdfppjr0000gn/T/114930-5341-117dt38/appium-app.zip

info: [debug] Unzipping /var/folders/sm/4d_lqtcd6_g24_s6bwdfppjr0000gn/T/114930-5341-117dt38/appium-app.zip

info: [debug] Testing zip archive: /var/folders/sm/4d_lqtcd6_g24_s6bwdfppjr0000gn/T/114930-5341-117dt38/appium-app.zip

info: [debug] Zip archive tested clean

info: [debug] Unzip successful

info: [debug] Got a relaxed match for app in zip, be careful for app match errors
info: [debug] Using locally extracted app: /var/folders/sm/4d_lqtcd6_g24_s6bwdfppjr0000gn/T/114930-5341-117dt38/Payload/UICatalog.app
info: [debug] Creating new appium session fcdbea49-7476-4f93-8217-25c5e0593b06
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.0

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/ashish/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {“nodePath”:"/Users/ashish/Downloads/Appium.app/Contents/Resources/node/bin/node",“commandProxyClientPath”:"/Users/ashish/Downloads/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}

info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!

info: [debug] Dynamic bootstrap path: /Users/ashish/Library/Application Support/appium/bootstrap/bootstrap-3691bf5fd5cca080.js
info: [debug] Reusing dynamic bootstrap: /Users/ashish/Library/Application Support/appium/bootstrap/bootstrap-3691bf5fd5cca080.js

info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.0.1”,“iOSSDKVersion”:“8.0”,“deviceName”:“Ashish’s iPad”,“platformVersion”:null}
info: [debug] fixDevice is on
info: [debug] Final device string is: ‘Ashish’s iPad (8.0 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

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

I am badly stuck in the issue and unable to resollve it.

Please help me out to resolve the issue.

Thanks

1 Like

Hi
I had this Issure before too,
I resolved it by going into Xcode -> Devices
Left side select your device.
There you have the deviceconsole down at the screenbox popping up.
Delete the deviceconsole by clicking on the trashcan symbol at the bottom right and you should be fine running tests again.

I can’t remember in which GitHub post I saw this solution

sers

How to fix this?? I am using Mac Os 10.10.1 & Xcode 6.1 and trying to launch the ios app through eclipse to perform some testing but getting this error dont know how to reseolve this issue. I have updated the appium to 1.3.4 but still same. Tried to launch same ios app with appium 1.3.3 GUI this app launches properly. Anyone can suggest anything.

info: Welcome to Appium v1.3.4 (REV 056f5bd277987bed391aef04acf2be38ea161e50)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: Console LogLevel: debug
info: --> POST /wd/hub/session {“desiredCapabilities”:{“app”:"/Users/Anand/Library/Developer/Xcode/DerivedData/Passport-dtutyhtjuncbbnhacstomnqkjttc/Build/Products/Debug-iphonesimulator/Passport.app",“appium-version”:“1.0”,“platformVersion”:“7.1”,“browserName”:"",“platformName”:“iOS”,“udid”:“13FF8920-587E-4AF6-A3B9-AA32E81624EC”,“deviceName”:“iPhone 5s”}}
info: Client User-Agent string: Apache-HttpClient/4.3.4 (java 1.5)
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : appium-version
info: [debug] Using local app from desired caps: /Users/Anand/Library/Developer/Xcode/DerivedData/Passport-dtutyhtjuncbbnhacstomnqkjttc/Build/Products/Debug-iphonesimulator/Passport.app
info: [debug] Creating new appium session 2eb74755-4582-46cf-97b9-78b548cfa1b9
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 /Users/Anand/Library/Developer/Xcode/DerivedData/Passport-dtutyhtjuncbbnhacstomnqkjttc/Build/Products/Debug-iphonesimulator/Passport.app/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /Users/Anand/Library/Developer/Xcode/DerivedData/Passport-dtutyhtjuncbbnhacstomnqkjttc/Build/Products/Debug-iphonesimulator/Passport.app/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn’t exist
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/Anand/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {“nodePath”:"/usr/local/bin/node",“commandProxyClientPath”:"/Users/Anand/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/Anand/Library/Application Support/appium/bootstrap/bootstrap-723f69bfa90dadc3.js
info: [debug] Reusing dynamic bootstrap: /Users/Anand/Library/Application Support/appium/bootstrap/bootstrap-723f69bfa90dadc3.js
info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.1.1”,“iOSSDKVersion”:“8.1”,“deviceName”:“iPhone 5s”,“platformVersion”:“7.1”}
info: [debug] fixDevice is on
info: [debug] Final device string is: ‘iPhone 5s (7.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
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 (/Users/Anand/appium/lib/devices/ios/ios-log.js:137:10)
at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
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 11780.237 ms - 234
info: [debug] Not pre-launching simulator
info: [debug] Creating iDevice object with udid 13FF8920-587E-4AF6-A3B9-AA32E81624EC
info: [debug] Couldn’t find ideviceinstaller, trying built-in at /Users/Anand/appium/build/libimobiledevice-macosx/ideviceinstaller
info: [debug] Checking app install status using: /Users/Anand/appium/build/fruitstrap/fruitstrap isInstalled --id 13FF8920-587E-4AF6-A3B9-AA32E81624EC --bundle com.passportparking.mobile

Above issue is observed with simulator 7.1,8.1 etc
By any chance can this be happening bcoz of “No signing Identity found” in xcode

Facing the same issue with Appium 1.3.4. Please post if anyone have any solution.

Same issue, OS X 10.10.1, appium 1.3.4, iPhone 5’s 8.0.2.

info: Client User-Agent string: Apache-HttpClient/4.3.6 (java 1.5)
info: [debug] App is an iOS bundle, will attempt to run as pre-existing
info: [debug] Creating new appium session c6a1f539-c1bf-4b61-bbe7-8fef272d9864
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.lafitness.lafitness/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
parseFileSync() is deprecated. Use parseStringSync() instead.
info: [debug] Could not parse plist file (as XML) at /usr/local/lib/node_modules/appium/com.lafitness.lafitness/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/Robert/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”}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. D…ot manually modify!
info: [debug] Dynamic bootstrap path: /Users/Robert/Library/Application Support/appium/bootstrap/bootstrap-d0f21a5b61bb08af.js
info: [debug] Reusing dynamic bootstrap: /Users/Robert/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”:“Omid’s iPhone”,“platformVersion”:null}
info: [debug] fixDevice is on
info: [debug] Final device string is: ‘Omid’s iPhone (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
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/node_modules/appium/lib/devices/ios/ios-log.js:137:10)
at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)
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 10174.178 ms - 234
info: [debug] Not pre-launching simulator
info: [debug] Creating iDevice object with udid B6140D3AE8678E2B6DA2A7834F28BA7DBF30AE
info: [debug] Couldn’t find ideviceinstaller, trying built-in at /usr/local/lib/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller
info: [debug] Checking app install status using: /usr/local/lib/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id B6140D3AE8678E2B6DA2A7834F28BA7DBF30AE --bundle com.lafitness.lafitness

Any and all assistance is greatly appreciated. Also I’m a bit new to this so please be clear in any explanation, thank you again.

I cleared the logs , connect device to mac and in xcode, clear the device logs.
Restarted the device and this seems to have fixed the above issue.

I am trying to do testing on simulator…

Check whether your app is compiled for simulator.

Yes It was installed by me through xcode on that simulator but it launches with GUI but not with source. After this I tried to launch it with ruby and its launching now but does not perform the actions which I copied with Appium inspector

You said you cleared the logs and device logs, I’ve cleared the device logs but what other logs are there?

Restart the device too.

Hi @ravisingh171989, if you want to run the test from source you have to provide the path of app in “app” capability. Once you have installed the app on simulator navigate to:

/Users/Your_user_name/Library/Developer/CoreSimulator/Devices/simulator udid/data/Containers/Bundle/Application/some folder/

Copy the .app file to the location whose path you will be providing in the “app” capability.

Hi Rakatak,
Even am facing the issue.But am unable to follow your steps. I am able to select the device but not finding any screenbox popping… Can you please assist me on this.

Thanks n adavce

I’m suddenly seeing this error for both iPhone 5s and 6, iOS 8.1.3 on Appium 1.3.4.
I have cleared logs, reset appium, rebooted the devices, rebooted my mac. Still seeing the following error:
I can run /build/deviceconsole/deviceconsole and see logging.

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
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 (/Users/eclose/Projects/appium/lib/devices/ios/ios-log.js:137:10)
at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)
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 11011.907 ms - 234
info: [debug] Not pre-launching simulator
info: [debug] Creating iDevice object with udid e5cf49cd6d4324cb9d2376590b4f1ab63e5c7c55
info: [debug] Couldn’t find ideviceinstaller, trying built-in at /Users/eclose/Projects/appium/build/libimobiledevice-macosx/ideviceinstaller
error: Could not initialize ideviceinstaller; make sure it is installed and works on your system

Any thoughts?

used to happen all the time in 1.3.4 .Problem solved for me when i switched to 1.3.5

This is also a stopgap recommendation:
I wound up completely resetting my device, then enabling UI Automation again and things cleared up.

I am seeing this issue on multiple device after couple of device of running tests. Rebooting helps me solve this issue temporarily. I am trying to disable condition which blocks server if device does not return any logs.

Same here, Restart the iPad , fixes the issue temporarily , seems this could be due to device log limitation or some thing related.
When we restart , seems like iPad is clearing the device logs and resetting fresh log file , could be ?
Does any one aware how to reset device logs on IOS , either from appium or other means of automatic way to delete old device logs and start fresh for every test ?

facing the same issue, Log cannot be captured when running the script with appium (1.3.6, 1.3.4 1.2.2 versions) and IOS 8.1
i tried clearing the logs as mentioned in above comments and still the issue could not be resolved.

can anyone who is able to fix the issue and able to run scripts in ios 8.1, please guide me …