-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
-
Is this a client library issue or a product issue?
Appears to be a library issue -
Did someone already solve this?
Related to the following posts, but I'm unable to resolve:
- Library fails with "this.auth.getUniverseDomain is not a function" #223
- https://stackoverflow.com/questions/77976313/gcp-pub-sub-client-is-failing-above-version-4-0-0-with-auth-error
- Do you have a support contract?
No
Environment details
- OS: OS X 14.4.1
- Node.js version: v21.7.2
- npm version: 10.5.0
gax-nodejsversion: 4.3.2
Steps to reproduce
I'm attempting to run the following code:
const {PubSub} = require('@google-cloud/pubsub');
const {OAuth2Client} = require('google-auth-library');
token = "..."; // access_token generated externally
const gax = new OAuth2Client();
gax.setCredentials({access_token: token});
const pubsub = new PubSub({
projectId: projectId,
auth: gax
});
const [topics] = await pubsub.getTopics();
With the newest versions of each library, I get the following error:
TypeError: this.auth.getUniverseDomain is not a function
at GrpcClient.createStub (.../node_modules/google-gax/build/src/grpc.js:312:54)
Libraries:
- @google-cloud/[email protected]
- [email protected]
- [email protected]
I confirmed in my package-lock.json there are no old versions present in the dependencies. Attached for reference: package-lock.json
Following instructions on related links, I tried downgrading to various different versions, but similar errors continue. Random example:
TypeError: this.auth.getClient is not a function
at GrpcClient._getCredentials (.../node_modules/@google-cloud/pubsub/node_modules/google-gax/build/src/grpc.js:145:40)
Libraries:
- @google-cloud/[email protected]
- [email protected]
- [email protected]
StasDachinsky, siketyan, clemfromspace and ddaydd
Metadata
Metadata
Assignees
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.