{"record":{"id":"1026918c83b8d1a9","repo":"goharbor/harbor","slug":"volcenginecr-fail-to-parse-expire-time-returned","errorCode":null,"errorMessage":"[VolcengineCR] fail to parse expire time returned: %v","messagePattern":"\\[VolcengineCR\\] fail to parse expire time returned: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/reg/adapter/volcenginecr/auth.go","lineNumber":75,"sourceCode":"\t\treturn errNilVolcCrClient\n\t}\n\tif !c.isCacheAuthValid() {\n\t\tlog.Debugf(\"update token %s\\n\", r.Host)\n\t\tauthResp, err := c.client.GetAuthorizationToken(&cr.GetAuthorizationTokenInput{\n\t\t\tRegistry: &c.registry,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif authResp == nil || authResp.Username == nil || authResp.Token == nil || authResp.ExpireTime == nil {\n\t\t\treturn errors.New(\"[VolcengineCR] GetAuthorizationToken output nil\")\n\t\t}\n\t\tc.authCache.username = *authResp.Username\n\t\tc.authCache.password = *authResp.Token\n\t\texpireTime, err := time.Parse(time.RFC3339, *authResp.ExpireTime)\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"fail to parse expire time returned: %v\", err)\n\t\t\treturn fmt.Errorf(\"[VolcengineCR] fail to parse expire time returned: %v\", err)\n\t\t}\n\t\tc.authCache.expireAt = &expireTime\n\t} else {\n\t\tlog.Debug(\"token cached\")\n\t}\n\tr.SetBasicAuth(c.authCache.username, c.authCache.password)\n\treturn nil\n}\n\nfunc (c *volcCredential) isCacheAuthValid() bool {\n\tif c.authCache == nil || c.authCache.expireAt == nil {\n\t\treturn false\n\t}\n\tif time.Now().After(*c.authCache.expireAt) {\n\t\treturn false\n\t}\n\treturn true\n}","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/reg/adapter/volcenginecr/auth.go#L57-L93","documentation":"Returned in the VolcEngine CR authorizer's Modify when the token expiration timestamp returned by GetAuthorizationToken cannot be parsed as RFC3339. The auth token itself was received, but its ExpireTime field is in an unexpected format, so the auth cache expiry cannot be established and the cached credential would never be refreshed reliably.","triggerScenarios":"Thrown at src/pkg/reg/adapter/volcenginecr/auth.go:75 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the raw ExpireTime value returned by the VolcEngine CR API","Verify the VolcEngine SDK version matches the CR API's time format","Upgrade the SDK if the service changed its timestamp format","Retry once; malformed responses can be transient"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","contentChangedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}