{"record":{"id":"8e197eea362bf469","repo":"juicedata/juicefs","slug":"failed-to-load-config-s","errorCode":null,"errorMessage":"failed to load config: %s","messagePattern":"failed to load config: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/object/eos.go","lineNumber":80,"sourceCode":"\tssl := strings.ToLower(uri.Scheme) == \"https\"\n\thostParts := strings.Split(uri.Host, \".\")\n\tbucket := hostParts[0]\n\tendpoint = uri.Scheme + \"://\" + uri.Host[len(bucket)+1:]\n\tregion := \"us-east-1\"\n\n\tif accessKey == \"\" {\n\t\taccessKey = os.Getenv(\"EOS_ACCESS_KEY\")\n\t}\n\tif secretKey == \"\" {\n\t\tsecretKey = os.Getenv(\"EOS_SECRET_KEY\")\n\t}\n\tif token == \"\" {\n\t\ttoken = os.Getenv(\"EOS_TOKEN\")\n\t}\n\tcfg, err := config.LoadDefaultConfig(ctx, append(defaultChecksumOpts(),\n\t\tconfig.WithCredentialsProvider(credentials.NewStaticCredentialsProvider(accessKey, secretKey, token)))...)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to load config: %s\", err)\n\t}\n\tclient := s3.NewFromConfig(cfg, func(options *s3.Options) {\n\t\toptions.BaseEndpoint = aws.String(endpoint)\n\t\toptions.Region = region\n\t\toptions.EndpointOptions.DisableHTTPS = !ssl\n\t\toptions.UsePathStyle = defaultPathStyle()\n\t\toptions.HTTPClient = httpClient\n\t\toptions.APIOptions = append(options.APIOptions, func(stack *smithymiddleware.Stack) error {\n\t\t\treturn v4.SwapComputePayloadSHA256ForUnsignedPayloadMiddleware(stack)\n\t\t}, addS3UserAgent)\n\t\toptions.RetryMaxAttempts = 1\n\t})\n\n\treturn &eos{s3client{bucket: bucket, s3: client, region: region}}, nil\n}\n\nfunc init() {\n\tRegister(\"eos\", newEos)","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/pkg/object/eos.go#L62-L98","documentation":"Returned by newEos when the AWS SDK's LoadDefaultConfig fails while building the EOS client config — typically invalid static credentials or a broken shared config/environment. The wrapped error pinpoints the config source at fault.","triggerScenarios":"Thrown at pkg/object/eos.go:80 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify EOS access/secret keys (or EOS_ACCESS_KEY/EOS_SECRET_KEY env vars)","Fix any malformed AWS config files or environment settings"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}