AlistGo/alist · error
move failed: %s
Error message
move failed: %s
What it means
GuangYaPan Move error: /file/move_file returned non-success msg, surfaced as 'move failed: <backend msg>'. On success the driver then polls a taskID; this error indicates the move was rejected before a task was created.
Source
Thrown at drivers/guangyapan/driver.go:340
if err := d.ensureAccessToken(ctx); err != nil {
return err
}
fileID := strings.TrimSpace(srcObj.GetID())
if fileID == "" {
return errors.New("file id is empty")
}
parentID := dstDir.GetID()
var out deleteResp
if err := d.postAPI(ctx, "/nd.bizuserres.s/v1/file/move_file", map[string]any{
"fileIds": []string{fileID},
"parentId": parentID,
}, &out); err != nil {
return err
}
if !strings.EqualFold(strings.TrimSpace(out.Msg), "success") {
return fmt.Errorf("move failed: %s", strings.TrimSpace(out.Msg))
}
taskID := strings.TrimSpace(out.Data.TaskID)
if taskID == "" {
return nil
}
return d.waitTaskDone(ctx, taskID)
}
func (d *GuangYaPan) Copy(ctx context.Context, srcObj, dstDir model.Obj) error {
if err := d.ensureAccessToken(ctx); err != nil {
return err
}
fileID := strings.TrimSpace(srcObj.GetID())
if fileID == "" {
return errors.New("file id is empty")
}
parentID := dstDir.GetID()View on GitHub (pinned to 843d9dc814)
Solutions
- Read the backend msg for the exact rejection reason
- Refresh the destination listing and confirm parentID is an existing writable folder
- Serialize move/copy operations on the same file to avoid backend task locks
- Retry after the previous async task on that file completes
Defensive patterns
Strategy: try-catch
Try / catch
err := d.Move(ctx, srcObj, dstDir)
if err != nil && strings.HasPrefix(err.Error(), "move failed") {
// inspect backend msg; refresh destination before retrying
} Prevention
- Validate dstDir still exists in a fresh listing right before moving
- Serialize move/copy tasks per file to avoid backend lock rejections
When it happens
Trigger: Calling Move where the backend rejects moving the fileIds into parentId: destination not a folder or deleted, file locked by another async task, same source and destination, or permission limits — msg != success.
Common situations: Moving into a folder that was just removed; concurrent move/copy of the same file; moving into a shared folder without write rights; destination ID copied from stale cache.
Related errors
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/f8ee76b9f75b0daf.
Report an issue: GitHub.