alist-org / alist

🗂️A file list/WebDAV program that supports multiple storages, powered by Gin and Solidjs. / 一个支持多存储的文件列表/WebDAV程序,使用 Gin 和 Solidjs。
https://alist.nn.ci
GNU Affero General Public License v3.0
42.46k stars 5.49k forks source link

TeraBox download error #4858

Closed earthjasonlin closed 1 year ago

earthjasonlin commented 1 year ago

Please make sure of the following things

Alist Version / Alist 版本

v3.23.0

Driver used / 使用的存储驱动

TeraBox

Describe the bug / 问题描述

302 Download error: 328C63F9-B133-46F6-8595-798BB2295A38

Reproduction / 复现链接

Official api

Logs / 日志

28F01EEF-07CB-4375-89C5-799686DB5854

anwen-anyi commented 1 year ago

提示:Request failed with status code 500 错误码

完整日志如下

log.log-可下载查看也可以在线查看

[GIN] 2023/07/28 - 12:37:22 | 200 |            0s |       127.0.0.1 | GET      "/本地"
[GIN] 2023/07/28 - 12:37:33 | 200 |            0s |       127.0.0.1 | GET      "/Terabox"
DEBU[2023-07-28 12:37:34]/source/server/middlewares/auth.go:66 github.com/alist-org/alist/v3/server/middlewares.Auth() use login token: &{ID:1 Username:admin Password:admin BasePath:/ Role:2 Disabled:false Permission:0 OtpSecret: SsoID:d0573b05-6ba0-47af-90d3-60bd8f294323} 

2023/07/28 12:37:34 /source/internal/db/meta.go:10
[0.000ms] [rows:0] SELECT * FROM `x_meta` WHERE `x_meta`.`path` = "/Terabox" ORDER BY `x_meta`.`id` LIMIT 1
DEBU[2023-07-28 12:37:34]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /Terabox                       
DEBU[2023-07-28 12:37:34]/source/internal/op/fs.go:101 github.com/alist-org/alist/v3/internal/op.List() op.List /                                    
DEBU[2023-07-28 12:37:34]/source/internal/op/fs.go:160 github.com/alist-org/alist/v3/internal/op.Get() op.Get /                                     
DEBU[2023-07-28 12:37:34]/source/internal/op/fs.go:113 github.com/alist-org/alist/v3/internal/op.List() list dir: &{ID: Path:/ Name:root Size:0 Modified:2023-07-28 11:23:07.381303 +0800 +0800 IsFolder:true} 
DEBU[2023-07-28 12:37:34]/source/internal/op/fs.go:145 github.com/alist-org/alist/v3/internal/op.List.func1() set cache: /Terabox => [0xc0007bd540 0xc0007bd560] 
DEBU[2023-07-28 12:37:34]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /Terabox                       
[GIN] 2023/07/28 - 12:37:34 | 200 |    811.0464ms |       127.0.0.1 | POST     "/api/fs/list"
[GIN] 2023/07/28 - 12:37:36 | 200 |            0s |       127.0.0.1 | GET      "/Terabox/IPA"
DEBU[2023-07-28 12:37:37]/source/server/middlewares/auth.go:66 github.com/alist-org/alist/v3/server/middlewares.Auth() use login token: &{ID:1 Username:admin Password:admin BasePath:/ Role:2 Disabled:false Permission:0 OtpSecret: SsoID:d0573b05-6ba0-47af-90d3-60bd8f294323} 

2023/07/28 12:37:37 /source/internal/db/meta.go:10
[0.000ms] [rows:0] SELECT * FROM `x_meta` WHERE `x_meta`.`path` = "/Terabox/IPA" ORDER BY `x_meta`.`id` LIMIT 1
DEBU[2023-07-28 12:37:37]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /Terabox                       
DEBU[2023-07-28 12:37:37]/source/internal/op/fs.go:101 github.com/alist-org/alist/v3/internal/op.List() op.List /IPA                                 
DEBU[2023-07-28 12:37:37]/source/internal/op/fs.go:160 github.com/alist-org/alist/v3/internal/op.Get() op.Get /IPA                                  
DEBU[2023-07-28 12:37:37]/source/internal/op/fs.go:101 github.com/alist-org/alist/v3/internal/op.List() op.List /                                    
DEBU[2023-07-28 12:37:37]/source/internal/op/fs.go:105 github.com/alist-org/alist/v3/internal/op.List() use cache when list /                        
DEBU[2023-07-28 12:37:37]/source/internal/op/fs.go:113 github.com/alist-org/alist/v3/internal/op.List() list dir: &{Object:{ID:63379289620761 Path:/IPA Name:IPA Size:0 Modified:2023-06-23 21:44:51 +0800 CST IsFolder:true} Thumbnail:{Thumbnail:}} 
DEBU[2023-07-28 12:37:37]/source/internal/op/fs.go:145 github.com/alist-org/alist/v3/internal/op.List.func1() set cache: /Terabox/IPA => [0xc000981a60 0xc000981a80 0xc000981aa0] 
DEBU[2023-07-28 12:37:37]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /Terabox                       
[GIN] 2023/07/28 - 12:37:37 | 200 |    384.0219ms |       127.0.0.1 | POST     "/api/fs/list"
DEBU[2023-07-28 12:37:39]/source/server/middlewares/auth.go:66 github.com/alist-org/alist/v3/server/middlewares.Auth() use login token: &{ID:1 Username:admin Password:admin BasePath:/ Role:2 Disabled:false Permission:0 OtpSecret: SsoID:d0573b05-6ba0-47af-90d3-60bd8f294323} 

2023/07/28 12:37:39 /source/internal/db/meta.go:10
[0.000ms] [rows:0] SELECT * FROM `x_meta` WHERE `x_meta`.`path` = "/Terabox/IPA/nPlayerPlus.ipa" ORDER BY `x_meta`.`id` LIMIT 1
DEBU[2023-07-28 12:37:39]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /Terabox                       
DEBU[2023-07-28 12:37:39]/source/internal/op/fs.go:160 github.com/alist-org/alist/v3/internal/op.Get() op.Get /IPA/nPlayerPlus.ipa                  
DEBU[2023-07-28 12:37:39]/source/internal/op/fs.go:101 github.com/alist-org/alist/v3/internal/op.List() op.List /IPA                                 
DEBU[2023-07-28 12:37:39]/source/internal/op/fs.go:105 github.com/alist-org/alist/v3/internal/op.List() use cache when list /IPA                     
DEBU[2023-07-28 12:37:39]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /Terabox                       
DEBU[2023-07-28 12:37:39]/source/internal/op/path.go:25 github.com/alist-org/alist/v3/internal/op.GetStorageAndActualPath() use storage:  /Terabox                       
DEBU[2023-07-28 12:37:39]/source/internal/op/fs.go:160 github.com/alist-org/alist/v3/internal/op.Get() op.Get /IPA/nPlayerPlus.ipa                  
DEBU[2023-07-28 12:37:39]/source/internal/op/fs.go:101 github.com/alist-org/alist/v3/internal/op.List() op.List /IPA                                 
DEBU[2023-07-28 12:37:39]/source/internal/op/fs.go:105 github.com/alist-org/alist/v3/internal/op.List() use cache when list /IPA                     

2023/07/28 12:37:39 [Recovery] 2023/07/28 - 12:37:39 panic recovered:
POST /api/fs/get HTTP/1.1
Host: 127.0.0.1:5244
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,de;q=0.7,ja;q=0.6
Authorization: *
Connection: keep-alive
Content-Length: 53
Content-Type: application/json;charset=UTF-8
Cookie: casdoor_session_id=64d37cc46ca1d557f273e19557f69512
Origin: http://127.0.0.1:5244
Referer: http://127.0.0.1:5244/Terabox/IPA
Sec-Ch-Ua: "Not-A.Brand";v="24", "Chromium";v="14"
Sec-Ch-Ua-Mobile: ?0
Sec-Ch-Ua-Platform: "Windows"
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.125 Safari/537.36

runtime error: index out of range [0] with length 0

runtime/debug.Stack()
    /usr/local/go/src/runtime/debug/stack.go:24 +0x65
github.com/alist-org/alist/v3/pkg/singleflight.newPanicError({0x1876380?, 0xc000d16930})
    /source/pkg/singleflight/singleflight.go:35 +0x2c
github.com/alist-org/alist/v3/pkg/singleflight.(*Group[...]).doCall.func2.1()
    /source/pkg/singleflight/singleflight.go:188 +0x3b
panic({0x1876380, 0xc000d16930})
    /usr/local/go/src/runtime/panic.go:884 +0x213
github.com/alist-org/alist/v3/drivers/terabox.(*Terabox).linkOfficial(0xc0002e4500, {0x23d2178, 0xc0001d2e70}, {{0xc0008c7400, 0x9}, 0xc000dec300, {0x0, 0x0}, 0xc000bf0b00})
    /source/drivers/terabox/util.go:142 +0x950
github.com/alist-org/alist/v3/drivers/terabox.(*Terabox).Link(0xc000b9edf8?, {0x21f3ca?, 0xc000d817a0?}, {0x23d2178?, 0xc0001d2e70?}, {{0xc0008c7400, 0x9}, 0xc000dec300, {0x0, 0x0}, ...})
    /source/drivers/terabox/driver.go:69 +0xb6
github.com/alist-org/alist/v3/internal/op.Link.func1()
    /source/internal/op/fs.go:251 +0x63
github.com/alist-org/alist/v3/pkg/singleflight.(*Group[...]).doCall.func2(0xc0002857c0, 0xd0, 0x1817280?)
    /source/pkg/singleflight/singleflight.go:193 +0x71
github.com/alist-org/alist/v3/pkg/singleflight.(*Group[...]).doCall(0xc000decb70?, 0xc000da73b0?, {0xc000da73b0?, 0x6dfb17?}, 0xc000206b00?)
    /source/pkg/singleflight/singleflight.go:195 +0xac
github.com/alist-org/alist/v3/pkg/singleflight.(*Group[...]).Do(0x23f1580, {0xc000da73b0, 0x26}, 0xc000d81408)
    /source/pkg/singleflight/singleflight.go:108 +0x179
github.com/alist-org/alist/v3/internal/op.Link({0x23cf1a8, 0xc0008ef100}, {0x23d70b8?, 0xc0002e4500?}, {0xc000d81408, 0x14}, {{0xc0008c7400, 0x9}, 0xc000dec300, {0x0, ...}, ...})
    /source/internal/op/fs.go:260 +0x409
github.com/alist-org/alist/v3/internal/fs.link({0x23cf1a8?, 0xc0008ef100}, {0xc000d81400?, 0x1?}, {{0xc0008c7400, 0x9}, 0xc000dec300, {0x0, 0x0}, 0xc000bf0b00})
    /source/internal/fs/link.go:19 +0x110
github.com/alist-org/alist/v3/internal/fs.Link({0x23cf1a8?, 0xc0008ef100?}, {0xc000d81400, 0x1c}, {{0xc0008c7400, 0x9}, 0xc000dec300, {0x0, 0x0}, 0xc000bf0b00})
    /source/internal/fs/fs.go:48 +0x71
github.com/alist-org/alist/v3/server/handles.FsGet(0xc0008ef100)
    /source/server/handles/fsread.go:289 +0x79b
github.com/gin-gonic/gin.(*Context).Next(...)
    /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/alist-org/alist/v3/server/middlewares.Auth(0xc0008ef100)
    /source/server/middlewares/auth.go:67 +0x4e8
github.com/gin-gonic/gin.(*Context).Next(...)
    /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/alist-org/alist/v3/server/middlewares.StoragesLoaded(0xc0008ef100)
    /source/server/middlewares/check.go:14 +0xae
github.com/gin-gonic/gin.(*Context).Next(...)
    /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1(0xc0008ef100)
    /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/recovery.go:102 +0x82
github.com/gin-gonic/gin.(*Context).Next(...)
    /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/gin-gonic/gin.LoggerWithConfig.func1(0xc0008ef100)
    /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/logger.go:240 +0xe7
github.com/gin-gonic/gin.(*Context).Next(...)
    /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc0008ce1a0, 0xc0008ef100)
    /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:620 +0x66b
github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc0008ce1a0, {0x23cd570?, 0xc000dfa1c0}, 0xc000bf0b00)
    /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:576 +0x1dd
net/http.serverHandler.ServeHTTP({0x23c8f70?}, {0x23cd570, 0xc000dfa1c0}, 0xc000bf0b00)
    /usr/local/go/src/net/http/server.go:2936 +0x316
net/http.(*conn).serve(0xc0007adef0, {0x23ce920, 0xc0002fcb70})
    /usr/local/go/src/net/http/server.go:1995 +0x612
created by net/http.(*Server).Serve
    /usr/local/go/src/net/http/server.go:3089 +0x5ed

/source/pkg/singleflight/singleflight.go:165 (0x6cb929)
/source/pkg/singleflight/singleflight.go:200 (0x6d7f06)
/source/pkg/singleflight/singleflight.go:108 (0x6d84b8)
/source/internal/op/fs.go:260 (0x6c0548)
/source/internal/fs/link.go:19 (0xb5732f)
/source/internal/fs/fs.go:48 (0xb56250)
/source/server/handles/fsread.go:289 (0x1357afa)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0x12ee667)
/source/server/middlewares/auth.go:67 (0x12ee454)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0x12ee98d)
/source/server/middlewares/check.go:14 (0x12ee979)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xb46d81)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/recovery.go:102 (0xb46d6c)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xb45ea6)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/logger.go:240 (0xb45e89)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xb44f4a)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:620 (0xb44bd1)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:576 (0xb446fc)
/usr/local/go/src/net/http/server.go:2936 (0x56df95)
/usr/local/go/src/net/http/server.go:1995 (0x5694b1)
/usr/local/go/src/runtime/asm_amd64.s:1598 (0x27f6a0)

[GIN] 2023/07/28 - 12:37:39 | 500 |    361.0207ms |       127.0.0.1 | POST     "/api/fs/get"