1

UIAutomation尝试使用仪器启动测试时,我一直收到以下错误消息command line tool

2013-10-30 12:08:47.868 ScriptAgent [4687:2e07] CLTilesManagerClient:初始化,sSharedTilesManagerClient

2013-10-30 12:08:47.869 ScriptAgent [4687:2e07] CLTilesManagerClient:初始化 2013-10-30 12:08:47.869 ScriptAgent [4687:2e07] CLTilesManagerClient:重新连接,0xa5b0aa0 2013-10-998 12:09:17。 ScriptAgent[4687:2e07] +[UIAXElement initializeAccessibility]:UIAutomation 从未收到 kAXAccessibilityLoaded。等待 30.02 秒。2013-10-30 12:09:17.990 ScriptAgent [4687:2e07] AXError:无法自动注册 pid 状态更改 2013-10-30 12:09:18.008 ScriptAgent [4687:2e07]无法启用可访问性,kAXErrorServerNotFound 2013 -10-30 12:09:18.381 仪器[4633:240f] 自动化仪器在尝试运行脚本时遇到异常。UIAScriptAgentSignaledException 2013-10-30 11:09:18 +0000 失败:尝试运行脚本时出错。

其他人有这个问题吗?谢谢你的帮助。

4

2 回答 2

0

试试sudo rm /tmp/instruments_sock——这是instruments.js创建的用来和instrument通信的socket文件。由于某种原因,该文件可能不可删除。

该命令将删除该文件。或者尝试更改文件的权限设置。

于 2013-10-30T14:00:36.787 回答
0

我在 Xcode 5.0.1 上也遇到了这个问题,仪器甚至从 UI 开始都无法工作,但仪器在 Xcode 5.0 上工作正常

经过一番调查,我发现当仪器启动时,iPhoneSimulator SDK中的scriptAgent崩溃了。

Process:         ScriptAgent [4297]
Path:            /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/Developer/usr/bin/ScriptAgent
Identifier:      ScriptAgent
Version:         270
Code Type:       X86 (Native)
Parent Process:  instruments [4208]
Responsible:     eclipse [1017]
User ID:         110125050

Date/Time:       2013-11-11 10:52:49.044 +0800
OS Version:      Mac OS X 10.9 (13A603)
Report Version:  11
Anonymous UUID:  A496DC68-476F-589B-352C-303FA1CD2355

Sleep/Wake UUID: F65E37D7-0AFF-4867-9538-8736C8F0B908

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
iPhone Simulator (external launch) , iPhone OS 7.0.3 (unknown/11B508)


Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib          0x02e94952 __pthread_kill + 10
1   libsystem_pthread.dylib         0x02e58167 pthread_kill + 101
2   libsystem_sim_c.dylib           0x02b6ae12 abort + 127
3   ScreenReaderCore                0x03db5853 SCRCUncaughtExceptionHandler + 111
4   CoreFoundation                  0x005f7a1d __handleUncaughtException + 749
5   libobjc.A.dylib                 0x0224ab5c _objc_terminate() + 100
6   libc++abi.dylib                 0x02a5bf60 std::__terminate(void (*)()) + 14
7   libc++abi.dylib                 0x02a5b97d __cxa_throw + 116
8   libobjc.A.dylib                 0x0224a9cd objc_exception_throw + 323
9   CoreFoundation                  0x005673bb +[NSException raise:format:] + 139
10  UIAutomation                    0x00cbdf54 +[UIAXElement initializeAccessibility] +    668
11  UIAutomation                    0x00cc1361 +[UIAXElement uiaxSystemWideElement] + 37
12  UIAutomation                    0x00cd76d3 -[UIATarget init] + 317
13  UIAutomation                    0x00cd758a +[UIATarget localTarget] + 65
14  ScriptAgent                     0x0000ae25 0x1000 + 40485
15  ScriptAgent                     0x00005e85 0x1000 + 20101
16  ScriptAgent                     0x00008887 0x1000 + 30855
17  libdyld.dylib                   0x02d5e70d start + 1

所以我用 Xcode 5.0 中的 iPhoneSimulator7.0.sdk 替换了 iPhoneSimulator7.0.sdk,然后这个问题就解决了。但我不确定这种替换是否有任何副作用。

于 2013-11-12T10:35:22.930 回答