electricbubble / gidevice-cli

gidevice cli ( like `libimobiledevice` )
MIT License
56 stars 12 forks source link

Panic during cobra call #15

Closed grecky-goo closed 2 years ago

grecky-goo commented 2 years ago

The info command works, but most other commands fail. What is wrong?

gidevice applist --udid G6TZ8H5GN70F panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x38 pc=0x127e62a]

goroutine 1 [running]: github.com/electricbubble/gidevice-cli/cmd.glob..func1(0x164c820?, {0x133369e?, 0x2?, 0x2?}) C:/Users/gyama/go/pkg/mod/github.com/electricbubble/gidevice-cli/gidevice-cli/cmd/applist.go:22 +0xaa github.com/spf13/cobra.(Command).execute(0x164c820, {0xc0000860e0, 0x2, 0x2}) C:/Users/gyama/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:856 +0x663 github.com/spf13/cobra.(Command).ExecuteC(0x164cfa0) C:/Users/gyama/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:960 +0x39c github.com/spf13/cobra.(*Command).Execute(...) C:/Users/gyama/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:897 github.com/electricbubble/gidevice-cli/cmd.Execute() C:/Users/gyama/go/pkg/mod/github.com/electricbubble/gidevice-cli/gidevice-cli/cmd/root.go:26 +0x25 main.main() C:/Users/gyama/go/pkg/mod/github.com/electricbubble/gidevice-cli/gidevice-cli/main.go:8 +0x17 PS C:\Users\gyama\go\pkg\mod\github.com\electricbubble\gidevice-cli\gidevice-cli>

electricbubble commented 2 years ago

Bad Device UDID

You must use a valid Device UDID👇

gidevice list

OR 👇,It will automatically get the first valid iOS Device

gidevice applist
grecky-goo commented 2 years ago

gyama@GregDell-EOF38Q1 MINGW64 ~/workspace_gidevice-cli/gidevice-cli $ ./main.exe list 00008030-001C2D500200802E 00008030-001C2D500200802E: lockdown start session: receive packet: InvalidHostID

The devices() works fine. I get a valid udid, but it seems to object to the connect on the lockdown packet. $ ./main.exe applist --udid 00008030-001C2D500200802E 2022/06/24 11:03:31 lockdown start session: receive packet: InvalidHostID

(yes it is on windows 10)

grecky-goo commented 2 years ago

OK. I figured it out. I had not answered the "trust this computer" message on the phone. I knew it was silly.