AlistGo/alist · error

unsupported storage driver for offline download, only Thunde

Error message

unsupported storage driver for offline download, only Thunder is supported

What it means

Thunder.AddURL() type-asserts the storage behind args.TempDir to *thunder.Thunder; only a Thunder (Xunlei) cloud-drive mount can accept offline tasks. Any other driver (local disk, another cloud) fails the assertion and the URL is never submitted.

Source

Thrown at internal/offline_download/thunder/thunder.go:63

	if err != nil {
		return false
	}
	if _, ok := storage.(*thunder.Thunder); !ok {
		return false
	}
	return true
}

func (t *Thunder) AddURL(args *tool.AddUrlArgs) (string, error) {
	// 添加新任务刷新缓存
	t.refreshTaskCache = true
	storage, actualPath, err := op.GetStorageAndActualPath(args.TempDir)
	if err != nil {
		return "", err
	}
	thunderDriver, ok := storage.(*thunder.Thunder)
	if !ok {
		return "", fmt.Errorf("unsupported storage driver for offline download, only Thunder is supported")
	}

	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 := thunderDriver.OfflineDownload(ctx, args.Url, parentDir, "")
	if err != nil {
		return "", fmt.Errorf("failed to add offline download task: %w", err)
	}

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Set the download directory to a path on the Thunder storage mount
  2. Or use http/aria2 for local destinations
  3. Confirm the storage driver shows 'Thunder' in the admin storages page

Example fix

// before
{ "tool": "thunder", "temp_dir": "/local/dl" }

// after
{ "tool": "thunder", "temp_dir": "/thunder/dl" }
Defensive patterns

Strategy: type-guard

Validate before calling

storage, _, err := op.GetStorageAndActualPath(args.TempDir)
if err != nil {
    return err
}
if storage.Driver != "Thunder" {
    return fmt.Errorf("thunder tool requires a Thunder mount, got %s", storage.Driver)
}

Type guard

func asThunder(tempDir string) (*thunder.Thunder, error) {
    storage, _, err := op.GetStorageAndActualPath(tempDir)
    if err != nil {
        return nil, err
    }
    d, ok := storage.(*thunder.Thunder)
    if !ok {
        return nil, fmt.Errorf("%s is on %q storage, need Thunder", tempDir, storage.Driver)
    }
    return d, nil
}

Try / catch

if _, err := t.AddURL(args); err != nil {
    if strings.Contains(err.Error(), "only Thunder is supported") {
        return userError("select a Thunder storage directory")
    }
    return err
}

Prevention

When it happens

Trigger: Adding a URL with tool=thunder while the temp/save dir is on local or non-Thunder storage; Thunder storage unmounted between configuration and use.

Common situations: Offline download tool set to Thunder but destination left at the default local path; mount path typo pointing at the wrong storage.

Related errors


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