STF [记录] STF+iOS 报错:idevicescreenshot -u XXX.png

阿三 · 2020年10月21日 · 最后由 刘芳 回复于 2021年05月19日 · 3590 次阅读

遇到的报错截图

解决方法:

接 iOS 设备,运行一整条命令: (命令中版本改成接入的 iOS 系统版本)
ideviceimagemounter /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/14.0/DeveloperDiskImage.dmg /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/14.0/DeveloperDiskImage.dmg.signature

如有以下报错就重启手机,再运行上面命令

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
共收到 9 条回复 时间 点赞

mount 成功了,但是设备插上还是报错,ios14.1,idevicescreenshot 单独执行报:Could not connect to screenshotr!

Ray2DD 回复

你 Xcode 上有 ios14.1 的调试包吗?

@ 阿三 大神,我也遇到同样的问题。Xcode 上已有相应版本 14.0 的调试包,手机也是 14.0 的系统,mount 成功后,但是设备插上还是报错,并且再次执行
ideviceimagemounter /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/14.0/DeveloperDiskImage.dmg /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/14.0/DeveloperDiskImage.dmg.signature
这个命令又回到了
Uploading /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/14.0/DeveloperDiskImage.dmg
done.
Mounting...
Error: ImageMountFailed
这个报错。
idevicescreenshot 单独执行报:Could not connect to screenshotr!
很惆怅……

刘芳 回复

改 STF 源码,idevicescreenshot 替换成 tidevice,本地也安装 tidevice 工具,从根本上解决。

阿三 回复

改了源码,现在界面出来了但是点击没反应,也没报错,提示这个……

一波三折呢

刘芳 回复

说明你 STF 源码替换 tidevice 时,没有改启动 wda 的 bundleId

阿三 回复


改了的,看着是 websocket 没连接上
操作的时候浏览器代码检查里面有这个报错

刘芳 回复

你用这个版本https://github.com/EasilyTest/stf
1 改下 wda 的 bundleId,
2 截图 idevicescreenshot 替换成 tidevice
我目前就是用这个,可行

仅楼主可见
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册