Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 真机运行失败 #42

Closed
ftvbftvbq opened this issue May 10, 2016 · 47 comments
Closed

iOS 真机运行失败 #42

ftvbftvbq opened this issue May 10, 2016 · 47 comments
Assignees

Comments

@ftvbftvbq
Copy link

ftvbftvbq commented May 10, 2016

真机调试文档

遇到iOS真机问题(证书问题为主),请看如下文章

@xudafeng
Copy link
Member

@ftvbftvbq 你是测试什么流程?

@xudafeng xudafeng changed the title No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) matching the bundle identifier “com.facebook.xctweb-driver-agent” were found. No provisioning profiles with a valid signing identity May 10, 2016
@ftvbftvbq
Copy link
Author

我没有测试很复杂的流程,我本意是想打开app,点击一个按钮,我早上全局安装了webpack,这个有影响吗?这个东西我自己要用,昨天还是正常的,没有问题,我看到runner和另外一个在真机上安装成功过的。

@ftvbftvbq
Copy link
Author

我升级xcode到最新版,不知道能不能解决,等我最新回复吧,下载需要时间。

@ftvbftvbq
Copy link
Author

ftvbftvbq commented May 10, 2016

全部代码贴一下,其实是按照那个真机贴在改的:

const path = require('path');
const wd = require('wd');

describe('MXD mobile DEMO1', function() {
  this.timeout(5 * 60 * 1000); // mocha 设置超时时间

  var driver = wd.promiseChainRemote({ // 初始化 webdriver
    host: 'localhost',
    port: 3456
  });

  before(function() { // iOS需要传 udid 和 bundleId
    return driver.init({
      platformName: 'iOS',
      udid: 'xxxxxxxx', //这里我都填写了正确的信息,考虑到隐私性,这里不写出来,实际没问题
      bundleId: 'xxxxxxxxx'
    });
  });

  it('#1 test', function() { 
    return driver
          .elementByNameIfExists('我')
          .elementByName('我')
          .click();
  });

  after(function() { // 所有测试用例的统一后置动作
    return driver
      .sleep(1000)
      .quit();
  });
});

@xudafeng
Copy link
Member

@ftvbftvbq 与webpack没任何关系奥

@ftvbftvbq
Copy link
Author

除了我目前升级xcode外,还有其他fix issue的建议吗?

@ftvbftvbq
Copy link
Author

xcode已经升级到最新,还行报错,No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) matching the bundle identifier “com.facebook.xctweb-driver-agent” were found.

@ftvbftvbq
Copy link
Author

这个问题是provisioning file导致,如果签名下加了设备就需要在preferance--account中点击 view detail,然后,重新download下所有的数据到本地来就解决了,谢谢!那个帖子上的问题我也回复下。

@ziczhu
Copy link
Member

ziczhu commented May 10, 2016

@ftvbftvbq 欢迎把解决方式具体说明一下,我们可以把这个问题放到 FAQ 里面,谢谢使用!

@ftvbftvbq
Copy link
Author

这个问题导致的原因主要是很多人共用一个帐户,然后,有人后来在证书下加了设备,而你本地这些证书没有更新到最新的,导致的这个报错;解决方法已经在上面提到过了:如果签名下加了设备就需要在preferance--account中点击 view detail,然后,重新download下所有的数据到本地来就解决了,谢谢!

@xudafeng xudafeng reopened this Jun 7, 2016
@xudafeng
Copy link
Member

xudafeng commented Jun 7, 2016

@xudafeng xudafeng changed the title No provisioning profiles with a valid signing identity iOS 真机问题 Jun 7, 2016
@diaojunxian
Copy link

diaojunxian commented Jun 7, 2016

hi,我通过执行 macaca run --rebose出现报错`>> xctest-client.js:219:14 [master] pid:5762 2016-06-07 13:05:49.184 xcodebuild[5820:606252] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/djx/Library/Developer/Xcode/DerivedData/WebDriverAgent-dgapfvuoqjmpyehcyyvidqwjgymp/Logs/Test/35444B56-E5B2-4BDB-AC05-57432CC2C0C2/Session-2016-06-07_13:05:49-sfvLju.log

xctest-client.js:219:14 [master] pid:5762
Testing failed:
Implicit conversion loses floating-point precision: 'double _Nullable' to 'CGFloat' (aka 'float')

xctest-client.js:219:14 [master] pid:5762 Implicit conversion loses floating-point precision: 'double _Nullable' to 'CGFloat' (aka 'float')
Implicit conversion loses floating-point precision: 'double _Nullable' to 'CGFloat' (aka 'float')
Implicit conversion loses floating-point precision: 'double _Nullable' to 'CGFloat' (aka 'float')
Implicit conversion loses floating-point precision: 'double _Nullable' to 'CGFloat' (aka 'float')
Implicit conversion increases floating-point precision: 'CGFloat' (aka 'float') to 'NSTimeInterval' (aka 'double')
Implicit conversion loses floating-point precision: 'double _Nullable' to 'CGFloat' (aka 'float')
Implicit conversion loses floating-point precision: 'double _Nullable' to 'CGFloat' (aka 'float')
** TEST FAILED **

The following build commands failed:
CompileC /Users/djx/Library/Developer/Xcode/DerivedData/WebDriverAgent-dgapfvuoqjmpyehcyyvidqwjgymp/Build/Intermediates/WebDriverAgent.build/Debug-iphoneos/XCTWebDriverAgentLib.build/Objects-normal/armv7/FBElementCommands.o XCTWebDriverAgentLib/Commands/FBElementCommands.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

我的脚本也很简单

const path = require('path');
const wd = require('wd');

describe('macaca mobile sample', function() {
  this.timeout(5 * 60 * 1000); // mocha 设置超时时间

  var driver = wd.promiseChainRemote({ // 初始化 webdriver
    host: 'localhost',
    port: 3456
  });

  before(function() { // 与 Android 最大不同是无需指定 APP 的路径,需要传 udid 和 bundleId
    return driver.init({ 
      platformName: 'ios',
      deviceName: 'iPod touch(2)',
      platformVersion: '9.3.2',
      udid: 'xx',
      bundleId: 'xx'
    });
  });

  after(function() { // 所有测试用例的统一后置动作
    return driver 
      .sleep(1000)
      .quit();
  });

  it('#1 should login success', function() { // 测试一下 login
    return driver
        .waitForElementByName('发现')
        .click()
        .sleep(1000)
        .waitForElementByName('智玩')
        .click()
        .sleep(5000);
  });

});

@xudafeng
Copy link
Member

xudafeng commented Jun 7, 2016

@diaojunxian 是小米手环团队,主要依赖蓝牙功能,所以真机这边需要处理下 @brunoyang

@diaojunxian
Copy link

diaojunxian commented Jun 7, 2016

不好意思,重贴一下,完全模仿官方例子

const path = require('path');
const wd = require('wd');

describe('macaca mobile sample', function() {
  this.timeout(5 * 60 * 1000); // mocha 设置超时时间

  var driver = wd.promiseChainRemote({ // 初始化 webdriver
    host: 'localhost',
    port: 3456
  });

  before(function() { // 与 Android 最大不同是无需指定 APP 的路径,需要传 udid 和 bundleId
    return driver.init({ 
      platformName: 'ios',
      deviceName: 'iPod touch(2)',
      platformVersion: '9.3.2',
      udid: 'xx',
      bundleId: 'xx'
    });
  });

  after(function() { // 所有测试用例的统一后置动作
    return driver 
      .sleep(1000)
      .quit();
  });

  it('#1 should login success', function() { // 测试一下 login
    return driver
        .waitForElementByName('发现')
        .click()
        .sleep(1000)
        .waitForElementByName('智玩')
        .click()
        .sleep(5000);
  });

});

@xudafeng
Copy link
Member

@brunoyang 这个怎么样了啊

@xudafeng xudafeng changed the title iOS 真机问题 iOS 真机证书问题 Jun 13, 2016
@brunoyang
Copy link
Member

@diaojunxian 尝试一下

  • 报错信息:No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) matching the bundle identifier "com.facebook.xctweb-driver-agent" were found.
  • 原因:多人公用一个账户,其他人往该账户下添加设备后,本地没有更新证书到最新
  • 解决方案:点击 preferance => account => view detail => 更新证书即可

@diaojunxian
Copy link

@brunoyang 之前已解决试过,没有修复这个问题

@xudafeng
Copy link
Member

@diaojunxian 现在log可以贴一下吗

@diaojunxian
Copy link

@brunoyang

>> macaca-ios.js:132:10 [master] pid:7791 {
    "bundleId": "HM.wristband2",
    "platformName": "ios",
    "platformVersion": "9.3.2"
}
>> xctest-client.js:246:12 [master] pid:7791 xcode version: 7.3.1
>> xctest-client.js:219:14 [master] pid:7791 2016-06-13 15:07:36.050 xcodebuild[7800:625862] [MT] IDETestOperationsObserverDebug: (58BE1F8A-287C-4228-8A2B-F8E19359CF56) Beginning test session 58BE1F8A-287C-4228-8A2B-F8E19359CF56 with Xcode 7D1014 on target <DVTiOSDevice: 0x7f85005f8bc0> {
        deviceSerialNumber:         CCQN6EZ0G22Y
        identifier:                 5d2d323666d505449e9a67cbd3fccc8ff80baadf
        deviceClass:                iPod
        deviceName:                 iPod touch (2)
        deviceIdentifier:           5d2d323666d505449e9a67cbd3fccc8ff80baadf
        productVersion:             9.3.2
        buildVersion:               13F69
        deviceSoftwareVersion:      9.3.2 (13F69)
        deviceArchitecture:         armv7f
        deviceTotalCapacity:        13470396416
        deviceAvailableCapacity:    483987456
        deviceIsTransient:          NO
        ignored:                    NO
        deviceIsBusy:               NO
        deviceIsActivated:          YES
        deviceActivationState:      Activated
        deviceType:                 <DVTDeviceType:0x7f8502d45400 Xcode.DeviceType.iPhone>
        supportedDeviceFamilies:    (
    1
)
        applications:              (null)
        provisioningProfiles:      (null)
        activityProgress:          -2
        activityTitle:             
        hasInternalSupport:        NO
        isSupportedOS:             YES
        developerDiskMountError:   (null)
(null)
    } (9.3.2 (13F69))

>> xctest-client.js:219:14 [master] pid:7791 2016-06-13 15:07:36.051 xcodebuild[7800:625896]  IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/djx/Library/Developer/Xcode/DerivedData/WebDriverAgent-dgapfvuoqjmpyehcyyvidqwjgymp/Logs/Test/08813FB1-8EAD-4D24-96CC-8D58BA68BB44/Session-2016-06-13_15:07:36-hp5CAb.log

>> xctest-client.js:219:14 [master] pid:7791 
Testing failed:
    Implicit conversion loses floating-point precision: 'double' to 'CGFloat' (aka 'float')

>> xctest-client.js:219:14 [master] pid:7791    Implicit conversion increases floating-point precision: 'CGFloat' (aka 'float') to 'NSTimeInterval' (aka 'double')
** TEST FAILED **


The following build commands failed:
    CompileC /Users/djx/Library/Developer/Xcode/DerivedData/WebDriverAgent-dgapfvuoqjmpyehcyyvidqwjgymp/Build/Intermediates/WebDriverAgent.build/Debug-iphoneos/XCTWebDriverAgentLib.build/Objects-normal/armv7/FBCustomCommands.o XCTWebDriverAgentLib/Commands/FBCustomCommands.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

>> xctest-client.js:227:14 [master] pid:7791 xctest client exit with code: 65, signal: null
>> responseHandler.js:24:12 [master] pid:7791 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"platformName":"ios","deviceName":"iPod touch(2)","platformVersion":"9.3.2","udid":"5d2d323666d505449e9a67cbd3fccc8ff80baadf","bundleId":"HM.wristband2"}}
>> session.js:24:10 [master] pid:7791 Creating session, sessionId: 0e0b9986-b27e-4468-a930-c4e3709f1e62.
>> agent path: /usr/local/lib/node_modules/macaca-ios/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcworkspace
>> macaca-ios.js:132:10 [master] pid:7791 {
    "bundleId": "HM.wristband2",
    "platformName": "ios",
    "platformVersion": "9.3.2"
}
>> xctest-client.js:246:12 [master] pid:7791 xcode version: 7.3.1
>> xctest-client.js:219:14 [master] pid:7791 2016-06-13 15:09:22.942 xcodebuild[7825:626748] [MT] IDETestOperationsObserverDebug: (E89B3887-2D0D-4F9B-AFA8-4E5519927DC3) Beginning test session E89B3887-2D0D-4F9B-AFA8-4E5519927DC3 with Xcode 7D1014 on target <DVTiOSDevice: 0x7fc85d130940> {
        deviceSerialNumber:         CCQN6EZ0G22Y
        identifier:                 5d2d323666d505449e9a67cbd3fccc8ff80baadf
        deviceClass:                iPod
        deviceName:                 iPod touch (2)
        deviceIdentifier:           5d2d323666d505449e9a67cbd3fccc8ff80baadf
        productVersion:             9.3.2
        buildVersion:               13F69
        deviceSoftwareVersion:      9.3.2 (13F69)
        deviceArchitecture:         armv7f
        deviceTotalCapacity:        13470396416
        deviceAvailableCapacity:    483946496
        deviceIsTransient:          NO
        ignored:                    NO
        deviceIsBusy:               NO
        deviceIsActivated:          YES
        deviceActivationState:      Activated
        deviceType:                 <DVTDeviceType:0x7fc85cd418c0 Xcode.DeviceType.iPhone>
        supportedDeviceFamilies:    (
    1
)
        applications:              (null)
        provisioningProfiles:      (null)
        activityProgress:          -2
        activityTitle:             
        hasInternalSupport:        NO
        isSupportedOS:             YES
        developerDiskMountError:   (null)
(null)
    } (9.3.2 (13F69))

>> xctest-client.js:219:14 [master] pid:7791 2016-06-13 15:09:22.943 xcodebuild[7825:626771]  IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/djx/Library/Developer/Xcode/DerivedData/WebDriverAgent-dgapfvuoqjmpyehcyyvidqwjgymp/Logs/Test/27997A82-2F80-4C82-8D55-8B29F45B37F6/Session-2016-06-13_15:09:22-b3v8zl.log

>> xctest-client.js:219:14 [master] pid:7791 
Testing failed:

>> xctest-client.js:219:14 [master] pid:7791    Implicit conversion loses floating-point precision: 'double' to 'CGFloat' (aka 'float')
    Implicit conversion increases floating-point precision: 'CGFloat' (aka 'float') to 'NSTimeInterval' (aka 'double')
** TEST FAILED **


The following build commands failed:
    CompileC /Users/djx/Library/Developer/Xcode/DerivedData/WebDriverAgent-dgapfvuoqjmpyehcyyvidqwjgymp/Build/Intermediates/WebDriverAgent.build/Debug-iphoneos/XCTWebDriverAgentLib.build/Objects-normal/armv7/FBCustomCommands.o XCTWebDriverAgentLib/Commands/FBCustomCommands.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

>> xctest-client.js:227:14 [master] pid:7791 xctest client exit with code: 65, signal: null
>> responseHandler.js:24:12 [master] pid:7791 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"platformName":"ios","deviceName":"iPod touch(2)","platformVersion":"9.3.2","udid":"5d2d323666d505449e9a67cbd3fccc8ff80baadf","bundleId":"HM.wristband2"}}
>> session.js:24:10 [master] pid:7791 Creating session, sessionId: 1d643da3-0ad4-4d5b-bf6d-ac69d6c7aad7.
>> agent path: /usr/local/lib/node_modules/macaca-ios/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcworkspace
>> macaca-ios.js:132:10 [master] pid:7791 {
    "bundleId": "HM.wristband2",
    "platformName": "ios",
    "platformVersion": "9.3.2"
}
>> xctest-client.js:246:12 [master] pid:7791 xcode version: 7.3.1
>> xctest-client.js:219:14 [master] pid:7791 2016-06-13 15:11:21.971 xcodebuild[7849:627644] [MT] IDETestOperationsObserverDebug: (1E40C4E4-DB20-4D02-8866-4A91C1B2C448) Beginning test session 1E40C4E4-DB20-4D02-8866-4A91C1B2C448 with Xcode 7D1014 on target <DVTiOSDevice: 0x7f86d610f200> {
        deviceSerialNumber:         CCQN6EZ0G22Y
        identifier:                 5d2d323666d505449e9a67cbd3fccc8ff80baadf
        deviceClass:                iPod
        deviceName:                 iPod touch (2)
        deviceIdentifier:           5d2d323666d505449e9a67cbd3fccc8ff80baadf
        productVersion:             9.3.2
        buildVersion:               13F69
        deviceSoftwareVersion:      9.3.2 (13F69)
        deviceArchitecture:         armv7f
        deviceTotalCapacity:        13470396416
        deviceAvailableCapacity:    483815424
        deviceIsTransient:          NO
        ignored:                    NO
        deviceIsBusy:               NO
        deviceIsActivated:          YES
        deviceActivationState:      Activated
        deviceType:                 <DVTDeviceType:0x7f86d3663cd0 Xcode.DeviceType.iPhone>
        supportedDeviceFamilies:    (
    1
)
        applications:              (null)
        provisioningProfiles:      (null)
        activityProgress:          -2
        activityTitle:             
        hasInternalSupport:        NO
        isSupportedOS:             YES
        developerDiskMountError:   (null)
(null)
    } (9.3.2 (13F69))

>> xctest-client.js:219:14 [master] pid:7791 2016-06-13 15:11:21.972 xcodebuild[7849:627658]  IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/djx/Library/Developer/Xcode/DerivedData/WebDriverAgent-dgapfvuoqjmpyehcyyvidqwjgymp/Logs/Test/F1CE5C96-594A-494C-8E6F-2A89C8054E5F/Session-2016-06-13_15:11:21-EL9fgL.log

>> xctest-client.js:219:14 [master] pid:7791 
Testing failed:

>> xctest-client.js:219:14 [master] pid:7791    Implicit conversion loses floating-point precision: 'double' to 'CGFloat' (aka 'float')
    Implicit conversion increases floating-point precision: 'CGFloat' (aka 'float') to 'NSTimeInterval' (aka 'double')
** TEST FAILED **


The following build commands failed:
    CompileC /Users/djx/Library/Developer/Xcode/DerivedData/WebDriverAgent-dgapfvuoqjmpyehcyyvidqwjgymp/Build/Intermediates/WebDriverAgent.build/Debug-iphoneos/XCTWebDriverAgentLib.build/Objects-normal/armv7/FBCustomCommands.o XCTWebDriverAgentLib/Commands/FBCustomCommands.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

>> xctest-client.js:227:14 [master] pid:7791 xctest client exit with code: 65, signal: null
>> 
>>     1) "before all" hook

>> responseHandler.js:24:12 [master] pid:7791 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
>> responseHandler.js:32:14 [master] pid:7791 Send HTTP Respone to Client: 405 Method Not Allowed
>> 
>>     2) "after all" hook


>> 

>>   0 passing (5m)

>>   2 failing

>> 

>>   1) macaca mobile sample "before all" hook:
     Error: timeout of 300000ms exceeded. Ensure the done() callback is being called in this test.



>>   2) macaca mobile sample "after all" hook:
     Error: [quit()] Unexpected data in simpleCallback.
      at exports.newError (node_modules/.npminstall/wd/0.4.0/wd/lib/utils.js:139:13)
      at .<anonymous> (node_modules/.npminstall/wd/0.4.0/wd/lib/callbacks.js:42:12)
      at cb (node_modules/.npminstall/wd/0.4.0/wd/lib/webdriver.js:160:22)
      at node_modules/.npminstall/wd/0.4.0/wd/lib/webdriver.js:174:5
      at Request._callback (node_modules/.npminstall/wd/0.4.0/wd/lib/http-utils.js:87:7)
      at Request.self.callback (node_modules/.npminstall/request/2.55.0/request/request.js:368:22)
      at Request.<anonymous> (node_modules/.npminstall/request/2.55.0/request/request.js:1219:14)
      at IncomingMessage.<anonymous> (node_modules/.npminstall/request/2.55.0/request/request.js:1167:12)
      at endReadableNT (_stream_readable.js:926:12)
      at _combinedTickCallback (internal/process/next_tick.js:74:11)
      at process._tickCallback (internal/process/next_tick.js:98:9)



>> 

>> Test completed!

@diaojunxian
Copy link

@xudafeng 日志已经贴上,在上一个回复

@xudafeng
Copy link
Member

xudafeng commented Jun 13, 2016

@diaojunxian 编译报错了,你的模拟器流程可以运行起来?

@diaojunxian
Copy link

@xudafeng 有没有文档是从开始如何写脚本的,官方例子能走通,环境是没问题的,我感觉可能是我的脚本写的有问题 我是按照 https://testerhome.com/topics/4549 这个写的,现在重写一遍发现执行报错都不一样了,我懵

@xudafeng
Copy link
Member

@xudafeng
Copy link
Member

@diaojunxian teamviewer,我给你看看吧

@diaojunxian
Copy link

@xudafeng 好的 等下啊 我来安装一下 我还没有安装teamviewer

@wglong
Copy link

wglong commented Jun 14, 2016

@xudafeng 我也遇到了同样的问题
`>> xctest-client.js:219:14 [master] pid:14593
Testing failed:
Implicit conversion loses floating-point precision: 'double' to 'CGFloat' (aka 'float')

xctest-client.js:219:14 [master] pid:14593 ** TEST FAILED **`

@diaojunxian
Copy link

@wglong 你也是能正常执行官方的demo么?是执行自己的包,报错么?

@wglong
Copy link

wglong commented Jun 14, 2016

@diaojunxian 是的,Demo 正常,自己的包就出问题了。
不太懂iOS 开发,提供几个信息@xudafeng

  1. 我用的是模拟器, 选的是iPad 2 iOS 9.2
  2. Xcode 7.2.1
  3. 日志和上边贴出的查不多,

@xudafeng
Copy link
Member

@wglong xcode 先升级到最新吧

@diaojunxian
Copy link

@wglong 我是在模拟器上自己的包,可以正常打开,但是真机就会出问题,官方demo真机你能执行么?

@diaojunxian
Copy link

@xudafeng 我已经确认我们自己的包可以在模拟器上执行,但是就是在真机上执行不了,报错,我重新贴一下log

>> xctest-client.js:219:14 [master] pid:6351 2016-06-14 16:26:11.977 xcodebuild[6382:89692]  IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/djx/Library/Developer/Xcode/DerivedData/WebDriverAgent-aiscohxdersaozfjqztojruteoph/Logs/Test/FB196F1D-280D-44DA-8BB7-AB1A656FF095/Session-2016-06-14_16:26:11-WtJwL3.log

>> xctest-client.js:219:14 [master] pid:6351 
Testing failed:

>> xctest-client.js:219:14 [master] pid:6351    Implicit conversion loses floating-point precision: 'double' to 'CGFloat' (aka 'float')
    Implicit conversion increases floating-point precision: 'CGFloat' (aka 'float') to 'NSTimeInterval' (aka 'double')
** TEST FAILED **


The following build commands failed:
    CompileC /Users/djx/Library/Developer/Xcode/DerivedData/WebDriverAgent-aiscohxdersaozfjqztojruteoph/Build/Intermediates/WebDriverAgent.build/Debug-iphoneos/XCTWebDriverAgentLib.build/Objects-normal/armv7/FBCustomCommands.o XCTWebDriverAgentLib/Commands/FBCustomCommands.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

@xudafeng
Copy link
Member

@diaojunxian 真机是哪个版本系统

@diaojunxian
Copy link

@xudafeng 9.3.2

@sencho
Copy link
Collaborator

sencho commented Jun 14, 2016

@diaojunxian 你的XCTUITestRunner装进真机没有?有的话把他删了,等程序自动再装一次。

@diaojunxian
Copy link

@sencho 木有装进去

@sencho
Copy link
Collaborator

sencho commented Jun 14, 2016

@diaojunxian 真机和你的Mac要在同一个网络下,还有你真机要测试的app要先build进去

@diaojunxian
Copy link

@sencho 恩 都是符合的 山草 我在qq也咨询你了

@xudafeng
Copy link
Member

4 4s 5 都复现,更高的版本是好的。

@diaojunxian 先用64位机器吧

@diaojunxian
Copy link

@xudafeng @sencho
你们好,当前可以看到真机应用被启动起来,但是还是有报错如下log

>> responseHandler.js:24:12 [master] pid:539 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","bundleId":"xudafeng.ios-app-bootstrap","udid":"5e696e7d8f5620af0accc5d0b49776af354c88ac"}}
>> session.js:60:10 [master] pid:539 Creating session, sessionId: 80cca631-6a35-4206-b6c7-09120f7f6df1.
>> agent path: /usr/local/lib/node_modules/macaca-ios/node_modules/xctest-client/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcworkspace
>> macaca-ios.js:132:10 [master] pid:539 {
    "bundleId": "xudafeng.ios-app-bootstrap",
    "platformName": "iOS",
    "platformVersion": "9.3"
}
>> xctest-client.js:246:12 [master] pid:539 xcode version: 7.3.1
>> xctest-client.js:219:14 [master] pid:539 2016-06-20 15:06:02.627 xcodebuild[551:9889] [MT] IDETestOperationsObserverDebug: (CBD26EFA-EFBB-42F1-8BA7-635C88F08C38) Beginning test session CBD26EFA-EFBB-42F1-8BA7-635C88F08C38 with Xcode 7D1014 on target <DVTiOSDevice: 0x7f8633738850> {
        deviceSerialNumber:         F2LMG2WAFNNM
        identifier:                 5e696e7d8f5620af0accc5d0b49776af354c88ac
        deviceClass:                iPhone
        deviceName:                 “djx”的 iPhone
        deviceIdentifier:           5e696e7d8f5620af0accc5d0b49776af354c88ac
        productVersion:             9.3.2
        buildVersion:               13F69
        deviceSoftwareVersion:      9.3.2 (13F69)
        deviceArchitecture:         arm64
        deviceTotalCapacity:        12636254208
        deviceAvailableCapacity:    11373502464
        deviceIsTransient:          NO
        ignored:                    NO
        deviceIsBusy:               NO
        deviceIsActivated:          YES
        deviceActivationState:      Activated
        deviceType:                 <DVTDeviceType:0x7f863362ba30 Xcode.DeviceType.iPhone>
        supportedDeviceFamilies:    (
    1
)
        applications:              (null)
        provisioningProfiles:      (null)
        activityProgress:          -2
        activityTitle:             
        hasInternalSupport:        NO
        isSupportedOS:             YES
        developerDiskMountError:   (null)
(null)
    } (9.3.2 (13F69))

>> xctest-client.js:219:14 [master] pid:539 2016-06-20 15:06:02.645 xcodebuild[551:9904]  IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/djx/Library/Developer/Xcode/DerivedData/WebDriverAgent-aiscohxdersaozfjqztojruteoph/Logs/Test/5942D5D3-F929-4D8A-80B5-BA6640E3FCA1/Session-2016-06-20_15:06:02-yz9GLr.log

>> xctest-client.js:219:14 [master] pid:539 MDMCreateDeltaDirectory:1920 calling MDMDirectoryDiff with:
state->old_bundle: /var/folders/35/4r9r5ccd7vs9fp0rmdm0fdmw0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/ae357ea582e24fd5d0a7c768fe14fe47/5e696e7d8f5620af0accc5d0b49776af354c88ac/XCTUITestRunner-Runner.app
state->new_bundle: /Users/djx/Library/Developer/Xcode/DerivedData/WebDriverAgent-aiscohxdersaozfjqztojruteoph/Build/Products/Debug-iphoneos/XCTUITestRunner-Runner.app
state->dst_bundle: /var/folders/35/4r9r5ccd7vs9fp0rmdm0fdmw0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/XCTUITestRunner-Runner.app.mzGBMX/XCTUITestRunner-Runner.app_sparse.ipa/Payload//XCTUITestRunner-Runner.app, binaryDiff flag: FALSE
    dst_ipa: /var/folders/35/4r9r5ccd7vs9fp0rmdm0fdmw0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/XCTUITestRunner-Runner.app.mzGBMX/XCTUITestRunner-Runner.app_sparse.ipa

>> xctest-client.js:219:14 [master] pid:539 __MDMDirectoryDiff_block_invoke37:1473 calling writeDictToFile with: /var/folders/35/4r9r5ccd7vs9fp0rmdm0fdmw0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/XCTUITestRunner-Runner.app.mzGBMX/XCTUITestRunner-Runner.app_sparse.ipa/ManifestCache.plist
writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/35/4r9r5ccd7vs9fp0rmdm0fdmw0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/XCTUITestRunner-Runner.app.mzGBMX/XCTUITestRunner-Runner.app_sparse.ipa/ManifestCache.plist

>> proxy.js:67:14 [master] pid:539 Proxy: /session:POST to http://192.168.1.101:8100/session:POST with body: {"desiredCapabilities":{"bundleId":"xudafeng.ios-app-bootstrap","platformName":"iOS","platformVersion":"9.3"}}
>> proxy.js:80:16 [master] pid:539 Got response with status 200: {"value":{"sessionId":"A87D1E2C-5BC9-4CFE-A17A-F5F867FE4A02","capabilities":{"webdriverProcessID":352,"device":"iphone","applicationProcessID":353,"browserName":"ios-app-bootstrap","sdkVersion":"9....
>> responseHandler.js:56:14 [master] pid:539 Send HTTP Respone to Client: {"sessionId":"80cca631-6a35-4206-b6c7-09120f7f6df1","status":0,"value":"{\"autoAcceptAlerts\":true,\"platformName\":\"iOS\",\"platformVersion\":\"9.3\",\"deviceName\":\"iPhone 5s\",\"bundleId\":\"xudafeng.ios-app-bootstrap\",\"udid\":\"5e696e7d8f5620af0accc5d0b49776af354c88ac\",\"window\":true}"}
>> responseHandler.js:24:12 [master] pid:539 Recieve HTTP Request from Client: method: POST url: /wd/hub/session/80cca631-6a35-4206-b6c7-09120f7f6df1/window/current/size, jsonBody: {"width":1280,"height":800}
>> proxy.js:67:14 [master] pid:539 Proxy: /wd/hub/session/80cca631-6a35-4206-b6c7-09120f7f6df1/window/current/size:POST to http://192.168.1.101:8100/session/A87D1E2C-5BC9-4CFE-A17A-F5F867FE4A02/window/current/size:POST with body: {"width":1280,"height":800}
>> proxy.js:80:16 [master] pid:539 Got response with status 200: {"value":"Unhandled endpoint: /session/A87D1E2C-5BC9-4CFE-A17A-F5F867FE4A02/window/current/size -- http://192.168.1.101:8100/ with parameters {\n    wildcards =     (\n        \"session/A87D1E2C-5B...
>> session.js:120:14 [master] pid:539 Send HTTP Respone to Client: {"value":"\"Unhandled endpoint: /session/A87D1E2C-5BC9-4CFE-A17A-F5F867FE4A02/window/current/size -- http://192.168.1.101:8100/ with parameters {\\n    wildcards =     (\\n        \\\"session/A87D1E2C-5BC9-4CFE-A17A-F5F867FE4A02/window/current/size\\\"\\n    );\\n}\"","sessionId":"80cca631-6a35-4206-b6c7-09120f7f6df1","status":1}
>> 
>>     1) "before all" hook

>> responseHandler.js:24:12 [master] pid:539 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session/80cca631-6a35-4206-b6c7-09120f7f6df1, jsonBody: {}
>> macaca-ios.js:254:10 [master] pid:539 Stoping iOS driver...
>> macaca-ios.js:280:10 [master] pid:539 iOS driver cleaned up.
>> session.js:93:12 [master] pid:539 Delete session, sessionId: 80cca631-6a35-4206-b6c7-09120f7f6df1
>> responseHandler.js:56:14 [master] pid:539 Send HTTP Respone to Client: {"sessionId":"80cca631-6a35-4206-b6c7-09120f7f6df1","status":0}
>> xctest-client.js:192:16 [master] pid:539 
Exiting...

>> xctest-client.js:219:14 [master] pid:539 ** BUILD INTERRUPTED **

>> xctest-client.js:200:16 [master] pid:539 bootstrap exit with code: 0, signal: null
>> 
  macaca mobile sample

>> xctest-client.js:227:14 [master] pid:539 xctest client exit with code: null, signal: SIGTERM
>> responseHandler.js:24:12 [master] pid:539 Recieve HTTP Request from Client: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"autoAcceptAlerts":true,"platformName":"iOS","platformVersion":"9.3","deviceName":"iPhone 5s","bundleId":"xudafeng.ios-app-bootstrap","udid":"5e696e7d8f5620af0accc5d0b49776af354c88ac"}}
>> session.js:60:10 [master] pid:539 Creating session, sessionId: 66ef4211-5795-44c6-b09c-9779f04b38ee.
>> agent path: /usr/local/lib/node_modules/macaca-ios/node_modules/xctest-client/node_modules/webdriveragent/WebDriverAgent/WebDriverAgent.xcworkspace
>> macaca-ios.js:132:10 [master] pid:539 {
    "bundleId": "xudafeng.ios-app-bootstrap",
    "platformName": "iOS",
    "platformVersion": "9.3"
}
>> xctest-client.js:246:12 [master] pid:539 xcode version: 7.3.1
>> xctest-client.js:219:14 [master] pid:539 2016-06-20 15:06:27.938 xcodebuild[606:10558] [MT] IDETestOperationsObserverDebug: (0D134570-1A33-4EC9-9759-2BB6A9DEEB2B) Beginning test session 0D134570-1A33-4EC9-9759-2BB6A9DEEB2B with Xcode 7D1014 on target <DVTiOSDevice: 0x7f8b83eda710> {
        deviceSerialNumber:         F2LMG2WAFNNM
        identifier:                 5e696e7d8f5620af0accc5d0b49776af354c88ac
        deviceClass:                iPhone
        deviceName:                 “djx”的 iPhone
        deviceIdentifier:           5e696e7d8f5620af0accc5d0b49776af354c88ac
        productVersion:             9.3.2
        buildVersion:               13F69
        deviceSoftwareVersion:      9.3.2 (13F69)
        deviceArchitecture:         arm64
        deviceTotalCapacity:        12636254208
        deviceAvailableCapacity:    11372953600
        deviceIsTransient:          NO
        ignored:                    NO
        deviceIsBusy:               NO
        deviceIsActivated:          YES
        deviceActivationState:      Activated
        deviceType:                 <DVTDeviceType:0x7f8b83f0d950 Xcode.DeviceType.iPhone>
        supportedDeviceFamilies:    (
    1
)
        applications:              (null)
        provisioningProfiles:      (null)
        activityProgress:          -2
        activityTitle:             
        hasInternalSupport:        NO
        isSupportedOS:             YES
        developerDiskMountError:   (null)
(null)
    } (9.3.2 (13F69))

>> xctest-client.js:219:14 [master] pid:539 2016-06-20 15:06:27.947 xcodebuild[606:10563]  IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/djx/Library/Developer/Xcode/DerivedData/WebDriverAgent-aiscohxdersaozfjqztojruteoph/Logs/Test/FBCB2557-97BE-44A5-BFAC-4AECB3EAF1AA/Session-2016-06-20_15:06:27-5yBNph.log

>> proxy.js:67:14 [master] pid:539 Proxy: /session:POST to http://192.168.1.101:8100/session:POST with body: {"desiredCapabilities":{"bundleId":"xudafeng.ios-app-bootstrap","platformName":"iOS","platformVersion":"9.3"}}
>> xctest-client.js:219:14 [master] pid:539 MDMCreateDeltaDirectory:1920 calling MDMDirectoryDiff with:
state->old_bundle: /var/folders/35/4r9r5ccd7vs9fp0rmdm0fdmw0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/ae357ea582e24fd5d0a7c768fe14fe47/5e696e7d8f5620af0accc5d0b49776af354c88ac/XCTUITestRunner-Runner.app
state->new_bundle: /Users/djx/Library/Developer/Xcode/DerivedData/WebDriverAgent-aiscohxdersaozfjqztojruteoph/Build/Products/Debug-iphoneos/XCTUITestRunner-Runner.app
state->dst_bundle: /var/folders/35/4r9r5ccd7vs9fp0rmdm0fdmw0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/XCTUITestRunner-Runner.app.AXGIhc/XCTUITestRunner-Runner.app_sparse.ipa/Payload//XCTUITestRunner-Runner.app, binaryDiff flag: FALSE
    dst_ipa: /var/folders/35/4r9r5ccd7vs9fp0rmdm0fdmw0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/XCTUITestRunner-Runner.app.AXGIhc/XCTUITestRunner-Runner.app_sparse.ipa

>> xctest-client.js:219:14 [master] pid:539 __MDMDirectoryDiff_block_invoke37:1473 calling writeDictToFile with: /var/folders/35/4r9r5ccd7vs9fp0rmdm0fdmw0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/XCTUITestRunner-Runner.app.AXGIhc/XCTUITestRunner-Runner.app_sparse.ipa/ManifestCache.plist

>> xctest-client.js:219:14 [master] pid:539 writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/35/4r9r5ccd7vs9fp0rmdm0fdmw0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/XCTUITestRunner-Runner.app.AXGIhc/XCTUITestRunner-Runner.app_sparse.ipa/ManifestCache.plist

>> proxy.js:71:18 [master] pid:539 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:71:18 [master] pid:539 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._callback (/usr/local/lib/node_modules/macaca-ios/node_modules/xctest-client/lib/proxy.js:71:18)
    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:77:13)
    at Request.emit (events.js:169: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:77:13)
    at ClientRequest.emit (events.js:169:7)
    at Socket.socketOnEnd (_http_client.js:288:9)
    at emitNone (events.js:72:20)
    at Socket.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:903:12)
    at doNTCallback2 (node.js:439:9)
    at process._tickCallback (node.js:353:17)

@diaojunxian
Copy link

@xudafeng @sencho 补充一句,是可以看到用例脚本能启动app应用以后,然后报错的。强调一下,是可以看到能启动app应用到登陆界面了。

@codeskyblue
Copy link

可能是证书签名的问题,我之前也遇到过

@xudafeng
Copy link
Member

#82

@wrldeop
Copy link

wrldeop commented Oct 18, 2016

@diaojunxian 亲这个问题你是怎么解决的 我现在也遇到了一样的

@imamong
Copy link

imamong commented Nov 16, 2016

在wda中执行./Scripts/build.sh 出错,错误信息如下:
删除project,重新执行git clone --depth 1 https://github.com/facebook/WebDriverAgent.git
也是同样的问题。

The following build commands failed:
CompileC /Users/among/Library/Developer/Xcode/DerivedData/WebDriverAgent-gjzlrzigwygatngajticarczdlpp/Build/Intermediates/ArchiveIntermediates/WebDriverAgentRunner/IntermediateBuildFilesPath/WebDriverAgent.build/Release-iphoneos/WebDriverAgentLib.build/Objects-normal/armv7/XCTestPrivateSymbols.o WebDriverAgentLib/Utilities/XCTestPrivateSymbols.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler

@xudafeng
Copy link
Member

@among29 升级gcc

@xudafeng xudafeng added the FAQ label Nov 21, 2016
@paradite paradite pinned this issue Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants