Discovered this while investigating #2125.
common-grpc:service.js:
GrpcService.prototype.getGrpcCredentials_ = function(callback) {
var self = this;
this.authClient.getAuthClient(function(err, authClient) {
if (err) {
callback(err);
return;
}
var credentials = grpc.credentials.combineChannelCredentials(
grpc.credentials.createSsl(),
grpc.credentials.createFromGoogleCredential(authClient)
);
if (!self.projectId || self.projectId === '{{projectId}}') {
self.projectId = authClient.projectId; // <<<<<<<<<
}
authClient.projectId is not guaranteed to be defined. Unless I am mistaken, only JWTClient would have this property. This means that auto-detection of credentials is not working with gRPC based client libraries unless the user provides the projectId manually?
Discovered this while investigating #2125.
common-grpc:service.js:
authClient.projectIdis not guaranteed to be defined. Unless I am mistaken, only JWTClient would have this property. This means that auto-detection of credentials is not working with gRPC based client libraries unless the user provides the projectId manually?