当需要启动的机器上没有预装 wda 时,建议提供更友好的提示。
Closed this issue · 2 comments
chenhengjie123 commented
目前发现,当需启动的机器上没有安装 wda 时,目前会出现如下报错:
$ ./sib run wda -u 00008030-000E4DD60EF9802E
panic: interface conversion: interface {} is nil, not map[string]interface {}
goroutine 1 [running]:
github.com/electricbubble/gidevice.(*device).XCTest(0xc0001765b0, {0x145c635, 0x2b}, {0xc00000e120, 0x1, 0x14130000?})
C:/Users/ZHOUYIXUN/go/pkg/mod/github.com/electricbubble/gidevice@v0.4.0/device.go:622 +0x1e34
github.com/SonicCloudOrg/sonic-ios-bridge/cmd.glob..func11(0x1756aa0?, {0x1448324?, 0x2?, 0x2?})
C:/Users/ZHOUYIXUN/Desktop/sonic-ios-bridge/cmd/wda.go:53 +0x4b2
github.com/spf13/cobra.(*Command).execute(0x1756aa0, {0xc000078380, 0x2, 0x2})
C:/Users/ZHOUYIXUN/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:856 +0x67c
github.com/spf13/cobra.(*Command).ExecuteC(0x1757720)
C:/Users/ZHOUYIXUN/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:974 +0x3b4
github.com/spf13/cobra.(*Command).Execute(...)
C:/Users/ZHOUYIXUN/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:902
github.com/SonicCloudOrg/sonic-ios-bridge/cmd.Execute()
C:/Users/ZHOUYIXUN/Desktop/sonic-ios-bridge/cmd/root.go:32 +0x25
main.main()
C:/Users/ZHOUYIXUN/Desktop/sonic-ios-bridge/main.go:6 +0x17
$ tidevice -u 00008030-000E4DD60EF9802E info
MarketName: iPhone 11
DeviceName: iPhone-11-551
ProductVersion: 14.4.2
ProductType: iPhone12,1
ModelNumber: MWN02
SerialNumber: F4GCLRVPN73T
PhoneNumber: None
CPUArchitecture: arm64e
ProductName: iPhone OS
ProtocolVersion: 2
RegionInfo: CH/A
TimeIntervalSince1970: 1648096648.235344
TimeZone: Asia/Shanghai
UniqueDeviceID: 00008030-000E4DD60EF9802E
WiFiAddress: f4:db:e3:60:6e:43
BluetoothAddress: f4:db:e3:6d:54:4b
BasebandVersion: 2.03.04
建议可以展示更友好的报错信息。
ZhouYixun commented
可以,另外展示信息,可以用
sib devices -d