{"record":{"id":"7a51e0791236e1f2","repo":"kubernetes/kops","slug":"error-listing-s-v","errorCode":null,"errorMessage":"error listing %s: %v","messagePattern":"error listing (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"util/pkg/vfs/gsfs.go","lineNumber":332,"sourceCode":"\t\t}\n\n\t\tclient, err := p.getStorageClient(ctx)\n\t\tif err != nil {\n\t\t\treturn false, err\n\t\t}\n\n\t\tvar paths []Path\n\t\tit := client.Bucket(p.bucket).Objects(ctx, &storage.Query{Delimiter: \"/\", Prefix: prefix})\n\t\tfor {\n\t\t\to, err := it.Next()\n\t\t\tif err == iterator.Done {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif err != nil {\n\t\t\t\tif isGCSNotFound(err) {\n\t\t\t\t\treturn true, os.ErrNotExist\n\t\t\t\t}\n\t\t\t\treturn false, fmt.Errorf(\"error listing %s: %v\", p, err)\n\t\t\t}\n\t\t\tif o.Prefix != \"\" {\n\t\t\t\t// Synthetic directory entry, not an object\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tchild := &GSPath{\n\t\t\t\tvfsContext: p.vfsContext,\n\t\t\t\tbucket:     p.bucket,\n\t\t\t\tkey:        o.Name,\n\t\t\t\tmd5Hash:    base64.StdEncoding.EncodeToString(o.MD5),\n\t\t\t}\n\t\t\tpaths = append(paths, child)\n\t\t}\n\t\tklog.V(8).Infof(\"Listed files in %v: %v\", p, paths)\n\t\tret = paths\n\t\treturn true, nil\n\t})\n\tif err != nil {","sourceCodeStart":314,"sourceCodeEnd":350,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/util/pkg/vfs/gsfs.go#L314-L350","documentation":"Returned by GSPath.ReadDir when iterating bucket object listings (storage.Query with Delimiter \"/\") and it.Next() fails with something other than not-found (not-found is translated to os.ErrNotExist). It indicates the GCS list-objects API call failed — bad credentials, no storage.objects.list permission, or a transient API error — while enumerating the pseudo-directory's children.","triggerScenarios":"Thrown at util/pkg/vfs/gsfs.go:332 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the authenticated identity has storage.objects.list permission on the bucket","Check that the bucket exists and the project is accessible with the configured credentials","Retry with backoff for transient Google API errors (5xx, rate limits)"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}