AlistGo/alist · error

chunk too short

Error message

chunk too short

What it means

Error "chunk too short" thrown in AlistGo/alist.

Source

Thrown at drivers/mega/driver.go:183

			return err
		}

		reader := driver.NewLimitedUploadStream(ctx, stream)
		for id := 0; id < u.Chunks(); id++ {
			if utils.IsCanceled(ctx) {
				return ctx.Err()
			}
			_, chkSize, err := u.ChunkLocation(id)
			if err != nil {
				return err
			}
			chunk := make([]byte, chkSize)
			n, err := io.ReadFull(reader, chunk)
			if err != nil && err != io.EOF {
				return err
			}
			if n != len(chunk) {
				return errors.New("chunk too short")
			}

			err = u.UploadChunk(id, chunk)
			if err != nil {
				return err
			}
			up(float64(id) * 100 / float64(u.Chunks()))
		}

		_, err = u.Finish()
		return err
	}
	return fmt.Errorf("unable to convert dir to mega n")
}

//func (d *Mega) Other(ctx context.Context, args model.OtherArgs) (interface{}, error) {
//	return nil, errs.NotSupport
//}

View on GitHub (pinned to 843d9dc814)

Solutions

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

When it happens

Trigger: Thrown at drivers/mega/driver.go:183 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/931d262b2935c408. Report an issue: GitHub.