{"record":{"id":"a0c06adc3560cbaa","repo":"juicedata/juicefs","slug":"list-failed-s","errorCode":null,"errorMessage":"list failed: %s","messagePattern":"list failed: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/objbench.go","lineNumber":912,"sourceCode":"\t\t\t\t}\n\t\t\t\tif objs[0].Key() != \"\" {\n\t\t\t\t\treturn fmt.Errorf(\"first key should be empty string, but got %s\", objs[0].Key())\n\t\t\t\t}\n\t\t\t\tif objs[0].Size() != 0 {\n\t\t\t\t\treturn fmt.Errorf(\"first object size should be 0, but got %d\", objs[0].Size())\n\t\t\t\t}\n\t\t\t\tif objs[1].Key() != key {\n\t\t\t\t\treturn fmt.Errorf(\"first key should be test, but got %s\", objs[1].Key())\n\t\t\t\t}\n\t\t\t\tif objs[1].Size() != 5 {\n\t\t\t\t\treturn fmt.Errorf(\"size of first key shold be 5, but got %v\", objs[1].Size())\n\t\t\t\t}\n\t\t\t\tnow := time.Now()\n\t\t\t\tif objs[1].Mtime().Before(now.Add(-30*time.Second)) || objs[1].Mtime().After(now.Add(time.Second*30)) {\n\t\t\t\t\treturn fmt.Errorf(\"mtime of key should be within 30 seconds, but got %s\", objs[1].Mtime().Sub(now))\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn fmt.Errorf(\"list failed: %s\", err)\n\t\t\t}\n\n\t\t\tobjs, err = listAll(ctx, blob, \"\", \"test2\", 1)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"list failed: %s\", err)\n\t\t\t} else if len(objs) != 0 {\n\t\t\t\treturn fmt.Errorf(\"list should not return anything, but got %d\", len(objs))\n\t\t\t}\n\t\t} else {\n\t\t\tobjs, err2 := listAll(ctx, blob, \"\", \"\", 1)\n\t\t\tif err2 == nil {\n\t\t\t\tif len(objs) != 1 {\n\t\t\t\t\treturn fmt.Errorf(\"list should return 1 keys, but got %d\", len(objs))\n\t\t\t\t}\n\t\t\t\tif objs[0].Key() != key {\n\t\t\t\t\treturn fmt.Errorf(\"first key should be test, but got %s\", objs[0].Key())\n\t\t\t\t}\n\t\t\t\tif objs[0].Size() != 5 {","sourceCodeStart":894,"sourceCodeEnd":930,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/cmd/objbench.go#L894-L930","documentation":"This is the wrapper the objbench \"list objects\" case returns when `listAll(ctx, blob, \"\", \"\", 2)` itself returns a non-nil error for a filesystem-type backend. The real cause is the wrapped error from the object storage LIST call, not the message text.","triggerScenarios":"`juicefs objbench` on a filesystem/blob URL where the LIST operation on prefix \"\" fails: network error, auth failure, missing bucket, or a misconfigured object storage URL.","commonSituations":"Wrong credentials or endpoint in the object storage URL; bucket deleted or not accessible; network partition; backend does not support List with maxKeys=2.","solutions":["Read the wrapped `%s` text; it names the underlying LIST failure (auth, DNS, 404, timeout) and fix that first.","Verify the object storage URL and credentials with `juicefs rnd` or a direct CLI of the storage (e.g. aws s3 ls).","Check network connectivity and endpoint reachability from the machine running objbench.","Confirm the backend implementation's List is not returning an unconditional error in pkg/object."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// preflight: list the bucket before benchmarking\nif _, err := listAll(ctx, blob, \"\", \"\", 1); err != nil {\n    return fmt.Errorf(\"storage not usable: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"objs, err := listAll(ctx, blob, \"\", \"\", 2)\nif err != nil {\n    return fmt.Errorf(\"list failed: %s\", err) // inspect wrapped cause\n}","preventionTips":["Validate the object storage URL and credentials before running objbench.","Confirm bucket existence and ListObjects permissions up front.","Run a connectivity preflight (juicefs rnd) before benchmarking."],"tags":["object-storage","objbench","list","wrapper"],"backgroundTag":"api-request-failed","analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}