【问题标题】:Couldn't find a pair record for device ... - problem when trying to connect Appium to real iPhone device / Appium can't connect to real iPhone找不到设备的配对记录... - 尝试将 Appium 连接到真实 iPhone 设备时出现问题/Appium 无法连接到真实 iPhone
【发布时间】:2020-04-30 01:04:29
【问题描述】:

所以我试图在物理 iPhone 上运行一些测试 - 但由于某种原因它无法正常工作。 在 Xcode iPhones Simulator、Android Simulator 和真正的 Android 设备上正常工作 - 这只是 iPhone 真实设备的问题。 ios-deploy 正在查看已连接的设备,但似乎 Appium 一开始会看到该设备,但随后无法连接到它,因为它找不到“设备的配对记录”(无论这意味着什么)。

  • 试用了两款不同的 iPhone(iPhone 11@13.2 和 iPhone 8@13.1)
  • 已尝试使用 Appium CLI (1.16)/桌面 (1.​​15.1)

Appium 返回的错误信息: 错误:找不到设备 00008030-000A11413E00802A 的配对记录。请先与设备配对

这里有提到错误的日志:

[XCUITest] Available devices: 00008030-000A11413E00802A
[XCUITest] Creating iDevice object with udid '00008030-000A11413E00802A'
[XCUITest] Getting the platformVersion from the phone since it was not specified in the capabilities
[XCUITest] Determining device to run tests on: udid: '00008030-000A11413E00802A', real device: true
[XCUITest] Normalized platformVersion capability value '13.2.0' to '13.2'
[BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1578909419779 (10:56:59 GMT+0100 (CET))
[BaseDriver] Event 'appConfigured' logged at 1578909419780 (10:56:59 GMT+0100 (CET))
[BaseDriver] Event 'resetStarted' logged at 1578909419780 (10:56:59 GMT+0100 (CET))
[XCUITest] Reset: running ios real device reset flow
[BaseDriver] Event 'resetComplete' logged at 1578909419780 (10:56:59 GMT+0100 (CET))
[XCUITest] Continuing without capturing device logs: Couldn't find a pair record for device 00008030-000A11413E00802A. Please first pair with the device
[XCUITest] Setting up real device
[XCUITest] Error: Couldn't find a pair record for device 00008030-000A11413E00802A. Please first pair with the device
[XCUITest]     at startLockdownSession (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-ios-device/lib/utilities.js:108:13)
[DevCon Factory] Releasing connections for 00008030-000A11413E00802A device on any port number
[DevCon Factory] No cached connections have been found
[BaseDriver] Event 'newSessionStarted' logged at 1578909419790 (10:56:59 GMT+0100 (CET))
[MJSONWP] Encountered internal error running command: Error: Couldn't find a pair record for device 00008030-000A11413E00802A. Please first pair with the device

有谁知道这里的问题是什么,我该如何解决?

【问题讨论】:

    标签: iphone appium appium-ios


    【解决方案1】:

    所以,事实证明我所要做的就是安装 idevicepair(它捆绑在 libimobiledevice 中)。所以我所要做的就是:

    brew install libimobiledevice
    

    验证 idevicepair 是否已正确安装,并且它会看到您连接的 iPhone:

    idevicepair list
    

    一切顺利后,您可以将您的设备与

    idevicepair --udid [here goes UDID of your iPhone] pair
    

    这对我有用:)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-10
      • 1970-01-01
      • 2018-08-04
      • 1970-01-01
      • 2016-02-04
      • 2022-11-08
      相关资源
      最近更新 更多