AlistGo/alist · error
[doubao_new] upload v3 block missing upload_id
Error message
[doubao_new] upload v3 block missing upload_id
What it means
uploadBlockV3 (the per-block fallback re-upload path used after a 400/code-2 merge rejection) validates that uploadID is non-empty before building the request. An empty uploadID means the caller passed the identifier from a failed/uninitialized prepare.
Source
Thrown at drivers/doubao_new/util.go:821
}
success = append(success, seq)
offset += int(size)
}
return UploadMergeData{SuccessSeqList: success}, nil
}
errMsg := resp.Msg
if errMsg == "" {
errMsg = resp.Message
}
return UploadMergeData{}, fmt.Errorf("[doubao_new] API error (code: %d): %s", resp.Code, errMsg)
}
return resp.Data, nil
}
func (d *DoubaoNew) uploadBlockV3(ctx context.Context, uploadID string, block UploadBlockNeed, data []byte) error {
if uploadID == "" {
return fmt.Errorf("[doubao_new] upload v3 block missing upload_id")
}
if block.Seq < 0 {
return fmt.Errorf("[doubao_new] upload v3 block invalid seq")
}
if len(data) == 0 {
return fmt.Errorf("[doubao_new] upload v3 block empty data")
}
req := base.RestyClient.R()
req.SetContext(ctx)
req.SetHeader("accept", "*/*")
req.SetHeader("origin", "https://www.doubao.com")
req.SetHeader("referer", "https://www.doubao.com/")
req.SetHeader("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36")
req.SetHeader("rpc-persist-doubao-pan", "true")
req.SetHeader("x-block-seq", strconv.Itoa(block.Seq))
req.SetHeader("x-block-checksum", block.Checksum)
if auth := d.resolveAuthorization(); auth != "" {View on GitHub (pinned to 843d9dc814)
Solutions
- Ensure the uploadID from the prepare response is propagated verbatim into every blocks/merge/v3 call.
- Fail fast right after prepare if UploadID is empty rather than continuing into block upload.
- Do not retry on this error — it is deterministic until the prepare step is redone.
Example fix
// before
d.uploadBlockV3(ctx, "", block, payload)
// after
if uploadID == "" {
return fmt.Errorf("[doubao_new] cannot upload block: prepare returned no upload_id")
}
d.uploadBlockV3(ctx, uploadID, block, payload) Defensive patterns
Strategy: validation
Validate before calling
if uploadID == "" {
return fmt.Errorf("cannot upload block: missing upload_id (re-run prepare)")
} Prevention
- Fail fast after prepare if upload_id is empty.
- Propagate the uploadID as an immutable value through the upload chain.
When it happens
Trigger: Calling uploadBlockV3 directly with ""; or the fallback loop receiving an uploadID that was emptied/never set because prepare failed softly. In stock code mergeUploadBlocks already validated uploadID, so this is a defensive guard mostly relevant to refactors and direct callers.
Common situations: Custom code extracting the v3 fallback into a retry helper and losing the uploadID parameter; prepare response missing the field after an API change.
Related errors
- [doubao_new] merge blocks invalid block origin size
- [doubao_new] merge blocks empty data
- [doubao_new] v3 fallback invalid size: seq=%d size=%d
- [doubao_new] upload v3 block invalid seq
- [doubao_new] upload v3 block empty data
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/c9c0c0604c84cbdb.
Report an issue: GitHub.