AlistGo/alist · error

calculate md5 of slice %d failed: %w

Error message

calculate md5 of slice %d failed: %w

What it means

Error "calculate md5 of slice %d failed: %w" thrown in AlistGo/alist.

Source

Thrown at drivers/123_open/upload.go:118

	}
	if int64(uploadThread) > sliceCount {
		uploadThread = int(sliceCount)
	}

	progress := &uploadProgress{total: size, up: up}
	threadG, uploadCtx := errgroup.WithContext(ctx)
	threadG.SetLimit(uploadThread)
	for i := int64(0); i < sliceCount; i++ {
		if utils.IsCanceled(uploadCtx) {
			break
		}
		sliceNo := i + 1
		offset := i * sliceSize
		length := min(sliceSize, size-offset)
		threadG.Go(func() error {
			sliceMD5, err := utils.HashReader(utils.MD5, io.NewSectionReader(tmpF, offset, length))
			if err != nil {
				return fmt.Errorf("calculate md5 of slice %d failed: %w", sliceNo, err)
			}
			reader := &progressReader{
				Reader:   io.NewSectionReader(tmpF, offset, length),
				progress: progress,
			}
			server := servers[int(i)%len(servers)]
			err = d.client.Upload.UploadSlice(uploadCtx, server, created.PreuploadID, sliceNo, sliceMD5,
				driver.NewLimitedUploadStream(uploadCtx, reader))
			if err != nil {
				return fmt.Errorf("upload slice %d failed: %w", sliceNo, err)
			}
			return nil
		})
	}
	if err := threadG.Wait(); err != nil {
		return nil, err
	}
	if err := ctx.Err(); err != nil {

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Inspect the underlying error details in the message, fix the indicated cause (credentials, network, or provider-side failure), and retry.

When it happens

Trigger: Thrown at drivers/123_open/upload.go:118 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/4d9ebd8cfee9a30f. Report an issue: GitHub.