{"record":{"id":"a1f7f3f44bafc0c4","repo":"googleapis/mcp-toolbox","slug":"failed-to-create-resourcemanager-projects-client-f","errorCode":null,"errorMessage":"failed to create ResourceManager projects client for project %q: %w","messagePattern":"failed to create ResourceManager projects client for project %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/dataplex/dataplex.go","lineNumber":250,"sourceCode":"\tdataScanClient, err := dataplexapi.NewDataScanClient(ctx, opts...)\n\tif err != nil {\n\t\tclient.Close()\n\t\treturn nil, nil, nil, nil, fmt.Errorf(\"failed to create Dataplex DataScan client for project %q: %w\", project, err)\n\t}\n\n\tdataProductClient, err := dataplexapi.NewDataProductClient(ctx, opts...)\n\tif err != nil {\n\t\tclient.Close()\n\t\tdataScanClient.Close()\n\t\treturn nil, nil, nil, nil, fmt.Errorf(\"failed to create Dataplex DataProduct client for project %q: %w\", project, err)\n\t}\n\n\tprojectsClient, err := resourcemanager.NewProjectsClient(ctx, opts...)\n\tif err != nil {\n\t\tclient.Close()\n\t\tdataScanClient.Close()\n\t\tdataProductClient.Close()\n\t\treturn nil, nil, nil, nil, fmt.Errorf(\"failed to create ResourceManager projects client for project %q: %w\", project, err)\n\t}\n\n\treturn client, dataScanClient, dataProductClient, projectsClient, nil\n}\n\nfunc (s *Source) LookupEntry(ctx context.Context, name string, view int, aspectTypes []string, entry string) (*dataplexpb.Entry, error) {\n\tviewMap := map[int]dataplexpb.EntryView{\n\t\t1: dataplexpb.EntryView_BASIC,\n\t\t2: dataplexpb.EntryView_FULL,\n\t\t3: dataplexpb.EntryView_CUSTOM,\n\t\t4: dataplexpb.EntryView_ALL,\n\t}\n\treq := &dataplexpb.LookupEntryRequest{\n\t\tName:        name,\n\t\tView:        viewMap[view],\n\t\tAspectTypes: aspectTypes,\n\t\tEntry:       entry,\n\t}","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/dataplex/dataplex.go#L232-L268","documentation":"The final client, the Cloud Resource Manager v3 Projects client, is created with resourcemanager.NewProjectsClient. On failure, all three Dataplex clients are closed and this wrapped error is returned. This client is needed both for GetProject during initialization and for resolving project numbers later.","triggerScenarios":"initDataplexConnection calls resourcemanager.NewProjectsClient(ctx, opts...) after the three Dataplex clients succeed; failure closes all of them and aborts initialization.","commonSituations":"cloudresourcemanager.googleapis.com unreachable (firewall/proxy); cloud.google.com/go/resourcemanager dependency issues; transient gRPC failures; malformed options shared across all four constructors (though earlier clients succeeding makes this unlikely).","solutions":["Verify connectivity to cloudresourcemanager.googleapis.com from the host.","Retry initialization — three other clients already connected, so this is likely transient.","Update cloud.google.com/go/resourcemanager to the latest version.","Check that no per-service endpoint overrides or VPC-SC egress rules block only the Resource Manager domain."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"curl -sS --max-time 5 https://cloudresourcemanager.googleapis.com/ >/dev/null && echo reachable || echo unreachable","typeGuard":null,"tryCatchPattern":"src, err := cfg.Initialize(ctx, tracer)\nif err != nil {\n\tif strings.Contains(err.Error(), \"failed to create ResourceManager projects client\") {\n\t\treturn backoff.Retry(func() error { _, err := cfg.Initialize(ctx, tracer); return err }, backoff.NewExponentialBackOff())\n\t}\n\treturn err\n}","preventionTips":["Whitelist cloudresourcemanager.googleapis.com in egress rules/VPC-SC.","Keep cloud.google.com/go/resourcemanager updated.","Retry transient failures; check per-service endpoint overrides if only this client fails."],"tags":["gcp","resource-manager","client-construction","network","initialization"],"backgroundTag":"api-client-creation-failed","analyzedSha":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}