还未发布过话题
  • Macaca App Inspector 2.0 发布 at 2017年06月12日

    app inspector 的吗?可以呀,我这周找个时间总结下~~

    但是,大神,我想要用真机看下能不能把我们的 app launch 起来,还木有通。。囧。。。

    xctest-client.js:173:14 [master] pid:5319 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/_xctestwd@1.0.32@xctestwd/XCTestWD/XCTestWD.xcodeproj
    xctest-client.js:255:14 [master] pid:5319 killing deviceLogProc pid: 5328
    xctest-client.js:260:14 [master] pid:5319 killing runnerProc pid: 5331
    xctest-client.js:266:14 [master] pid:5319 killing iproxyProc pid: 5330
    xctest-client.js:183:14 [master] pid:5319 xctest client exit with code: 65, signal: null
    xctest-client.js:211:14 [master] pid:5319 iproxy exit with code: null, signal: SIGKILL
    xctest-client.js:145:16 [master] pid:5319 devicelog exit with code: null, signal: SIGKILL
    xctest-client.js:247:14 [master] pid:5319 Fail to start xctest: undefined
    responseHandler.js:54:12 [master] pid:5319 Send Error Respone to Client: undefined

    InternalServerError: Internal Server Error
    at Object.throw (/usr/local/lib/node_modules/macaca-cli/node_modules/koa/lib/context.js:91:23)
    at Object.module.exports (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/server/responseHandler.js:57:17)
    at module.exports.throw ()
    at onRejected (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:81:24)
    at process._tickCallback (internal/process/next_tick.js:109:7)

    1) "before all" hook

    responseHandler.js:11:12 [master] pid:5319 Recieve HTTP Request from Client[2017-06-12 14:39:56]: method: DELETE url: /wd/hub/session, jsonBody: {}
    responseHandler.js:23:14 [master] pid:5319 Send HTTP Respone to Client[2017-06-12 14:39:56]: 405 Method Not Allowed
    2) "after all" hook

    0 passing (3s)

    2 failing

    1) macaca mobile sample "before all" hook:
    Error: [init({"platformName":"iOS","autoAcceptAlerts":false,"udid":"xxxxx","bundleId":"com.xxxxx"})] The environment you requested was unavailable.
    at node_modules/macaca-wd/wd/lib/webdriver.js:134:15
    at Request._callback (node_modules/macaca-wd/wd/lib/http-utils.js:87:7)
    at Request.self.callback (node_modules/macaca-wd/node_modules/request/request.js:368:22)
    at Request. (node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

    2) macaca mobile sample "after all" hook:
    Error: [quit()] Unexpected data in simpleCallback.
    at exports.newError (node_modules/macaca-wd/wd/lib/utils.js:139:13)
    at PromiseWebdriver. (node_modules/macaca-wd/wd/lib/callbacks.js:42:12)
    at cb (node_modules/macaca-wd/wd/lib/webdriver.js:165:22)
    at node_modules/macaca-wd/wd/lib/webdriver.js:179:5
    at Request._callback (node_modules/macaca-wd/wd/lib/http-utils.js:87:7)
    at Request.self.callback (node_modules/macaca-wd/node_modules/request/request.js:368:22)
    at Request. (node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

  • Macaca App Inspector 2.0 发布 at 2017年06月12日

    手动处理 XCTestWD 工程的证书,设置下然后就会好了

  • Macaca2.0 升级公告 at 2017年06月11日

    我又重新执行了一下 sample 的例子,模拟器运行,发现也会出现差不多的错误;

    仔细回想了今天的操作,就是按照https://testerhome.com/topics/6503中说的执行了一下;
    重新装了下 uirecorder, 初始化了一下,想要真机运行,发现也会报错,提示 手机打开失败,请检查 macaca 是否配置正确;
    然后还按照https://testerhome.com/topics/7494说的运行了一下,但是都不好使;

    上周的时候还能投跑通模拟器,囧,莫非是我今天不小心执行什么操作给把环境整坏了?

    急需 @xdf 达峰大神指点迷津啊。。。

    下面是模拟器运行 demo 例子的结果:

    ✓ #4 should cover gestrure (26456ms)

    responseHandler.js:11:12 [master] pid:3079 Recieve HTTP Request from Client[2017-06-11 23:05:04]: method: POST url: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/elements, jsonBody: {"using":"name","value":"list"}
    proxy.js:55:14 [master] pid:3079 Proxy: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/elements:POST to http://localhost:8001/wd/hub/session/9EBEAB6A-C2A4-49C9-A18C-91BD2D444645/elements:POST with body: {"using":"name","value":"list"}
    proxy.js:83:20 [master] pid:3079 Got response with status 200: {"sessionId":"","status":0,"value":[{"ELEMENT":"EF475BF0-542F-47D1-BC2A-8BF6A6A761ED","label":"list","type":"XCUIElementTypeStaticText"},{"ELEMENT":"D0E3C3D6-5D86-4157-8A7E-CE3DFD1DAABD","label":""...
    session.js:107:14 [master] pid:3079 Send HTTP Respone to Client[2017-06-11 23:05:04]: {"sessionId":"","status":0,"value":"[{\"ELEMENT\":\"EF475BF0-542F-47D1-BC2A-8BF6A6A761ED\",\"label\":\"list\",\"type\":\"XCUIElementTypeStaticText\"},{\"ELEMENT\":\"D0E3C3D6-5D86-4157-8A7E-CE3DFD1DAABD\",\"label\":\"\",\"type\":\"XCUIElementTypeNavigationBar\"}]"}
    responseHandler.js:11:12 [master] pid:3079 Recieve HTTP Request from Client[2017-06-11 23:05:04]: method: POST url: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/element/EF475BF0-542F-47D1-BC2A-8BF6A6A761ED/click, jsonBody: {}
    proxy.js:55:14 [master] pid:3079 Proxy: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/element/EF475BF0-542F-47D1-BC2A-8BF6A6A761ED/click:POST to http://localhost:8001/wd/hub/session/9EBEAB6A-C2A4-49C9-A18C-91BD2D444645/element/EF475BF0-542F-47D1-BC2A-8BF6A6A761ED/click:POST with body: {}
    proxy.js:83:20 [master] pid:3079 Got response with status 200: {"sessionId":"","status":0,"value":""}
    session.js:107:14 [master] pid:3079 Send HTTP Respone to Client[2017-06-11 23:05:05]: {"sessionId":"","status":0,"value":""}
    responseHandler.js:11:12 [master] pid:3079 Recieve HTTP Request from Client[2017-06-11 23:05:06]: method: POST url: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/element, jsonBody: {"using":"name","value":"Webview"}
    proxy.js:55:14 [master] pid:3079 Proxy: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/element:POST to http://localhost:8001/wd/hub/session/9EBEAB6A-C2A4-49C9-A18C-91BD2D444645/element:POST with body: {"using":"name","value":"Webview"}
    proxy.js:83:20 [master] pid:3079 Got response with status 200: {"sessionId":"","status":0,"value":{"ELEMENT":"65019776-0E2A-4CA7-8A19-6F5BF687689B","label":"Webview","type":"XCUIElementTypeButton"}}
    session.js:107:14 [master] pid:3079 Send HTTP Respone to Client[2017-06-11 23:05:06]: {"sessionId":"","status":0,"value":"{\"ELEMENT\":\"65019776-0E2A-4CA7-8A19-6F5BF687689B\",\"label\":\"Webview\",\"type\":\"XCUIElementTypeButton\"}"}
    responseHandler.js:11:12 [master] pid:3079 Recieve HTTP Request from Client[2017-06-11 23:05:06]: method: POST url: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/element/65019776-0E2A-4CA7-8A19-6F5BF687689B/click, jsonBody: {}
    proxy.js:55:14 [master] pid:3079 Proxy: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/element/65019776-0E2A-4CA7-8A19-6F5BF687689B/click:POST to http://localhost:8001/wd/hub/session/9EBEAB6A-C2A4-49C9-A18C-91BD2D444645/element/65019776-0E2A-4CA7-8A19-6F5BF687689B/click:POST with body: {}
    proxy.js:83:20 [master] pid:3079 Got response with status 200: {"sessionId":"","status":0,"value":""}
    session.js:107:14 [master] pid:3079 Send HTTP Respone to Client[2017-06-11 23:05:06]: {"sessionId":"","status":0,"value":""}
    responseHandler.js:11:12 [master] pid:3079 Recieve HTTP Request from Client[2017-06-11 23:05:09]: method: GET url: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/screenshot, jsonBody: {}
    proxy.js:55:14 [master] pid:3079 Proxy: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/screenshot:GET to http://localhost:8001/wd/hub/session/9EBEAB6A-C2A4-49C9-A18C-91BD2D444645/screenshot:GET with body:
    proxy.js:83:20 [master] pid:3079 Got response with status 200: {"sessionId":"6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5","status":0,"value":"iVBORw0KGgoAAAANSUhEUgAAAu4AAAU2CAYAAADK1zMGAAAAAXNSR0IArs4c6QAAABxpRE9UAAAAAgAAAAAAAAKbAAAAKAAAApsAAAKbAADzX0Xg39YAAEAASURBV...
    responseHandler.js:47:14 [master] pid:3079 Send HTTP Respone to Client[2017-06-11 23:05:09]: {"sessionId":"6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5","status":0,"value":"\"iVBORw0KGgoAAAANSUhEUgAAAu4AAAU2CAYAAADK1zMGAAAAAXNSR0IArs4c6QAAABxpRE9UAAAAAgAAAAAAAAKbAAAAKAAAApsAAAKbAADzX0Xg39YAAEAASURBVHgB7J0F2OS29fXDzMwMG2yYGmZmaGADDXM2zNgwM2PDzAwNNMzMzMxQ0pef/9+daPTKNGPPzuwePc+u57VlST46lo6uruQhfvvtN6d/wkAcEAfEAXFAHBAHxAFxQBzobg4MoQrq7gpS/ah+xAFxQBwQB8QBcUAcEAfggIS7Zhw04yIOiAPigDggDogD4oA40AMckHDvgUrSKFujbHFAHBAHxAFxQBwQB8QBCXcJd42wxQFxQBwQB8QBcUAcEAd6gAMS7j1QSRpha4Qt..."}
    responseHandler.js:11:12 [master] pid:3079 Recieve HTTP Request from Client[2017-06-11 23:05:09]: method: GET url: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/contexts, jsonBody: {}
    { Error: Command failed: which ios_webkit_debug_proxy

    at ChildProcess.exithandler (child_process.js:205:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:194:7)
    at maybeClose (internal/child_process.js:899:16)
    at Socket. (internal/child_process.js:342:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at Pipe._handle.close as _onclose
    killed: false,
    code: 1,
    signal: null,
    cmd: 'which ios_webkit_debug_proxy' }

    responseHandler.js:54:12 [master] pid:3079 Send Error Respone to Client: Error: ios_webkit_debug_proxy not found, please install.
    responseHandler.js:60:14 [master] pid:3079 Error: ios_webkit_debug_proxy not found, please install.
    at WebkitProxy.start (/usr/local/lib/node_modules/macaca-ios/node_modules/_node-ios-webkit-debug-proxy@1.0.1@node-ios-webkit-debug-proxy/lib/node-ios-webkit-debug-proxy.js:37:13)
    at start.throw ()
    at onRejected (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:81:24)

    Error: ios_webkit_debug_proxy not found, please install.
    at WebkitProxy.start (/usr/local/lib/node_modules/macaca-ios/node_modules/_node-ios-webkit-debug-proxy@1.0.1@node-ios-webkit-debug-proxy/lib/node-ios-webkit-debug-proxy.js:37:13)
    at start.throw ()
    at onRejected (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:81:24)

    1) #5 should go into webview

    responseHandler.js:11:12 [master] pid:3079 Recieve HTTP Request from Client[2017-06-11 23:05:10]: method: GET url: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/contexts, jsonBody: {}
    remote-debugger.js:63:12 [master] pid:3079 Getting pages from url: http://localhost:null/json
    responseHandler.js:54:12 [master] pid:3079 Send Error Respone to Client: RequestError: Error: connect ECONNREFUSED 127.0.0.1:80
    responseHandler.js:60:14 [master] pid:3079 RequestError: Error: connect ECONNREFUSED 127.0.0.1:80
    at new RequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request-promise@2.0.1@request-promise/lib/errors.js:11:15)
    at Request.RP$callback as _callback
    at self.callback (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:188:22)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:191:7)
    at Request.onRequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:884:8)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:191:7)
    at Socket.socketErrorListener (_http_client.js:358:9)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at emitErrorNT (net.js:1284:8)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

    RequestError: Error: connect ECONNREFUSED 127.0.0.1:80
    at new RequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request-promise@2.0.1@request-promise/lib/errors.js:11:15)
    at Request.RP$callback as _callback
    at self.callback (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:188:22)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:191:7)
    at Request.onRequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:884:8)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:191:7)
    at Socket.socketErrorListener (_http_client.js:358:9)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at emitErrorNT (net.js:1284:8)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

    2) #6 should go into test

    responseHandler.js:11:12 [master] pid:3079 Recieve HTTP Request from Client[2017-06-11 23:05:10]: method: GET url: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/contexts, jsonBody: {}
    remote-debugger.js:63:12 [master] pid:3079 Getting pages from url: http://localhost:null/json
    responseHandler.js:54:12 [master] pid:3079 Send Error Respone to Client: RequestError: Error: connect ECONNREFUSED 127.0.0.1:80
    responseHandler.js:60:14 [master] pid:3079 RequestError: Error: connect ECONNREFUSED 127.0.0.1:80
    at new RequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request-promise@2.0.1@request-promise/lib/errors.js:11:15)
    at Request.RP$callback as _callback
    at self.callback (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:188:22)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:191:7)
    at Request.onRequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:884:8)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:191:7)
    at Socket.socketErrorListener (_http_client.js:358:9)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at emitErrorNT (net.js:1284:8)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

    RequestError: Error: connect ECONNREFUSED 127.0.0.1:80
    at new RequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request-promise@2.0.1@request-promise/lib/errors.js:11:15)
    at Request.RP$callback as _callback
    at self.callback (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:188:22)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:191:7)
    at Request.onRequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:884:8)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:191:7)
    at Socket.socketErrorListener (_http_client.js:358:9)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at emitErrorNT (net.js:1284:8)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

    3) #7 should works with web

    responseHandler.js:11:12 [master] pid:3079 Recieve HTTP Request from Client[2017-06-11 23:05:10]: method: GET url: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5/contexts, jsonBody: {}
    remote-debugger.js:63:12 [master] pid:3079 Getting pages from url: http://localhost:null/json
    responseHandler.js:54:12 [master] pid:3079 Send Error Respone to Client: RequestError: Error: connect ECONNREFUSED 127.0.0.1:80
    responseHandler.js:60:14 [master] pid:3079 RequestError: Error: connect ECONNREFUSED 127.0.0.1:80
    at new RequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request-promise@2.0.1@request-promise/lib/errors.js:11:15)
    at Request.RP$callback as _callback
    at self.callback (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:188:22)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:191:7)
    at Request.onRequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:884:8)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:191:7)
    at Socket.socketErrorListener (_http_client.js:358:9)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at emitErrorNT (net.js:1284:8)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

    RequestError: Error: connect ECONNREFUSED 127.0.0.1:80
    at new RequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request-promise@2.0.1@request-promise/lib/errors.js:11:15)
    at Request.RP$callback as _callback
    at self.callback (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:188:22)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:191:7)
    at Request.onRequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/_request@2.81.0@request/request.js:884:8)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:191:7)
    at Socket.socketErrorListener (_http_client.js:358:9)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at emitErrorNT (net.js:1284:8)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

    4) #8 should logout success

    responseHandler.js:11:12 [master] pid:3079 Recieve HTTP Request from Client[2017-06-11 23:05:11]: method: DELETE url: /wd/hub/session/6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5, jsonBody: {}
    macaca-ios.js:348:10 [master] pid:3079 Stoping iOS driver...
    xctest-client.js:255:14 [master] pid:3079 killing deviceLogProc pid: 3195
    xctest-client.js:260:14 [master] pid:3079 killing runnerProc pid: 3194
    macaca-ios.js:372:10 [master] pid:3079 iOS driver cleaned up.
    session.js:80:12 [master] pid:3079 Delete session, sessionId: 6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5
    responseHandler.js:47:14 [master] pid:3079 Send HTTP Respone to Client[2017-06-11 23:05:11]: {"sessionId":"6681ee88-a7b1-4da1-b6b6-eb2cdd5964b5","status":0}
    xctest-client.js:108:18 [master] pid:3079 simulator log process exit with code: null, signal: SIGKILL

    4 passing (2m)
    4 failing

    1) macaca mobile sample #5 should go into webview:
    Error: [contexts()] Not JSON response
    at exports.newError (node_modules/macaca-wd/wd/lib/utils.js:139:13)
    at node_modules/macaca-wd/wd/lib/callbacks.js:59:17
    at node_modules/macaca-wd/wd/lib/webdriver.js:179:5
    at Request._callback (node_modules/macaca-wd/wd/lib/http-utils.js:87:7)
    at Request.self.callback (node_modules/macaca-wd/node_modules/request/request.js:368:22)
    at Request. (node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

    2) macaca mobile sample #6 should go into test:
    Error: [contexts()] Not JSON response
    at exports.newError (node_modules/macaca-wd/wd/lib/utils.js:139:13)
    at node_modules/macaca-wd/wd/lib/callbacks.js:59:17
    at node_modules/macaca-wd/wd/lib/webdriver.js:179:5
    at Request._callback (node_modules/macaca-wd/wd/lib/http-utils.js:87:7)
    at Request.self.callback (node_modules/macaca-wd/node_modules/request/request.js:368:22)
    at Request. (node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

    3) macaca mobile sample #7 should works with web:
    Error: [contexts()] Not JSON response
    at exports.newError (node_modules/macaca-wd/wd/lib/utils.js:139:13)
    at node_modules/macaca-wd/wd/lib/callbacks.js:59:17
    at node_modules/macaca-wd/wd/lib/webdriver.js:179:5
    at Request._callback (node_modules/macaca-wd/wd/lib/http-utils.js:87:7)
    at Request.self.callback (node_modules/macaca-wd/node_modules/request/request.js:368:22)
    at Request. (node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

    4) macaca mobile sample #8 should logout success:
    Error: [contexts()] Not JSON response
    at exports.newError (node_modules/macaca-wd/wd/lib/utils.js:139:13)
    at node_modules/macaca-wd/wd/lib/callbacks.js:59:17
    at node_modules/macaca-wd/wd/lib/webdriver.js:179:5
    at Request._callback (node_modules/macaca-wd/wd/lib/http-utils.js:87:7)
    at Request.self.callback (node_modules/macaca-wd/node_modules/request/request.js:368:22)
    at Request. (node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

    xctest-client.js:183:14 [master] pid:3079 xctest client exit with code: null, signal: SIGKILL
    Test completed!

  • Macaca2.0 升级公告 at 2017年06月11日

    知道原因了,囧,这个是由于输入法的原因;

    建议大家都用 vs 来调试,可以比较清楚的看到错误地点; 囧。。。

    不过确实也无法在真机运行起来,报了新的错误:

    responseHandler.js:54:12 [master] pid:1669 Send Error Respone to Client: undefined

    InternalServerError: Internal Server Error
    at Object.throw (/usr/local/lib/node_modules/macaca-cli/node_modules/koa/lib/context.js:91:23)
    at Object.module.exports (/usr/local/lib/node_modules/macaca-cli/node_modules/webdriver-server/lib/server/responseHandler.js:57:17)
    at module.exports.throw ()
    at onRejected (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:81:24)
    at process._tickCallback (internal/process/next_tick.js:109:7)

    xctest-client.js:211:14 [master] pid:1669 iproxy exit with code: null, signal: SIGKILL
    1) "before all" hook

    responseHandler.js:11:12 [master] pid:1669 Recieve HTTP Request from Client[2017-06-11 22:35:30]: method: DELETE url: /wd/hub/session, jsonBody: {}
    responseHandler.js:23:14 [master] pid:1669 Send HTTP Respone to Client[2017-06-11 22:35:30]: 405 Method Not Allowed
    2) "after all" hook

    0 passing (4s)
    2 failing

    1) macaca mobile sample "before all" hook:
    Error: [init({"platformName":"iOS","autoAcceptAlerts":false,"udid":"xxxxxx","bundleId":"com.xxxxx"})] The environment you requested was unavailable.
    at node_modules/macaca-wd/wd/lib/webdriver.js:134:15
    at Request._callback (node_modules/macaca-wd/wd/lib/http-utils.js:87:7)
    at Request.self.callback (node_modules/macaca-wd/node_modules/request/request.js:368:22)
    at Request. (node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

    2) macaca mobile sample "after all" hook:
    Error: [quit()] Unexpected data in simpleCallback.
    at exports.newError (node_modules/macaca-wd/wd/lib/utils.js:139:13)
    at PromiseWebdriver. (node_modules/macaca-wd/wd/lib/callbacks.js:42:12)
    at cb (node_modules/macaca-wd/wd/lib/webdriver.js:165:22)
    at node_modules/macaca-wd/wd/lib/webdriver.js:179:5
    at Request._callback (node_modules/macaca-wd/wd/lib/http-utils.js:87:7)
    at Request.self.callback (node_modules/macaca-wd/node_modules/request/request.js:368:22)
    at Request. (node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

  • Macaca App Inspector 2.0 发布 at 2017年06月11日

    嗯嗯呐,好的嘞~~

    作为一个小白,正在 iOS 真机的道路上填坑,待我能够运行了自己的第一个 macaca 脚本,一定得总结一篇文档发给大家~~哈

  • Macaca2.0 升级公告 at 2017年06月11日

    iOS 真机,想要试一下是否可以 launch 起来测试 app,但是遇到了下面的错误,

    bundleId: ‘com.xxx.xxx’
    ^
    SyntaxError: Invalid or unexpected token
    at createScript (vm.js:53:10)
    at Object.runInThisContext (vm.js:95:10)
    at Module._compile (module.js:543:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at /Users/Cherry/sample-nodejs/node_modules/mocha/lib/mocha.js:230:27
    at Array.forEach (native)
    at Mocha.loadFiles (/Users/Cherry/sample-nodejs/node_modules/mocha/lib/mocha.js:227:14)
    at Mocha.run (/Users/Cherry/sample-nodejs/node_modules/mocha/lib/mocha.js:495:10)
    at Object. (/Users/Cherry/sample-nodejs/node_modules/mocha/bin/_mocha:460:18)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:423:7)
    at startup (bootstrap_node.js:147:9)
    at bootstrap_node.js:538:3

  • UIRecorder v2.4.0 正式发布 at 2017年06月11日

    我也遇到了跟你一样的错误,请问你后来解决了吗?

  • 我也遇到了下面的错误,
    手机打开失败,请检查 macaca 是否配置正确? Internal Server Error

    请问下大家都怎么处理的呢?

  • Macaca App Inspector 2.0 发布 at 2017年06月04日

    果然好了,多谢大神

  • Macaca App Inspector 2.0 发布 at 2017年06月04日

    cnpm i app-inspector@2 -g 升级后, 真机(iphone6,9.3.1)执行 app-inspector -u xxx --verbose 依然还是会报错 connect ECONNREFUSED

    request.js:24:12 [master] pid:14975 get remote update info failed.
    server.js:16:12 [master] pid:14975 server start with config:
    { port: 5678,
    verbose: true,
    udid: 'e1fb98775314bd9661fa9fbf3cf7c09759dc1c1b',
    ip: '192.168.1.109',
    host: 'cherrys-macbook.local',
    loaded_time: '2017-06-04 22:20:04' }
    app-inspector.js:43:12 [master] pid:14975 server start at: http://192.168.1.109:5678
    xctest-client.js:52:14 [master] pid:14975 project path: /usr/local/lib/node_modules/app-inspector/node_modules/_xctestwd@1.0.31@xctestwd/XCTestWD/XCTestWD.xcodeproj
    xctestwd start with port: 8001
    xctest-client.js:224:14 [master] pid:14975 xcode version: 8.3.2
    XCTestWD version: 1.0.31
    xctest-client.js:172:14 [master] pid:14975 2017-06-04 22:20:05.527 xcodebuild[14981:600541] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
    /Users/Cherry/Library/Developer/Xcode/DerivedData/XCTestWD-fgqqpeszdnmulmdsxhggovemcylb/Logs/Test/E3EA63B0-E89E-4B5D-9256-9B213F703E72/Session-XCTestWDUITests-2017-06-04_222005-L7a4k8.log

    xctest-client.js:173:14 [master] pid:14975 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/_xctestwd@1.0.31@xctestwd/XCTestWD/XCTestWD.xcodeproj
    xctest-client.js:172:14 [master] pid:14975 2017-06-04 22:20:05.527 xcodebuild[14981:600529] [MT] IDETestOperationsObserverDebug: (E3D06910-6758-45EC-982D-39D70E767360) Beginning test session XCTestWDUITests-E3D06910-6758-45EC-982D-39D70E767360 at 2017-06-04 22:20:05.527 with Xcode 8E2002 on target {
    deviceSerialNumber: F78P75SNG5MP
    identifier: e1fb98775314bd9661fa9fbf3cf7c09759dc1c1b
    deviceClass: iPhone
    deviceName: iPhone
    deviceIdentifier: e1fb98775314bd9661fa9fbf3cf7c09759dc1c1b
    productVersion: 9.3.1
    buildVersion: 13E238
    deviceSoftwareVersion: 9.3.1 (13E238)
    deviceArchitecture: arm64
    deviceTotalCapacity: 12757483520
    deviceAvailableCapacity: 8515231744
    deviceIsTransient: NO
    ignored: NO
    deviceIsBusy: NO
    deviceIsActivated: YES
    deviceActivationState: Activated
    isPasscodeLocked: NO
    deviceType:
    supportedDeviceFamilies: (
    1
    )
    applications: (null)
    provisioningProfiles: (null)
    activityProgress: -2
    activityTitle:

    hasInternalSupport: NO
    isSupportedOS: YES
    developerDiskMountError: (null)
    (null)
    bootArgs:
    } (9.3.1 (13E238))

    xctest-client.js:173:14 [master] pid:14975 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/_xctestwd@1.0.31@xctestwd/XCTestWD/XCTestWD.xcodeproj
    xctest-client.js:172:14 [master] pid:14975 2017-06-04 22:20:05.776 xcodebuild[14981:600529] Error Domain=IDETestOperationsObserverErrorDomain Code=4 "Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/Cherry/Library/Developer/Xcode/DerivedData/XCTestWD-fgqqpeszdnmulmdsxhggovemcylb/Logs/Test/E3EA63B0-E89E-4B5D-9256-9B213F703E72/Session-XCTestWDUITests-2017-06-04_222005-L7a4k8.log" UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/Cherry/Library/Developer/Xcode/DerivedData/XCTestWD-fgqqpeszdnmulmdsxhggovemcylb/Logs/Test/E3EA63B0-E89E-4B5D-9256-9B213F703E72/Session-XCTestWDUITests-2017-06-04_222005-L7a4k8.log}

    xctest-client.js:173:14 [master] pid:14975 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/_xctestwd@1.0.31@xctestwd/XCTestWD/XCTestWD.xcodeproj
    xctest-client.js:172:14 [master] pid:14975
    Testing failed:
    Signing for "XCTestWD" requires a development team. Select a development team in the project editor.
    Code signing is required for product type 'Application' in SDK 'iOS 10.3'
    Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/Cherry/Library/Developer/Xcode/DerivedData/XCTestWD-fgqqpeszdnmulmdsxhggovemcylb/Logs/Test/E3EA63B0-E89E-4B5D-9256-9B213F703E72/Session-XCTestWDUITests-2017-06-04_222005-L7a4k8.log

    xctest-client.js:173:14 [master] pid:14975 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/_xctestwd@1.0.31@xctestwd/XCTestWD/XCTestWD.xcodeproj
    xctest-client.js:172:14 [master] pid:14975 ** TEST FAILED **

    The following build commands failed:
    Check dependencies
    (1 failure)

    xctest-client.js:173:14 [master] pid:14975 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/_xctestwd@1.0.31@xctestwd/XCTestWD/XCTestWD.xcodeproj
    xctest-client.js:255:14 [master] pid:14975 killing deviceLogProc pid: 14978
    xctest-client.js:260:14 [master] pid:14975 killing runnerProc pid: 14981
    xctest-client.js:266:14 [master] pid:14975 killing iproxyProc pid: 14980
    xctest-client.js:183:14 [master] pid:14975 xctest client exit with code: 65, signal: null
    xctest-client.js:211:14 [master] pid:14975 iproxy exit with code: null, signal: SIGKILL
    xctest-client.js:145:16 [master] pid:14975 devicelog exit with code: null, signal: SIGKILL
    xctest-client.js:247:14 [master] pid:14975 Fail to start xctest: undefined
    undefined
    iOS device started: e1fb98775314bd9661fa9fbf3cf7c09759dc1c1b
    inspector start at: http://192.168.1.109:5678
    <-- GET /
    helper.js:97:16 [master] pid:14975 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8001

    Error: connect ECONNREFUSED 127.0.0.1:8001
    at Object.exports._errnoException (util.js:1034:11)
    at exports._exceptionWithHostPort (util.js:1057:20)
    at TCPConnectWrap.afterConnect as oncomplete