gabrielrobert / xavtool

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

panic: interface conversion: interface {} is string, not map[string]interface {} #22

Open 2mooar opened 5 years ago

2mooar commented 5 years ago

If using xavtool 1.2.1-fix on mac or windows following error appears with latest VS 2019 release.

panic: interface conversion: interface {} is string, not map[string]interface {}

goroutine 1 [running]:
github.com/clbanning/mxj.elemListSeq.Less(...)
        /home/travis/gopath/src/github.com/clbanning/mxj/xmlseq.go:812
github.com/clbanning/mxj.(*elemListSeq).Less(0xc0421b2640, 0x1, 0x0, 0x20)
        <autogenerated>:1 +0x199
sort.insertionSort(0x66df80, 0xc0421b2640, 0x0, 0x3)
        /home/travis/.gimme/versions/go1.10.7.linux.amd64/src/sort/sort.go:27 +0xa3
sort.quickSort(0x66df80, 0xc0421b2640, 0x0, 0x3, 0x4)
        /home/travis/.gimme/versions/go1.10.7.linux.amd64/src/sort/sort.go:209 +0x20e
sort.Sort(0x66df80, 0xc0421b2640)
        /home/travis/.gimme/versions/go1.10.7.linux.amd64/src/sort/sort.go:218 +0x80
github.com/clbanning/mxj.mapToXmlSeqIndent(0x1, 0xc04206f518, 0xc04216f550, 0xb, 0x608900, 0xc042067bc0, 0xc04206f238, 0x0, 0x0)
        /home/travis/gopath/src/github.com/clbanning/mxj/xmlseq.go:657 +0x1187
github.com/clbanning/mxj.mapToXmlSeqIndent(0x608901, 0xc04206f518, 0xc04216f348, 0x8, 0x608900, 0xc0420674d0, 0xc04206f528, 0x40b090, 0xc04216f348)
        /home/travis/gopath/src/github.com/clbanning/mxj/xmlseq.go:668 +0x124e
github.com/clbanning/mxj.Map.XmlSeqIndent(0xc0420674a0, 0x0, 0x0, 0x641b89, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/travis/gopath/src/github.com/clbanning/mxj/xmlseq.go:518 +0x1f2
main.androidHandler.applyVersion(0xc0420f0700, 0x481, 0x681, 0xc04216f330, 0x5, 0xc0421a8560, 0x13, 0xc0421a8580, 0xc04206f768, 0x4d6caa)
        /home/travis/gopath/src/github.com/gabrielrobert/xavtool/android_handler.go:89 +0x43f
main.androidHandler.changePackageVersion(0xc04200f100, 0x12, 0xc042009180, 0x5, 0xc042009170, 0x7, 0xc042012b90, 0x4d, 0x0, 0xc04216f330, ...)
        /home/travis/gopath/src/github.com/gabrielrobert/xavtool/android_handler.go:56 +0x82
main.setVersion(0xc04200f100, 0x12, 0xc042009180, 0x5, 0xc042009170, 0x7, 0xc042012b90, 0x4d, 0x0, 0xc04216f330, ...)
        /home/travis/gopath/src/github.com/gabrielrobert/xavtool/actions.go:132 +0x122
main.increment(0xc04207e6e0, 0xc042003000, 0xc04207e6e0)
        /home/travis/gopath/src/github.com/gabrielrobert/xavtool/actions.go:72 +0x551
github.com/urfave/cli.HandleAction(0x5fdb40, 0x6514a0, 0xc04207e6e0, 0x0, 0xc04204c360)
        /home/travis/gopath/src/github.com/urfave/cli/app.go:501 +0xcf
github.com/urfave/cli.Command.Run(0x64347c, 0x9, 0x0, 0x0, 0xc0420496b0, 0x1, 0x1, 0x647edf, 0x19, 0x0, ...)
        /home/travis/gopath/src/github.com/urfave/cli/command.go:165 +0x484
github.com/urfave/cli.(*App).Run(0xc0420d0000, 0xc042002400, 0x2, 0x2, 0x0, 0x0)
        /home/travis/gopath/src/github.com/urfave/cli/app.go:259 +0x6ef
main.main()
        /home/travis/gopath/src/github.com/gabrielrobert/xavtool/main.go:19 +0x480

but calling xavtool -c returns correct versions

PS C:\XXXXXXXX> .\xavtool.exe c
1.5.8 [1050800] - YYYYYYY (C:\XXXXXX\Droid\Properties\AndroidManifest.xml)
1.5.8 [1.5.8] - YYYYYYY (C:\XXXXXX\iOS\Info.plist)