{"record":{"id":"1eecac5bda2b8186","repo":"googleapis/mcp-toolbox","slug":"unable-to-create-bigtable-newadminclient-w","errorCode":null,"errorMessage":"unable to create bigtable.NewAdminClient: %w","messagePattern":"unable to create bigtable\\.NewAdminClient: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/bigtable/bigtable.go","lineNumber":268,"sourceCode":"\t\treturn nil, fmt.Errorf(\"unable to create bigtable.NewInstanceAdminClient: %w\", err)\n\t}\n\n\treturn client, nil\n}\n\nfunc initBigtableAdminClient(ctx context.Context, tracer trace.Tracer, name, project, instance string) (*bigtable.AdminClient, error) {\n\t//nolint:all // Reassigned ctx\n\tctx, span := sources.InitConnectionSpan(ctx, tracer, SourceType, name)\n\tdefer span.End()\n\n\tuserAgent, err := util.UserAgentFromContext(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tclient, err := bigtable.NewAdminClient(ctx, project, instance, option.WithUserAgent(userAgent))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to create bigtable.NewAdminClient: %w\", err)\n\t}\n\n\treturn client, nil\n}\n","sourceCodeStart":250,"sourceCodeEnd":273,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/bigtable/bigtable.go#L250-L273","documentation":"bigtable.NewAdminClient — the table-level admin client scoped to a project AND instance — returned an error during source initialization. Like the other admin constructors, it validates identifiers and dials the admin API; failures usually mean the instance ID doesn't exist or credentials/network are misconfigured.","triggerScenarios":"Source Initialize() calls initBigtableAdminClient, which calls bigtable.NewAdminClient(ctx, project, instance, option.WithUserAgent(userAgent)); the constructor returns non-nil error.","commonSituations":"Instance deleted/renamed after config was written; instance ID typo; missing credentials; egress blocked to bigtableadmin.googleapis.com.","solutions":["Confirm the instance exists: `gcloud bigtable instances list --project=<project>` and match the `instance` field exactly","Validate credentials (GOOGLE_APPLICATION_CREDENTIALS / ADC) and Bigtable admin IAM roles","Check network/proxy access to the Bigtable admin endpoint","Retry if the failure was a transient gRPC dial error"],"exampleFix":"// before\ninstance: prod-instance-1   # deleted\n// after\ninstance: prod-instance-2   # current instance ID","handlingStrategy":"validation","validationCode":"func preflightInstanceAdmin(ctx context.Context, project, instance string) error {\n\tiac, err := bigtable.NewInstanceAdminClient(ctx, project)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer iac.Close()\n\t_, err = iac.GetInstance(ctx, instance)\n\treturn err // confirms the instance exists and is reachable before NewAdminClient\n}","typeGuard":null,"tryCatchPattern":"src, err := cfg.Initialize(ctx, tracer)\nif err != nil {\n\tif strings.Contains(err.Error(), \"NewAdminClient\") {\n\t\t// verify instance exists and credentials are valid, then retry\n\t}\n\treturn err\n}","preventionTips":["Confirm the instance ID still exists whenever environments are re-provisioned","Use `gcloud bigtable instances list` output as the config source of truth","Grant Bigtable Admin IAM roles to the runtime service account","Retry initialization once on transient gRPC errors before failing startup"],"tags":["gcp","bigtable","admin-api","initialization"],"backgroundTag":"client-initialization-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"}