AlistGo/alist · error
GuangYaPan offline download only supports GuangYaPan destina
Error message
GuangYaPan offline download only supports GuangYaPan destination storage
What it means
AddURL for the GuangYaPan offline download tool requires the destination TempDir to live on a GuangYaPan storage mount. It resolves the storage driver via op.GetStorageAndActualPath(args.TempDir) and type-asserts it to *guangyapandriver.GuangYaPan; any other driver type fails this guard. This keeps the tool from submitting offline tasks whose result files it cannot place.
Source
Thrown at internal/offline_download/guangyapan/guangyapan.go:61
storage, _, err := op.GetStorageAndActualPath(tempDir)
if err != nil {
return false
}
if _, ok := storage.(*guangyapandriver.GuangYaPan); !ok {
return false
}
return true
}
func (g *GuangYaPan) AddURL(args *tool.AddUrlArgs) (string, error) {
g.refreshTaskCache = true
storage, actualPath, err := op.GetStorageAndActualPath(args.TempDir)
if err != nil {
return "", err
}
driver, ok := storage.(*guangyapandriver.GuangYaPan)
if !ok {
return "", errors.New("GuangYaPan offline download only supports GuangYaPan destination storage")
}
ctx := context.Background()
if err := op.MakeDir(ctx, storage, actualPath); err != nil {
return "", err
}
parentDir, err := op.GetUnwrap(ctx, storage, actualPath)
if err != nil {
return "", err
}
task, err := driver.OfflineDownload(ctx, args.Url, parentDir, "")
if err != nil {
return "", fmt.Errorf("failed to add offline download task: %w", err)
}
return task.TaskID, nil
}
func (g *GuangYaPan) Remove(task *tool.DownloadTask) error {View on GitHub (pinned to 843d9dc814)
Solutions
- Set the GuangYaPan temp dir setting to a directory that is on a GuangYaPan storage mount
- Make sure the destination path in the offline download request is inside the GuangYaPan mount
- Verify the GuangYaPan storage is loaded and its mount path matches the temp dir prefix
Defensive patterns
Strategy: validation
Validate before calling
// Before AddURL: confirm the temp dir lives on a GuangYaPan storage
storage, _, err := op.GetStorageAndActualPath(tempDir)
if err != nil { return err }
if _, ok := storage.(*guangyapandriver.GuangYaPan); !ok {
return fmt.Errorf("temp dir %s is not on GuangYaPan storage", tempDir)
} Prevention
- Configure the GuangYaPan temp dir setting on the GuangYaPan mount at setup time
- Validate the temp dir setting after any storage reconfiguration
- Surface the mount path requirement in the tool's UI description
When it happens
Trigger: Calling GuangYaPan.AddURL with args.TempDir pointing at a path on a non-GuangYaPan storage mount (local, 123, WebDAV, ...). Also if TempDir resolution lands on the wrong mount because of path-prefix overlap in the mount table.
Common situations: The admin set the GuangYaPan temp dir setting to a path on another storage; a user selected a destination directory on a different mount; or the storage was recreated so the mount path changed since the task config was written.
Related errors
- offline url is empty
- create offline task failed: empty task id
- failed
- canceled
- the task has been deleted
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/d345625bf9f2467a.
Report an issue: GitHub.