tickstep / cloudpan189-go

天翼云盘命令行客户端(CLI),基于GO语言实现

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ubuntu 21.10报错:panic: runtime error: index out of range [1] with length 0

zyworkshop opened this issue · comments

oroutine 1 [running]:
github.com/tickstep/cloudpan189-api/cloudpan.getLoginParams(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/Users/tickstep/Applications/go/pkg/mod/github.com/tickstep/cloudpan189-api@v0.0.8/cloudpan/login.go:151 +0x4b2
github.com/tickstep/cloudpan189-api/cloudpan.Login(0x7fff78dae30d, 0xb, 0x7fff78dae323, 0x8, 0xc00009e000, 0x0)
/Users/tickstep/Applications/go/pkg/mod/github.com/tickstep/cloudpan189-api@v0.0.8/cloudpan/login.go:68 +0xc5
github.com/tickstep/cloudpan189-go/cmder.DoLoginHelper(0x7fff78dae30d, 0xb, 0x7fff78dae323, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/tickstep/Documents/Workspace/go/projects/cloudpan189-go/cmder/cmder_helper.go:81 +0x2f1
github.com/tickstep/cloudpan189-go/internal/command.RunLogin(0x7fff78dae30d, 0xb, 0x7fff78dae323, 0x8, 0x8, 0xc00030d448, 0x40a43f, 0xc00030d448, 0x7a9076, 0xc0001dc360, ...)
/Users/tickstep/Documents/Workspace/go/projects/cloudpan189-go/internal/command/login.go:132 +0xcb
github.com/tickstep/cloudpan189-go/internal/command.CmdLogin.func1(0xc00014af20, 0xcd3840, 0xc0003647e0)
/Users/tickstep/Documents/Workspace/go/projects/cloudpan189-go/internal/command/login.go:50 +0x17b
github.com/urfave/cli.HandleAction(0x8d4ba0, 0x9a0178, 0xc00014af20, 0xc00014af20, 0x0)
/Users/tickstep/Applications/go/pkg/mod/github.com/urfave/cli@v1.21.1-0.20190817182405-23c83030263f/app.go:523 +0x105
github.com/urfave/cli.Command.Run(0x975242, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x981f23, 0x18, 0x0, ...)
/Users/tickstep/Applications/go/pkg/mod/github.com/urfave/cli@v1.21.1-0.20190817182405-23c83030263f/command.go:174 +0x579
github.com/urfave/cli.(*App).Run(0xc0001ea380, 0xc00001e080, 0x4, 0x4, 0x0, 0x0)
/Users/tickstep/Applications/go/pkg/mod/github.com/urfave/cli@v1.21.1-0.20190817182405-23c83030263f/app.go:276 +0x7e8
main.main()
/Users/tickstep/Documents/Workspace/go/projects/cloudpan189-go/main.go:477 +0x18ba

树莓派同样报错,调试信息显示登录成功

研究了半天,发现是cloud189_uploading.json的问题,只要把这个文件删了就好了。
估计是里面的内容corrupt了,程序在读取这个文件的时候就会出错。