Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: gpcMetadata.universe is not a function with 9.3.0 after upgrade from 9.2.0 (with google-gax) on cloud run #1702

Closed
mccare opened this issue Nov 30, 2023 · 4 comments · Fixed by #1703
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@mccare
Copy link

mccare commented Nov 30, 2023

Environment details

  • OS: bullseye-slim
  • Node.js version: 20.10.0
  • npm version:
  • google-auth-library version: 9.3.0
  • google-gax 4.0.5

Steps to reproduce

Launching with google-gax 4.0.5 on google cloud run, the upgrade from 9.2.0 to 9.3.0 produces this new exception:

TypeError: gcpMetadata.universe is not a function
    at GoogleAuth._GoogleAuth_getUniverseFromMetadataServer (/usr/src/app/node_modules/.pnpm/google-auth-library@9.3.0/node_modules/google-auth-library/build/src/auth/googleauth.js:777:44)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async GoogleAuth.getUniverseDomain (/usr/src/app/node_modules/.pnpm/google-auth-library@9.3.0/node_modules/google-auth-library/build/src/auth/googleauth.js:186:168)
    at async GoogleAuth.getApplicationDefaultAsync (/usr/src/app/node_modules/.pnpm/google-auth-library@9.3.0/node_modules/google-auth-library/build/src/auth/googleauth.js:252:42)
    at async GoogleAuth.getClient (/usr/src/app/node_modules/.pnpm/google-auth-library@9.3.0/node_modules/google-auth-library/build/src/auth/googleauth.js:674:17)
    at async GrpcClient._getCredentials (/usr/src/app/node_modules/.pnpm/google-gax@4.0.5/node_modules/google-gax/build/src/grpc.js:145:24)
    at async GrpcClient.createStub (/usr/src/app/node_modules/.pnpm/google-gax@4.0.5/node_modules/google-gax/build/src/grpc.js:308:23)
@mccare mccare added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Nov 30, 2023
@rbrady98
Copy link

Also experiencing this error in a dev environment 👍

@IchordeDionysos
Copy link

@danielbankhead this or a similar issue seems to be spread into other NodeJS libraries:
googleapis/nodejs-pubsub#1884

What are the recommended steps to fix it?

@danielbankhead
Copy link
Member

@IchordeDionysos could you double-check npm ls google-auth-library? All 9.x versions should be on 9.6.3. If not, an rm -rf node_modules package-lock.json && npm i should resolve.

@IchordeDionysos
Copy link

All of them were 9.2.0.
For me running yarn upgrade worked 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants