{"record":{"id":"87ee5d4684f6aaec","repo":"goharbor/harbor","slug":"tencent-tcr-newadapter-can-not-get-tcr-instance","errorCode":null,"errorMessage":"[tencent-tcr.newAdapter] Can not get TCR instance info. RequestId=%s","messagePattern":"\\[tencent-tcr\\.newAdapter\\] Can not get TCR instance info\\. RequestId=(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/reg/adapter/tencentcr/adapter.go","lineNumber":149,"sourceCode":"\t\treturn\n\t}\n\n\tvar req = tcr.NewDescribeInstancesRequest()\n\treq.AllRegion = common.BoolPtr(true)\n\treq.Filters = []*tcr.Filter{\n\t\t{\n\t\t\tName:   common.StringPtr(\"RegistryName\"),\n\t\t\tValues: []*string{common.StringPtr(strings.ReplaceAll(registryURL.Host, \".tencentcloudcr.com\", \"\"))},\n\t\t},\n\t}\n\tvar resp *tcr.DescribeInstancesResponse\n\tresp, err = client.DescribeInstances(req)\n\tif err != nil {\n\t\tlog.Errorf(\"DescribeInstances error=%s\", err.Error())\n\t\treturn\n\t}\n\tif *resp.Response.TotalCount == 0 {\n\t\terr = fmt.Errorf(\"[tencent-tcr.newAdapter] Can not get TCR instance info. RequestId=%s\", *resp.Response.RequestId)\n\t\treturn\n\t}\n\tvar instanceInfo = resp.Response.Registries[0]\n\tlog.Debugf(\"[tencent-tcr.InstanceInfo] registry.URL=%s, host=%s, PublicDomain=%s, RegionName=%s, RegistryId=%s\",\n\t\tregistry.URL, registryURL.Host, *instanceInfo.PublicDomain, *instanceInfo.RegionName, *instanceInfo.RegistryId)\n\n\t// rebuild TCR SDK client\n\tclient = &tcr.Client{}\n\tclient.Init(*instanceInfo.RegionName).\n\t\tWithCredential(tcrCredential).\n\t\tWithProfile(cfp).\n\t\tWithHttpTransport(rateLimiterTransport)\n\n\tvar credential = NewAuth(instanceInfo.RegistryId, client)\n\tvar transport = commonhttp.GetHTTPTransport(\n\t\tcommonhttp.WithInsecure(registry.Insecure),\n\t\tcommonhttp.WithCACert(registry.CACertificate),\n\t)","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/reg/adapter/tencentcr/adapter.go#L131-L167","documentation":"Returned by newAdapter when the Tencent Cloud TCR DescribeInstances call for the registry host succeeds but TotalCount is zero — no TCR instance matches the registry name derived from the host. It includes the SDK RequestId for troubleshooting with Tencent Cloud support. The input at fault is the registry endpoint/instance name configured for the adapter.","triggerScenarios":"Thrown at src/pkg/reg/adapter/tencentcr/adapter.go:149 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the registry URL host matches an existing TCR instance name (*.tencentcloudcr.com)","Check the instance exists in the Tencent account and region used by the credentials","Use the RequestId to look up the API call in Tencent Cloud logs","Confirm the AK/SK belong to the account that owns the instance"],"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"}