goharbor/harbor · error

[VolcengineCR] fail to parse expire time returned: %v

Error message

[VolcengineCR] fail to parse expire time returned: %v

What it means

Error "[VolcengineCR] fail to parse expire time returned: %v" thrown in goharbor/harbor.

Source

Thrown at src/pkg/reg/adapter/volcenginecr/auth.go:75

		return errNilVolcCrClient
	}
	if !c.isCacheAuthValid() {
		log.Debugf("update token %s\n", r.Host)
		authResp, err := c.client.GetAuthorizationToken(&cr.GetAuthorizationTokenInput{
			Registry: &c.registry,
		})
		if err != nil {
			return err
		}
		if authResp == nil || authResp.Username == nil || authResp.Token == nil || authResp.ExpireTime == nil {
			return errors.New("[VolcengineCR] GetAuthorizationToken output nil")
		}
		c.authCache.username = *authResp.Username
		c.authCache.password = *authResp.Token
		expireTime, err := time.Parse(time.RFC3339, *authResp.ExpireTime)
		if err != nil {
			log.Errorf("fail to parse expire time returned: %v", err)
			return fmt.Errorf("[VolcengineCR] fail to parse expire time returned: %v", err)
		}
		c.authCache.expireAt = &expireTime
	} else {
		log.Debug("token cached")
	}
	r.SetBasicAuth(c.authCache.username, c.authCache.password)
	return nil
}

func (c *volcCredential) isCacheAuthValid() bool {
	if c.authCache == nil || c.authCache.expireAt == nil {
		return false
	}
	if time.Now().After(*c.authCache.expireAt) {
		return false
	}
	return true
}

View on GitHub (pinned to 7b2fd08cc5)

When it happens

Trigger: Thrown at src/pkg/reg/adapter/volcenginecr/auth.go:75 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16). Data as JSON: /api/errors/1026918c83b8d1a9. Report an issue: GitHub.