I’m trying to run tests for Mobile Web app on iOS real device, however I’m stuck with instruments launch timing out.
appium 1.4.7 (running from source)
iPhone 6, iOS 8.4
xcode 6.4
Here is the log, it seems the command for spawning appium is erroring with ‘Cannot create temporary directory’, I changed permissions and made sure everyone has read/write access to tmp dir but still no luck.
Has anyone encountered this issue, any ideas what might be going on?
info: [debug] Instruments socket server started at /Users/admin/appium/tmp/instruments_sock
info: [debug] Starting instruments
info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID f40b836d5ed0eeb01714766188cb3e2c18500878
info: [debug] 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 /Users/admin/appium/tmp/appium-instruments/instrumentscli0.trace -w f40b836d5ed0eeb01714766188cb3e2c18500878 com.bytearc.SafariLauncher -e UIASCRIPT "/Users/admin/Library/Application Support/appium/bootstrap/bootstrap-2b1d54045413baa7.js" -e UIARESULTSPATH /Users/admin/appium/tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {"global":90000}
info: [debug] [INST STDERR] 2015-07-08 18:23:56.024 instruments[2477:67884] Exception thrown while running an XRSpace op (Analysis Core Space op): Unexpected error opening unqiuing path: Error Domain=Instruments Path Manager Code=0 "Cannot create temporary directory" UserInfo=0x7fb1bb3a9320 {NSLocalizedDescription=Cannot create temporary directory}
info: [debug] [INSTSERVER] Instruments exited with code 253
I am having a similar issue and get the same error response. I believe it has to do with permissions but I’m not sure where exactly the operation is attempting to create a directory. I am using an iOS Simulator and testing a third party application.
The interesting thing is that when I use Appium and get the error, it only stalls the phone around 1/4 of the time (the other times it goes through).
Also, I believe the error only occurs when using Appium; When I run the application through XCode (by hitting run) there is no error in the Console like there is when it is run through Appium.
info: [debug] [INST STDERR] 2015-07-09 12:19:34.964 instruments[523:10526] Exception thrown while running an XRSpace op (Analysis Core Space op): Unexpected error opening unqiuing path: Error Domain=Instruments Path Manager Code=0 "Cannot create temporary directory" UserInfo=0x7ff897a0df00 {NSLocalizedDescription=Cannot create temporary directory}
When running Appium with the Show iOS System Log on, I get these lines surrounding the error every time. I’m curious if you do as well.
info: [IOS_SYSLOG_ROW ] Jul 9 13:28:05 <company name>-MacBook-Pro SpringBoard[2078]: assertion failed: 14E46 12D508: libxpc.dylib + 59313 [5775267F-BF6F-33DA-806F-32C27348CDC9]: 0x7d
info: [debug] [INST STDERR] 2015-07-09 13:28:05.940 instruments[2060:36241] Exception thrown while running an XRSpace op (Analysis Core Space op): Unexpected error opening unqiuing path: Error Domain=Instruments Path Manager Code=0 "Cannot create temporary directory" UserInfo=0x7fd54632b290 {NSLocalizedDescription=Cannot create temporary directory}
info: [IOS_SYSLOG_ROW ] Jul 9 13:28:05 <company name>-MacBook-Pro.local filecoordinationd[2104]: (Error) FileProvider: Could not load bundle com.apple.CloudDocsFileProvider. Error: The bundle “CloudDocsFileProvider” couldn’t be loaded because it is damaged or missing necessary resources.
Nope, I was not getting this error in iOS system log.
I eventually got rid of the cannot create temporary directory by reinstalling XCode, I believe it was due to the fact that XCode was previously installed by a different user than the one using when running appium server.
However, even though I got rid of the temp dir error, my tests were still not running on real device.
The solution that worked for me was the one mentioned on this topic