• 我用的 mac 电脑,然后把相应的日志生成路径改了之后,运行你的 demo,发现在 MacacaServer.py 文件中报错:

    wait macaca server all ready...
    wait macaca server all ready...
    macaca server all ready
    Traceback (most recent call last):
    File "run_all_cases.py", line 13, in
    Drivers().run(cases)
    File "../Public/Drivers.py", line 78, in run
    macaca_server.start_server()
    File "../Public/MacacaServer.py", line 47, in start_server
    with open(file, 'r') as f:
    IOError: [Errno 2] No such file or directory: '/Users/bita/Downloads/macacatest-master/TestReport/2017-07-11_11_47_53-4LWCAY9T99999999/macaca_server_port_3456.log'

    实际上我看到生成的路径/Users/bita/Downloads/macacatest-master/TestReport/2017-07-11_11_47_53-4LWCAY9T99999999/直到这个目录都能正常生成,但是 macaca_server_port_3456.log 这个文件在相应的路径下没有,我是不是还有哪个地方没改对?

    另外,我在 macaca server --verbose 中看到的数据

    responseHandler.js:11:12 [master] pid:2002 Recieve HTTP Request from Client[2017-07-11 11:48:08]: method: GET url: /wd/hub/status, jsonBody: {}
    responseHandler.js:47:14 [master] pid:2002 Send HTTP Respone to Client[2017-07-11 11:48:08]: {"sessionId":"","status":0,"value":"{\"build\":{},\"os\":{\"arch\":\"x64\",\"name\":\"darwin\",\"version\":\"\"}}"}

    jsonBody 这块的值都为空,正常我们运行单个用例时 Recieve HTTP Request from Client,不都是 Post 方法吗?但是你这个运行的是 get 方法,我不确认是不是 get 方法的原因导致 jsonbody 值取不到?

  • 为什么没有 Python 的报告生成文档呢,唉....

  • #12 楼 @mercynoo 那你把环境什么的删了,重新部属一次,估计能行。反正 ios9 上我怎么都弄不好,昨天把环境什么的全删了,重新部署了一次,现在换 ios10 的手机就好了。不过跑 case 跑结束时,也会出 socket hang up,但是之前写的 case 能跑了。

  • #8 楼 @mercynoo 解决了..是这个不支持 ios9 的手机,把手机升级 ios10 就行了。😭

  • #8 楼 @mercynoo 没解决,后来把 macaca 相关的全部删了,然后重新部署也没用,还是报那个错...之前写的 case 都跑不了了。

  • 我按照文档上 update 了,但是会报错
    Error: >> proxy.js:58:18 [master] pid:29343 xctest client proxy error with: Error: socket hang up

    更新完成后,我运行 macaca server --verbose 后去运行之前写的脚本,然后看到中间的 Log 有关于 WDA 的报错

    xctest-client.js:163:14 [master] pid:29035 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcodeproj
    xctest-client.js:162:14 [master] pid:29035 2016-11-08 17:08:29.011 xcodebuild[29049:597969] Error Domain=com.apple.dtdevicekit Code=-402652994 "App installation failed" UserInfo={NSLocalizedFailureReason=This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed., com.apple.dtdevicekit.stacktrace=(
    0 DTDeviceKitBase 0x00000001171f237b DTDKCreateNSError + 113
    1 DTDeviceKitBase 0x00000001171f2ab9 DTDK_AMDErrorToNSError + 791
    2 DTDeviceKitBase 0x00000001172329df __90-[DTDKRemoteDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 158
    3 DVTFoundation 0x000000010ffae9c9 DVTInvokeWithStrongOwnership + 75
    4 DTDeviceKitBase 0x0000000117232725 -[DTDKRemoteDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1181
    5 IDEiOSSupportCore 0x0000000117128f2f __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.336 + 4597
    6 DVTFoundation 0x00000001100d2ce7 __DVTDispatchAsync_block_invoke + 827
    7 libdispatch.dylib 0x00007fff96ba6f5f _dispatch_call_block_and_release + 12
    8 libdispatch.dylib 0x00007fff96b9e128 _dispatch_client_callout + 8
    9 libdispatch.dylib 0x00007fff96bb4b97 _dispatch_queue_serial_drain + 896
    10 libdispatch.dylib 0x00007fff96ba6d41 _dispatch_queue_invoke + 1046
    11 libdispatch.dylib 0x00007fff96b9fee0 _dispatch_root_queue_drain + 476
    12 libdispatch.dylib 0x00007fff96b9fcb7 _dispatch_worker_thread3 + 99
    13 libsystem_pthread.dylib 0x00007fff96deb736 _pthread_wqthread + 1299
    14 libsystem_pthread.dylib 0x00007fff96deb211 start_wqthread + 13
    ), NSLocalizedRecoverySuggestion=This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed., NSLocalizedDescription=App installation failed}
    xctest-client.js:163:14 [master] pid:29035 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcodeproj
    xctest-client.js:162:14 [master] pid:29035 2016-11-08 17:08:29.011 xcodebuild[29049:597969] Error Domain=IDETestOperationsObserverErrorDomain Code=5 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}

    xctest-client.js:163:14 [master] pid:29035 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcodeproj
    xctest-client.js:162:14 [master] pid:29035
    Testing failed:
    Test target WebDriverAgentRunner encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)
    ** TEST FAILED **

    然后我把真机上的 WDA 手动删了,这时候重装运行 macaca server --verbose,再去运行脚本时,依然报错,但是错误就变成了 socket hang up

    proxy.js:58:18 [master] pid:29035 xctest client proxy error with: Error: socket hang up
    /usr/local/lib/node_modules/macaca-ios/node_modules/xlogger/lib/xlogger.js:169
    throw new Error(res);
    ^

    Error: >> proxy.js:58:18 [master] pid:29035 xctest client proxy error with: Error: socket hang up
    at Logger.error (/usr/local/lib/node_modules/macaca-ios/node_modules/xlogger/lib/xlogger.js:169:9)
    at Request.request as _callback
    at self.callback (/usr/local/lib/node_modules/macaca-ios/node_modules/xctest-client/node_modules/request/request.js:199:22)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at Request.onRequestError (/usr/local/lib/node_modules/macaca-ios/node_modules/xctest-client/node_modules/request/request.js:821:8)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at Socket.socketOnEnd (_http_client.js:346:9)
    at emitNone (events.js:91:20)
    at Socket.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

  • 我装完了后运行不起来,老是闪退...logo 上也没发现有用的错误。

  • Macaca iOS 真机测试 at 2016年10月13日

    我 build 的时候报错了,我看了一下,npm i macaca-ios -g 里面确实没有 WebDriverAgentTests。 我能不能把 github 上https://github.com/facebook/WebDriverAgentcopy 下面直接放进去?的那个

    error: could not read data from '/usr/local/lib/node_modules/.macaca-ios_npminstall/node_modules/.1.0.28@webdriveragent/WebDriverAgent/WebDriverAgentTests/IntegrationApp/Info.plist': The file “Info.plist” couldn’t be opened because there is no such file.

    此问题已解决。

  • #33 楼 @Lihuazhang 那是说现在在 xcode8 和 ios10 上,appium1.5.3 已经不能用了吗?没有任何的解决方案了吗?我也是跑 case 的时候会报错 “[Xcode] Could not find Automation.tracetemplate in any of...”

  • #153 楼 @Lihuazhang
    出现的是这个提示,谢谢,我先自己研究下这个问题怎么解决。谢谢给出查找问题的思路。

  • #150 楼 @Lihuazhang

    这两个是我的设置,然后我的设备已经加到开发者机器里了,开发也给了我相应的证书,我也替换了,拿到了代码,从 xcode 上 build 了一个 app,Instruments 上调试过可以运行的,把 Instruments 全都关了。然后运行 appium,启动 inspector 时就弹如下的窗口,和我刚才发的日志。

  • #148 楼 @Lihuazhang 请问应该看什么地方,我完全是按照帖子上设置的。没有什么地方有变动,除了 app 的名称

  • #146 楼 @Lihuazhang 那这个设置在哪儿呀?我没有让重新装呀。

  • #144 楼 @Lihuazhang 我装了呀,我自己用 xcode build 的代码,从开发那里拿到的开发版

  • 安装时报错了 at 2016年09月19日

    #3 楼 @seveniruby 就是 *** 装的,报这个错...然后一直装不上

  • 2016-09-19 16:31:00:225 - [debug] [iOS] App is not installed. Will try to install.

    2016-09-19 16:31:00:683 - [MJSONWP] Encountered internal error running command: Error: Installing bitauto.app failed
    at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/node-idevice/main.js:159:6
    at ChildProcess.exithandler (child_process.js:193:7)
    at emitTwo (events.js💯13)
    at ChildProcess.emit (events.js:185:7)
    at maybeClose (internal/child_process.js:850:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)

    我装的是签名包,开发者证书什么都设置过了,但是运行的时候老是报这个错,提示我的 app 没安装...求解呀。

  • 安装时报错了 at 2016年09月05日

    #1 楼 @seveniruby
    粘错了,那个问题解决了,然后 *** 继续装,报的是下面的问题。

    bogon:~ bita$ npm install -g appium
    /usr/local/bin/authorize-ios -> /usr/local/lib/node_modules/appium/node_modules/.bin/authorize-ios
    /usr/local/bin/appium -> /usr/local/lib/node_modules/appium/build/lib/main.js

    appium-chromedriver@2.9.2 install /usr/local/lib/node_modules/appium/node_modules/appium-android-driver/node_modules/appium-chromedriver
    node install-npm.js

    info Chromedriver Install Installing Chromedriver version '2.21' for platform 'mac' and architecture '32'
    info Chromedriver Install Opening temp file to write chromedriver_mac32 to...
    info Chromedriver Install Downloading http://chromedriver.storage.googleapis.com/2.21/chromedriver_mac32.zip...
    info Chromedriver Install Writing binary content to /var/folders/20/50j7t2vs2cl00ctf7rrpjs3m0000gp/T/201685-11121-or0pej.rdkv1s8aor/chromedriver_mac32.zip...
    info Chromedriver Install Extracting /var/folders/20/50j7t2vs2cl00ctf7rrpjs3m0000gp/T/201685-11121-or0pej.rdkv1s8aor/chromedriver_mac32.zip to /var/folders/20/50j7t2vs2cl00ctf7rrpjs3m0000gp/T/201685-11121-or0pej.rdkv1s8aor/chromedriver_mac32
    Invalid or unsupported zip format. No END header found
    /usr/local/lib
    └── (empty)

    npm ERR! Darwin 15.6.0
    npm ERR! argv "/usr/local/Cellar/node/6.5.0/bin/node" "/usr/local/bin/npm" "install" "-g" "appium"
    npm ERR! node v6.5.0
    npm ERR! npm v3.10.3
    npm ERR! code ELIFECYCLE

    npm ERR! appium-chromedriver@2.9.2 install: node install-npm.js
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the appium-chromedriver@2.9.2 install script 'node install-npm.js'.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, this is most likely a problem with the appium-chromedriver package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR! node install-npm.js
    npm ERR! You can get information on how to open an issue for this project with:
    npm ERR! npm bugs appium-chromedriver
    npm ERR! Or if that isn't available, you can get their info via:
    npm ERR! npm owner ls appium-chromedriver
    npm ERR! There is likely additional logging output above.

    npm ERR! Please include the following file with any support request:
    npm ERR! /Users/bita/npm-debug.log
    npm ERR! code 1

  • #147 楼 @fengytn 解决了。好坑。设置错了。

  • 又报错了。
    2015-06-24 11:08:50.347 instruments[1510:64177] WebKit Threading Violation - initial use of WebKit from a secondary thread.
    2015-06-24 11:08:54.096 instruments[1510:64191] Automation Instrument ran into an exception while trying to run the script. UIAScriptAgentSignaledException
    2015-06-24 03:08:54 +0000 Fail: An error occurred while trying to run the script.
    Instruments Trace Complete (Duration : 3.619256s; Output : /Users/msc/CrashMonkey4IOS/bin/instrumentscli0.trace)
    Stop iOS system log capture.

  • Appium IOS 真机测试 iphone at 2015年06月03日

    #23 楼 @testly 能加 QQ 么?主要是 imac 机我以前没用过,我都不知道我配置得对不对.我的 QQ 184210176

  • Appium IOS 真机测试 iphone at 2015年06月02日

    #21 楼 @testly 奥,那我应该有其它的地方不对,我按你下面那个解决方案还是报错,我再研究下吧,谢谢哈

  • Appium IOS 真机测试 iphone at 2015年06月02日

    你这个问题是怎么解决的?

  • #107 楼 @vigossjjj 是说这个不能测发布包,只能测开发证书的包是么?

  • 我运行的时候为什么是一直报证书的错误,是哪里没有设置对吗?
    Target failed to run: Permission to debug com.tencent.mqq was denied. The app must be signed with a development identity (e.g. iOS Developer).

  • 安装了 selenium-2.45.0-Python,sudo python setup.py install 也成功了,但是运行时还会报错呀。

    mscdeMacBook-Pro:python msc$ python ios_simple.py
    Traceback (most recent call last):
    File "ios_simple.py", line 7, in
    from appium import webdriver
    ImportError: No module named appium