AlistGo/alist · error

nil object

Error message

nil object

What it means

Sentinel-style validation guard in DoubaoNew.Remove: it fires when the caller passes a nil model.Obj to Remove. There is no object to resolve a delete token from, so the driver refuses up front instead of panicking on obj.GetID().

Solutions

  1. Check the storage configuration and the provider's service status, fix the indicated cause, and retry the operation.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at drivers/doubao_new/driver.go:203 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/020dd78bbf8aebe4. Report an issue: GitHub.

Appendix: source

Thrown at drivers/doubao_new/driver.go:203

		}
	}

	if obj, ok := srcObj.(*Object); ok {
		clone := *obj
		clone.Name = newName
		return &clone, nil
	}
	return srcObj, nil
}

func (d *DoubaoNew) Copy(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error) {
	// TODO copy obj, optional
	return nil, errs.NotImplement
}

func (d *DoubaoNew) Remove(ctx context.Context, obj model.Obj) error {
	if obj == nil {
		return errors.New("nil object")
	}
	token := obj.GetID()
	if token == "" {
		if o, ok := obj.(*Object); ok {
			token = o.ObjToken
		}
	}
	if token == "" {
		return errors.New("missing object token")
	}
	return d.removeObj(ctx, []string{token})
}

func (d *DoubaoNew) Put(ctx context.Context, dstDir model.Obj, file model.FileStreamer, up driver.UpdateProgress) (model.Obj, error) {
	if file == nil {
		return nil, errors.New("nil file")
	}
	if file.GetSize() <= 0 {

View on GitHub (pinned to 843d9dc814)