Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: runtime error: index out of range [1] with length 1 #138

Closed
88250 opened this issue Jul 2, 2024 · 4 comments
Closed

panic: runtime error: index out of range [1] with length 1 #138

88250 opened this issue Jul 2, 2024 · 4 comments

Comments

@88250
Copy link

88250 commented Jul 2, 2024

go mobile Android 环境:

E 2024/07/02 10:03:52 logging.go:165: PANIC RECOVERED: runtime error: index out of range [1] with length 1
	D:/go1.22/src/runtime/panic.go:770 (0x7a19c47423)
D:/go1.22/src/runtime/panic.go:114 (0x7a19c45f6b)
F:/golang/gopath/pkg/mod/github.com/matishsiao/go!info@v0.0.0-20210923090445-da2e3fa8d45f/goInfo_linux.go:21 (0x7a1b12bccf)
F:/golang/gopath/pkg/mod/github.com/qiniu/go-sdk/v7@v7.21.1/storagev2/internal/uplog/uplog.go:69 (0x7a1b13086f)
D:/go1.22/src/sync/once.go:74 (0x7a19c8bd3f)
D:/go1.22/src/sync/once.go:65 (0x7a1b12da8f)
F:/golang/gopath/pkg/mod/github.com/qiniu/go-sdk/v7@v7.21.1/storagev2/internal/uplog/uplog.go:68 (0x7a1b12da68)
F:/golang/gopath/pkg/mod/github.com/qiniu/go-sdk/v7@v7.21.1/storagev2/internal/uplog/request_uplog.go:69 (0x7a1b12bf07)
F:/golang/gopath/pkg/mod/github.com/qiniu/go-sdk/v7@v7.21.1/storagev2/apis/api_post_object.go:100 (0x7a1b130fbf)
F:/golang/gopath/pkg/mod/github.com/qiniu/go-sdk/v7@v7.21.1/storage/form_upload.go:224 (0x7a1b132f8f)
F:/golang/gopath/pkg/mod/github.com/qiniu/go-sdk/v7@v7.21.1/storage/form_upload.go:195 (0x7a1b132917)
F:/golang/gopath/pkg/mod/github.com/qiniu/go-sdk/v7@v7.21.1/storage/form_upload.go:141 (0x7a1b13262b)
F:/golang/gopath/pkg/mod/github.com/qiniu/go-sdk/v7@v7.21.1/storage/form_upload.go:108 (0x7a1b142967)
F:/golang/gopath/pkg/mod/github.com/siyuan-note/dejavu@v0.0.0-20240626145351-e4f9b0821aaf/cloud/siyuan.go:75 (0x7a1b142904)

在 iOS 下也有类似问题:

E 2024/07/10 19:13:51 logging.go:165: PANIC RECOVERED: runtime error: index out of range [1] with length 1
	/usr/local/go/src/runtime/panic.go:770 (0x102481053)
/usr/local/go/src/runtime/panic.go:114 (0x10247fb9b)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/matishsiao/go!info@v0.0.0-20210923090445-da2e3fa8d45f/goInfo_darwin.go:21 (0x103967e7f)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/qiniu/go-sdk/v7@v7.21.1/storagev2/internal/uplog/uplog.go:69 (0x10396ca0f)
/usr/local/go/src/sync/once.go:74 (0x1024c5d1f)
/usr/local/go/src/sync/once.go:65 (0x103969c2f)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/qiniu/go-sdk/v7@v7.21.1/storagev2/internal/uplog/uplog.go:68 (0x103969c08)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/qiniu/go-sdk/v7@v7.21.1/storagev2/internal/uplog/request_uplog.go:69 (0x1039680c7)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/qiniu/go-sdk/v7@v7.21.1/storagev2/apis/api_post_object.go:100 (0x10396d163)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/qiniu/go-sdk/v7@v7.21.1/storage/form_upload.go:224 (0x10396f133)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/qiniu/go-sdk/v7@v7.21.1/storage/form_upload.go:195 (0x10396eab7)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/qiniu/go-sdk/v7@v7.21.1/storage/form_upload.go:141 (0x10396e7cb)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/qiniu/go-sdk/v7@v7.21.1/storage/form_upload.go:108 (0x10397eb3b)
@bachue
Copy link
Contributor

bachue commented Sep 25, 2024

@88250 新的版本已经解决了该问题

@bachue bachue closed this as completed Sep 25, 2024
@88250
Copy link
Author

88250 commented Sep 25, 2024

但我看到 go.mod 中并未升级 github.com/matishsiao/goInfo 依赖,所以是在调用时解决的吗?

@bachue
Copy link
Contributor

bachue commented Sep 26, 2024

@88250 是的,goInfo 在新的版本里不会再用了。

@88250
Copy link
Author

88250 commented Sep 26, 2024

收到,建议去掉 go.mod 中相应的配置,谢谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants