AlistGo/alist · error
get upload_config failed: %s
Error message
get upload_config failed: %s
What it means
The Doubao upload-config request returned a ResponseMetadata error other than 100028 (which is handled by token refresh), and the driver surfaces the backend's Message verbatim. This is the generic failure path for obtaining the upload address (host, store URI, slice size) required before any bytes are sent.
Source
Thrown at drivers/doubao/util.go:398
return nil
}
// 100028 凭证过期
if configResp.ResponseMetadata.Error.CodeN == 100028 && !tokenRefreshed {
log.Debugln("[doubao] Upload token expired, re-fetching...")
newToken, err := d.initUploadToken()
if err != nil {
return fmt.Errorf("failed to refresh token: %w", err)
}
d.UploadToken = newToken
tokenRefreshed = true
uploadUrl, params = configureParams()
return retry.Error{errors.New("token refreshed, retry needed")}
}
return fmt.Errorf("get upload_config failed: %s", configResp.ResponseMetadata.Error.Message)
})
return err
}
// uploadNode 上传 文件信息
func (d *Doubao) uploadNode(uploadConfig *UploadConfig, dir model.Obj, file model.FileStreamer, dataType string) (UploadNodeResp, error) {
reqUuid := uuid.New().String()
var key string
var nodeType int
mimetype := file.GetMimetype()
switch dataType {
case VideoDataType:
key = uploadConfig.InnerUploadAddress.UploadNodes[0].Vid
if strings.HasPrefix(mimetype, "audio/") {
nodeType = AudioType // 音频类型
} else {View on GitHub (pinned to 843d9dc814)
Solutions
- Read the Message text — Doubao messages are usually descriptive (quota, permission, invalid params)
- Retry after re-login if the message hints at auth even though code != 100028
- Reduce concurrent upload threads (uploadThread setting) if the message indicates throttling
- If it persistently fails with a fresh login, check the driver repo for API-contract updates
Example fix
// before
return fmt.Errorf("get upload_config failed: %s", configResp.ResponseMetadata.Error.Message)
// after
return fmt.Errorf("get upload_config failed: code=%d msg=%s (request_id: %s)",
configResp.ResponseMetadata.Error.CodeN,
configResp.ResponseMetadata.Error.Message,
configResp.ResponseMetadata.RequestId) Defensive patterns
Strategy: try-catch
Validate before calling
if _, err := d.GetUserInfo(ctx); err != nil {
return fmt.Errorf("doubao session invalid before upload: %w", err)
} Type guard
func isUploadConfigError(err error) bool {
return err != nil && strings.Contains(err.Error(), "get upload_config failed")
} Try / catch
if isUploadConfigError(err) {
msg := extractMessage(err)
if containsAny(msg, "limit", "frequent") { return backoffRetry(60*time.Second) }
if containsAny(msg, "auth", "login") { return relogin() }
return fail(err)
} Prevention
- Pre-flight a cheap authenticated call before large uploads
- Throttle concurrent uploads below provider limits
- Keep driver updated after Doubao app releases
When it happens
Trigger: Calling getUploadConfig with a token whose Alice/Samantha credentials lack upload permission, a data type the backend rejects, quota/rate errors, or any non-100028 backend error code; also reached when 100028 occurs a second time after one refresh (tokenRefreshed already true).
Common situations: Cookie valid enough for listing but not for uploads; account storage full; too many concurrent uploads; Doubao app/API version change introducing new required parameters.
Related errors
- upload failed: %s
- failed to commit upload: %w
- failed to upload node: %w
- init upload failed: %s
- upload part failed: %s
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/8e43016642d58606.
Report an issue: GitHub.