【问题标题】:Cannot start Appium with IOS real device Appium 1.5.3IOS真机Appium 1.5.3无法启动Appium
【发布时间】:2017-02-04 01:40:59
【问题描述】:

它在过去有效。但是最近我不能再用 iOS 真机启动 Appium 了。我的环境如下:

  • Appium 1.5.3
  • XCode 7.3
  • iOS 9.1

我使用 selenium 和 io.appium 如下

    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>2.53.0</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>io.appium</groupId>
        <artifactId>java-client</artifactId>
        <version>4.0.0</version>
    </dependency>

每当我开始测试时,我总是在创建 iOSDriver 时遇到这个异常

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Removing com.project.classname failed (WARNING: The server did not provide any stacktrace information)

我从 iOS 10 和 XCode 8 中搜索到它们不支持 UI 自动化。我仍然使用 iOS 9 和 XCode 7。有没有人有同样的问题和任何解决方案。我有点卡在这里。谢谢

这是来自 Appium 的日志文件

[debug] [iOS] Running ios real device reset flow

[debug] [iOS] Full reset requested. Will try to uninstall the app 'com.project.classname'.
[debug] [iOS] Creating iDevice object with udid 5571568ad437d17f705f6645d73ef78ea5e72e7b

[iOS] Could not remove 'com.project.classname' from device

[MJSONWP] Encountered internal error running command: Error: Removing com.project.classname failed
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/node-idevice/main.js:145:6
at ChildProcess.exithandler (child_process.js:193:7)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Socket.<anonymous> (internal/child_process.js:323:11)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at Pipe._onclose (net.js:475:12)

[HTTP] <-- POST /wd/hub/session 500 973 ms - 175 

【问题讨论】:

  • 你能在 appium gui 中启动它吗?您也可以通过查看 appium gui 的日志来找到更多信息。
  • 我也无法在 Appium 中启动它。日志文件是“无法删除 com.project.classname,然后 Appium 停止了。
  • 如果你把日志文件放在这里可能会有帮助。没有人能看到发生了什么。可能是您的应用签名已更改,也可能是其他原因。
  • 谢谢@robx,我更新了日志文件。这真的很烦人,因为我在另一台 Mac 上使用相同版本的 Appium 和 Xcode 执行了它,并且它可以在该 Mac 上运行。但在我的 Mac 上,它总是显示此错误。不知道我是否不小心更改了系统中的某些内容
  • Mac 都是同一个 OS X 版本吗?

标签: ios selenium appium appium-ios


【解决方案1】:

尝试查看问题是否与 libimobiledevice 或设备锁定有关

使用该命令安装它: brew install libimobiledevice --HEAD

也尝试使用这个命令 sudo chmod -R 777 /var/db/lockdown/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-08-11
    • 2016-06-18
    • 2017-03-09
    • 2020-02-02
    • 1970-01-01
    • 2023-04-02
    • 2013-11-27
    • 2018-07-21
    相关资源
    最近更新 更多