gabrielrobert / xavtool

Xplat Automating Version Tool
https://gabrielrobert.github.io/xavtool/
MIT License
35 stars 2 forks source link

panic: runtime error: invalid memory address or nil pointer dereference when calling xavtool set #21

Open kylerdanielster opened 5 years ago

kylerdanielster commented 5 years ago

xavtool Version 1.2.0

[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x11b9626]

goroutine 1 [running]:

main.isIgnored(0x0, 0x0, 0xc42008b0b0) /home/travis/gopath/src/github.com/gabrielrobert/xavtool/finders.go:50 +0x56 main.findManifests.func1(0x7ffeefbfd634, 0x9, 0x0, 0x0, 0x1253ba0, 0xc42008b0b0, 0x30, 0x120ab40) /home/travis/gopath/src/github.com/gabrielrobert/xavtool/finders.go:24 +0x70 path/filepath.Walk(0x7ffeefbfd634, 0x9, 0xc42008b080, 0x0, 0x38) /home/travis/.gimme/versions/go1.10.7.linux.amd64/src/path/filepath/path.go:401 +0x6c main.findManifests(0x7ffeefbfd634, 0x9, 0x134b200, 0x4, 0x4, 0x136b9c0, 0x1, 0x2, 0xc420109948, 0x13b86c8) /home/travis/gopath/src/github.com/gabrielrobert/xavtool/finders.go:22 +0x10d main.set(0xc4200bc6e0, 0xc420083700, 0xc4200bc6e0) /home/travis/gopath/src/github.com/gabrielrobert/xavtool/actions.go:98 +0x176 github.com/urfave/cli.HandleAction(0x11e7140, 0x1237d48, 0xc4200bc6e0, 0x0, 0xc4200b82a0) /home/travis/gopath/src/github.com/urfave/cli/app.go:501 +0xc8 github.com/urfave/cli.Command.Run(0x122a2ca, 0x3, 0x0, 0x0, 0xc4200836b0, 0x1, 0x1, 0x1230e5f, 0x1f, 0x0, ...) /home/travis/gopath/src/github.com/urfave/cli/command.go:165 +0x47d github.com/urfave/cli.(*App).Run(0xc420122000, 0xc42008a090, 0x3, 0x3, 0x0, 0x0) /home/travis/gopath/src/github.com/urfave/cli/app.go:259 +0x6e8 main.main() /home/travis/gopath/src/github.com/gabrielrobert/xavtool/main.go:19 +0x479

Running on a macOS Hosted VSTS build agent and installed via Homebrew. Had been using version 1.1.2 for months without any issues.

gabrielrobert commented 5 years ago

@kylerdanielster Force 1.1.2 for now, I'll check this out soon!

kylerdanielster commented 5 years ago

@gabrielrobert I dont suppose you could point me to some documentation on how to do that? Or what you mean by 'Force 1.1.2'. - Thanks for the quick reply!

gabrielrobert commented 5 years ago

@kylerdanielster I just pushed an update, you should retry. I'm not able to reproduce your problem, but I'm pretty sure my fix will work this out. Version 1.2.1.

kylerdanielster commented 5 years ago

@gabrielrobert I am not sure this is helpful but now I get this error - No application has been found

[error]Bash exited with code '5'.

However, I was FINALLY able to figure out how to install version 1.1.2 and learned a LOT about Homebrew in the process! Thanks again for the quick reply! At least the fire is out now, haha!

gabrielrobert commented 5 years ago

@kylerdanielster Could you share the paths where's your manifests are located? No application has been found occurs when xavtool cannot find one.

Many thanks for your help.

kylerdanielster commented 5 years ago

@gabrielrobert I believe this is it - /Users/vsts/agent/2.144.0/work/1/s

If that doesn't make sense, let me know.

Edit - This is probably what you meant. /Users/vsts/agent/2.144.0/work/1/s/{AppName}/{AppName}.Android/Properties/AndroidManifest.xml /Users/vsts/agent/2.144.0/work/1/s/{AppName}/{AppName}.iOS/Info.plist

gabrielrobert commented 5 years ago

@kylerdanielster It's like xavtool do not have the required permissions to access these files. You could try by installing brew/xavtool with sudo command or using the same owner's permissions.

I'll take a look closer on a Mac tomorrow.