AlistGo/alist · error
jsToken not found, html
Error message
jsToken not found, html: %s
What it means
resetJsToken scraped the Terabox homepage HTML but the expected obfuscated jsToken assignment string was not found, so no jsToken could be extracted. Usually means Terabox changed its page markup or returned an error/login page instead.
Solutions
- Verify the referenced file/path/ID exists and is correct, then retry the operation.
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at drivers/terabox/util.go:51 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/c0df6a0f6676797d.
Report an issue: GitHub.
Appendix: source
Thrown at drivers/terabox/util.go:51
return mid
}
func (d *Terabox) resetJsToken() error {
u := d.base_url
res, err := base.RestyClient.R().SetHeaders(map[string]string{
"Cookie": d.Cookie,
"Accept": "application/json, text/plain, */*",
"Referer": d.base_url,
"User-Agent": base.UserAgent,
"X-Requested-With": "XMLHttpRequest",
}).Get(u)
if err != nil {
return err
}
html := res.String()
jsToken := getStrBetween(html, "`function%20fn%28a%29%7Bwindow.jsToken%20%3D%20a%7D%3Bfn%28%22", "%22%29`")
if jsToken == "" {
return fmt.Errorf("jsToken not found, html: %s", html)
}
d.JsToken = jsToken
return nil
}
func (d *Terabox) request(rurl string, method string, callback base.ReqCallback, resp interface{}, noRetry ...bool) ([]byte, error) {
req := base.RestyClient.R()
req.SetHeaders(map[string]string{
"Cookie": d.Cookie,
"Accept": "application/json, text/plain, */*",
"Referer": d.base_url,
"User-Agent": base.UserAgent,
"X-Requested-With": "XMLHttpRequest",
})
req.SetQueryParams(map[string]string{
"app_id": "250528",
"web": "1",
"channel": "dubox",View on GitHub (pinned to 843d9dc814)