Sudden 401 Authentication Error with @google/genai and Vertex AI - "Request is missing required authentication credential" #3825
Unanswered
jhutan-acko
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm experiencing a sudden 401 authentication error in my production Node.js
application when calling Vertex AI APIs through the @google/genai library.
This was working fine until recently and started failing without any code
changes on our end.
Error Details:
ApiError: {
"error": {
"code": 401,
"message": "Request is missing required authentication credential.
Expected OAuth 2 access token, login cookie or other valid authentication
credential.",
"status": "UNAUTHENTICATED",
"details": [{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "CREDENTIALS_MISSING",
"domain": "googleapis.com",
"metadata": {
"method":
"google.cloud.aiplatform.v1beta1.PredictionService.GenerateContent",
"service": "aiplatform.googleapis.com"
}
}]
}
}
What I've Verified:
Environment:
Questions:
authentication?
Temporary Fix:
Downgrading to @google/[email protected] resolved the issue, suggesting a
regression in newer versions.
Has anyone else experienced this sudden authentication failure in production?
Any insights on what might have changed would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions