{"record":{"id":"f3f3636b61b43487","repo":"kubernetes/kops","slug":"error-building-compute-api-client-v-f3f363","errorCode":null,"errorMessage":"error building compute API client: %v","messagePattern":"error building compute API client: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/gce/gce_cloud.go","lineNumber":144,"sourceCode":"\ti := gceCloudInstances[region+\"::\"+project]\n\tgceCloudInstancesMapMutex.RUnlock()\n\tif i != nil {\n\t\treturn i.(gceCloudInternal).WithLabels(labels), nil\n\t}\n\n\tklog.V(2).Infof(\"Building new GCE cloud instance for region %q and project %q\", region, project)\n\n\tc := &gceCloudImplementation{region: region, project: project}\n\n\tctx := context.Background()\n\n\tif os.Getenv(\"GOOGLE_APPLICATION_CREDENTIALS\") != \"\" {\n\t\tklog.Infof(\"Will load GOOGLE_APPLICATION_CREDENTIALS from %s\", os.Getenv(\"GOOGLE_APPLICATION_CREDENTIALS\"))\n\t}\n\n\tcomputeClient, err := newComputeClientImpl(ctx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error building compute API client: %v\", err)\n\t}\n\tc.compute = computeClient\n\n\tstorageClient, err := storage.NewClient(ctx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error building storage API client: %v\", err)\n\t}\n\tc.storage = storageClient\n\n\tiamService, err := newIamClientImpl(ctx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error building IAM API client: %v\", err)\n\t}\n\tc.iam = iamService\n\n\tdnsClient, err := newDNSClientImpl(ctx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error building DNS API client: %v\", err)","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/gce/gce_cloud.go#L126-L162","documentation":"NewGCECloud wraps newComputeClientImpl failure while building the region/project-scoped GCE cloud instance. It fires when the Compute API service cannot be created (credential resolution failure, GOOGLE_APPLICATION_CREDENTIALS pointing to an invalid file); without compute access the cloud object is useless, so construction aborts.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/gce/gce_cloud.go:144 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure ADC (gcloud auth application-default login or GOOGLE_APPLICATION_CREDENTIALS)","Verify the service account has compute read scope","Check the wrapped error for details"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}