AlistGo/alist · error

not get file info

Error message

not get file info

What it means

Error path in alist's ServeHTTP for a single-range request ('Range: bytes=start-end'). The parsed range ra is passed to RangeReadCloser.RangeRead; if the storage driver fails to open a reader for that byte window, the driver's error message is sent to the client with HTTP 416, upgraded to 429 when the error is ErrExceedMaxConcurrency (serve.go:146). As with the no-range path, 416 is misleading — the range was already validated by http_range.ParseRange, so this actually means 'backend reader failed'.

Source

Thrown at drivers/115/util.go:156

	file.From(&fileInfo.FileInfo)
	return FileObj{
		File:     *file,
		ThumbURL: fileInfo.ThumbURL,
	}
}

func (d *Pan115) getFileInfoWithThumb(queryKey, queryVal string) (*fileInfoWithThumb, error) {
	result := getFileInfoResponseWithThumb{}
	req := d.client.NewRequest().
		SetQueryParam(queryKey, queryVal).
		ForceContentType("application/json;charset=UTF-8").
		SetResult(&result)
	resp, err := req.Get(driver115.ApiFileInfo)
	if err := driver115.CheckErr(err, &result, resp); err != nil {
		return nil, err
	}
	if len(result.Files) == 0 {
		return nil, errors.New("not get file info")
	}
	return result.Files[0], nil
}

func (d *Pan115) getFilesPageWithThumb(dirID, apiURL string, limit, offset int64) (*fileListRespWithThumb, error) {
	if dirID == "" {
		dirID = "0"
	}
	result := fileListRespWithThumb{}
	params := map[string]string{
		"aid":              "1",
		"cid":              dirID,
		"o":                driver115.FileOrderByTime,
		"asc":              "1",
		"offset":           strconv.FormatInt(offset, 10),
		"show_dir":         "1",
		"limit":            strconv.FormatInt(limit, 10),
		"snap":             "0",

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Inspect the response body text — it is the verbatim backend error and identifies the failing operation (auth, 404, timeout, ExceedMaxConcurrency).
  2. For 'ExceedMaxConcurrency'/429: lower the number of concurrent streams (player setting 'single stream', fewer parallel segments) or raise the driver/downloader concurrency limit in alist.
  3. If the error indicates the remote rejected the range (e.g., 416/403 from upstream), verify the remote storage actually supports Range requests and that the file size hasn't changed.
  4. Refresh or reconfigure the storage driver (re-login token) if errors mention authorization.
  5. Retry the request after clearing cached links so alist re-fetches a fresh direct URL.

Example fix

// before: video player opens many parallel range connections
req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("Range", "bytes=0-")
resp, _ := http.DefaultClient.Do(req) // 429 ExceedMaxConcurrency under load

// after: single-stream range request with retry honoring Retry-After/backoff
for attempt := 0; attempt < 3; attempt++ {
    resp, err := http.DefaultClient.Do(req)
    if err == nil && resp.StatusCode != http.StatusTooManyRequests {
        break
    }
    time.Sleep(time.Duration(1<<attempt) * time.Second)
}
Defensive patterns

Strategy: retry

Validate before calling

// Validate the range is in-bounds before requesting, avoiding obvious 416s:
func validRange(start, end int64, size int64) bool {
    return size > 0 && start >= 0 && start < size && (end < 0 || end >= start) && end < size
}
// note: out-of-bounds ranges are filtered by ParseRange/sumRangesSize; a 416 here
// still means the BACKEND reader failed, so also probe availability with a 1-byte
// range request before starting long streaming sessions.

Prevention

When it happens

Trigger: A GET with exactly one valid Range entry where the backend cannot serve that slice: driver's ranged GET to the remote returns an error (expired URL, auth, network), a local driver cannot seek to the offset, or the shared ConcurrencyLimit is at zero so download() returns ErrExceedMaxConcurrency and the client gets 429 with body 'ExceedMaxConcurrency'.

Common situations: Video players and download managers (VLC, IDM, browsers resuming downloads) that issue byte-range requests against alist proxies; seek-to-position playback after the remote direct link has expired; remote storages that don't support ranged reads; concurrency exhaustion when multiple streams seek simultaneously; expired OAuth tokens on cloud drivers.

Related errors


AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15). Data as JSON: /api/errors/9be5076e098b0ea9. Report an issue: GitHub.