51Testing软件测试论坛

标题: Appium 启动 iOS 真机 app 后无限重启 [打印本页]

作者: 测试积点老人    时间: 2019-6-21 09:57
标题: Appium 启动 iOS 真机 app 后无限重启
现象:用AppiumDesktop启动iOS APP(今日头条),APP可以启动但打开后立即关闭并重启,无限循环。。。
Appium版本:v1.12.1
Xcode版本:10.2
传参如下:
  1. "platformName": "iOS",
  2. "deviceName": "iPhone",
  3. "app": "com.ss.iphone.article.News",
  4. "udid": "xxxxxxxxxxxxx",
  5. "automationName": "XCUITest",
  6. "platformVersion": "12.1.2"
复制代码
【Appium日志】
  1. [info] [35m[Appium][39m Welcome to Appium v1.12.1
  2. [info] [35m[Appium][39m Appium REST http interface listener started on 0.0.0.0:4723[info] [35m[HTTP][39m [37m-->[39m [37mGET[39m [37m/wd/hub/sessions[39m
  3. [info] [35m[HTTP][39m [90m{}[39m
  4. [debug] [35m[GENERIC][39m Calling AppiumDriver.getSessions() with args: []
  5. [debug] [35m[GENERIC][39m Responding to client with driver.getSessions() result: []
  6. [info] [35m[HTTP][39m [37m<-- GET /wd/hub/sessions [39m[32m200[39m [90m1 ms - 40[39m
  7. [info] [35m[HTTP][39m [90m[39m[info] [35m[HTTP][39m [37m-->[39m [37mPOST[39m [37m/wd/hub/session[39m
  8. [info] [35m[HTTP][39m [90m{"desiredCapabilities":{"app":"com.ss.iphone.article.News","automationName":"XCUITest","deviceName":"iPhone","platformName":"iOS","udid":"xxxxxxx","newCommandTimeout":0,"connectHardwareKeyboard":true}}[39m
  9. [debug] [35m[MJSONWP][39m Calling AppiumDriver.createSession() with args: [{"app":"com.ss.iphone.article.News","automationName":"XCUITest","deviceName":"iPhone","platformName":"iOS","udid":"xxxxxxx","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
  10. [debug] [35m[BaseDriver][39m Event 'newSessionRequested' logged at 1555580726853 (17:45:26 GMT+0800 (CST))
  11. [info] [35m[Appium][39m Appium v1.12.1 creating new XCUITestDriver (v2.110.1) session
  12. [info] [35m[Appium][39m Capabilities:
  13. [info] [35m[Appium][39m app: com.ss.iphone.article.News
  14. [info] [35m[Appium][39m automationName: XCUITest
  15. [info] [35m[Appium][39m deviceName: iPhone
  16. [info] [35m[Appium][39m platformName: iOS
  17. [info] [35m[Appium][39m udid: xxxxxxx
  18. [info] [35m[Appium][39m newCommandTimeout: 0
  19. [info] [35m[Appium][39m connectHardwareKeyboard: true
  20. [debug] [35m[BaseDriver][39m Creating session with MJSONWP desired capabilities: {"app":"com.ss.iphone.artic...
  21. [info] [35m[BaseDriver][39m Session created with session id: 94c9fe84-1275-4b38-8b5f-b262da01a702
  22. [debug] [35m[XCUITest][39m Current user: 'boyue'
  23. [error] [35m[XCUITest][39m Error: 'undefined' cannot be coerced to a valid version number
  24. [error] [35m[XCUITest][39m at coerceVersion (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-support/lib/util.js:241:11)
  25. [error] [35m[XCUITest][39m at Object.coerceVersion as compareVersions
  26. [error] [35m[XCUITest][39m at XCUITestDriver.compareVersions as start
  27. [debug] [35m[XCUITest][39m Not clearing log files. Use clearSystemFiles capability to turn on.
  28. [debug] [35m[BaseDriver][39m Event 'newSessionStarted' logged at 1555580726869 (17:45:26 GMT+0800 (CST))
  29. [debug] [35m[MJSONWP][39m Encountered internal error running command: Error: 'undefined' cannot be coerced to a valid version number
  30. [debug] [35m[MJSONWP][39m at coerceVersion (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-support/lib/util.js:241:11)
  31. [debug] [35m[MJSONWP][39m at Object.coerceVersion as compareVersions
  32. [debug] [35m[MJSONWP][39m at XCUITestDriver.compareVersions as start
  33. [info] [35m[HTTP][39m [37m<-- POST /wd/hub/session [39m[31m500[39m [90m18 ms - 192[39m
  34. [info] [35m[HTTP][39m [90m[39m
  35. [info] [35m[HTTP][39m [37m-->[39m [37mDELETE[39m [37m/wd/hub/session[39m
  36. [info] [35m[HTTP][39m [90m{}[39m
  37. [debug] [35m[HTTP][39m No route found. Setting content type to 'text/plain'
  38. [info] [35m[HTTP][39m [37m<-- DELETE /wd/hub/session [39m[33m404[39m [90m3 ms - 57[39m
  39. [info] [35m[HTTP][39m [90m[39m[info] [35m[HTTP][39m [37m-->[39m [37mPOST[39m [37m/wd/hub/session[39m
  40. [info] [35m[HTTP][39m [90m{"desiredCapabilities":{"app":"com.ss.iphone.article.News","automationName":"XCUITest","deviceName":"iPhone","platformName":"iOS","platformVersion":"12.1.2","udid":"xxxxxxx","newCommandTimeout":0,"connectHardwareKeyboard":true}}[39m
  41. [debug] [35m[MJSONWP][39m Calling AppiumDriver.createSession() with args: [{"app":"com.ss.iphone.article.News","automationName":"XCUITest","deviceName":"iPhone","platformName":"iOS","platformVersion":"12.1.2","udid":"xxxxxxx","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
  42. [debug] [35m[BaseDriver][39m Event 'newSessionRequested' logged at 1555580794500 (17:46:34 GMT+0800 (CST))
  43. [info] [35m[Appium][39m Appium v1.12.1 creating new XCUITestDriver (v2.110.1) session
  44. [info] [35m[Appium][39m Capabilities:
  45. [info] [35m[Appium][39m app: com.ss.iphone.article.News
  46. [info] [35m[Appium][39m automationName: XCUITest
  47. [info] [35m[Appium][39m deviceName: iPhone
  48. [info] [35m[Appium][39m platformName: iOS
  49. [info] [35m[Appium][39m platformVersion: 12.1.2
  50. [info] [35m[Appium][39m udid: xxxxxxx
  51. [info] [35m[Appium][39m newCommandTimeout: 0
  52. [info] [35m[Appium][39m connectHardwareKeyboard: true
  53. [debug] [35m[BaseDriver][39m Creating session with MJSONWP desired capabilities: {"app":"com.ss.iphone.artic...
  54. [info] [35m[BaseDriver][39m Session created with session id: bdd73922-7fc4-440e-84e9-788031a497f7
  55. [debug] [35m[XCUITest][39m Current user: 'boyue'
  56. [debug] [35m[XCUITest][39m Available devices: xxxxxxx
  57. [debug] [35m[XCUITest][39m Creating iDevice object with udid 'xxxxxxx'
  58. [info] [35m[XCUITest][39m Determining device to run tests on: udid: 'xxxxxxx', real device: true[info] [35m[XCUITest][39m Xcode version set to '10.2' (tools v10.2.0.0.1.1552586384)
  59. [info] [35m[XCUITest][39m iOS SDK Version set to '12.2'
  60. [debug] [35m[BaseDriver][39m Event 'xcodeDetailsRetrieved' logged at 1555580794720 (17:46:34 GMT+0800 (CST))
  61. [debug] [35m[XCUITest][39m App is an iOS bundle, will attempt to run as pre-existing
  62. [debug] [35m[BaseDriver][39m Event 'appConfigured' logged at 1555580794721 (17:46:34 GMT+0800 (CST))
  63. [debug] [35m[BaseDriver][39m Event 'resetStarted' logged at 1555580794721 (17:46:34 GMT+0800 (CST))
  64. [debug] [35m[XCUITest][39m Reset: running ios real device reset flow
  65. [debug] [35m[BaseDriver][39m Event 'resetComplete' logged at 1555580794722 (17:46:34 GMT+0800 (CST))
  66. [debug] [35m[iOSLog][39m Attempting iOS device log capture via libimobiledevice idevicesyslog
  67. [debug] [35m[iOSLog][39m Starting iOS device log capture with: 'idevicesyslog'[debug] [35m[XCUITest][39m Crash reports root '/Users/boyue/Library/Logs/CrashReporter/MobileDevice/胡雷廷的 iPhone' does not exist. Got nothing to gather.
  68. [debug] [35m[BaseDriver][39m Event 'logCaptureStarted' logged at 1555580794902 (17:46:34 GMT+0800 (CST))
  69. [info] [35m[XCUITest][39m Setting up real device[info] [35m[XCUITest][39m Using WDA path: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
  70. [info] [35m[XCUITest][39m Using WDA agent: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'[debug] [35m[XCUITest][39m No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
  71. [debug] [35m[WD Proxy][39m Matched '/status' to command name 'getStatus'
  72. [debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://localhost:8100/status] with no body
  73. [warn] [35m[WD Proxy][39m Got an unexpected response: {"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":8100}
  74. [debug] [35m[XCUITest][39m WDA is not listening at 'http://localhost:8100/'
  75. [debug] [35m[XCUITest][39m WDA is currently not running. There is nothing to cache
  76. [debug] [35m[XCUITest][39m Trying to start WebDriverAgent 1 times with 10000ms interval
  77. [debug] [35m[XCUITest][39m These values can be customized by changing wdaStartupRetries/wdaStartupRetryInterval capabilities
  78. [debug] [35m[BaseDriver][39m Event 'wdaStartAttempted' logged at 1555580795415 (17:46:35 GMT+0800 (CST))
  79. [info] [35m[XCUITest][39m Launching WebDriverAgent on the device
  80. [debug] [35m[XCUITest][39m Carthage found: '/usr/local/bin/carthage'
  81. [debug] [35m[XCUITest][39m Killing running processes 'xcodebuild.xxxxxxx, iproxy 8100' for the device xxxxxxx...
  82. [debug] [35m[XCUITest][39m 'pgrep -nif xcodebuild.*xxxxxxx' didn't detect any matching processes. Return code: 1
  83. [debug] [35m[XCUITest][39m 'pgrep -nif iproxy 8100' didn't detect any matching processes. Return code: 1
  84. [debug] [35m[XCUITest][39m Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB for the device xxxxxxx[debug] [35m[XCUITest][39m Beginning test with command 'xcodebuild build-for-testing test-without-building -project /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=xxxxxxx IPHONEOS_DEPLOYMENT_TARGET=12.1 GCC_TREAT_WARNINGS_AS_ERRORS=0' in directory '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
  85. [debug] [35m[XCUITest][39m Output from xcodebuild will not be logged. To change this, use 'showXcodeLog' desired capability[debug] [35m[XCUITest][39m Waiting up to 60000ms for WebDriverAgent to start
  86. [debug] [35m[WD Proxy][39m Matched '/status' to command name 'getStatus'
  87. [debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://localhost:8100/status] with no body
  88. [debug] [35m[WD Proxy][39m Got response with status 200: "{\n \"value\" : {\n \"state\" : \"success\",\n \"os\" : {\n \"name\" : \"iOS\",\n \"version\" : \"12.1.2\"\n },\n \"ios\" : {\n \"simulatorVersion\" : \"12.1.2\",\n \"ip\" : \"192.168.202.11\"\n },\n \"build\" : {\n \"time\" : \"Apr 18 2019 17:20:50\"\n }\n },\n \"sessionId\" : \"3637A001-7E19-4899-B0C6-C9874ED9C1B8\",\n \"status\" : 0\n}"
  89. [debug] [35m[XCUITest][39m WebDriverAgent information:
  90. [debug] [35m[XCUITest][39m {
  91. [debug] [35m[XCUITest][39m "state": "success",
  92. [debug] [35m[XCUITest][39m "os": {
  93. [debug] [35m[XCUITest][39m "name": "iOS",
  94. [debug] [35m[XCUITest][39m "version": "12.1.2"
  95. [debug] [35m[XCUITest][39m },
  96. [debug] [35m[XCUITest][39m "ios": {
  97. [debug] [35m[XCUI
复制代码



作者: abcsell    时间: 2019-6-24 10:11
学习
作者: qqq911    时间: 2019-6-24 10:34
日志不完整
作者: 梦想家    时间: 2019-6-24 10:59
日志不完整
作者: jingzizx    时间: 2019-6-24 11:17
版本控制不对?




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2