google-cloud-go: intermittent invalid credential errors
Client
Pubsub
Describe Your Environment
Docker container running on a GCE instance.
Expected Behavior
No intermittent auth errors.
Actual Behavior
We occasionally see
rpc error: code = Unauthenticated desc = Request had invalid authentication
credentials. Expected OAuth 2 access token, login cookie or other valid authentication
credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
From sub.Receive
. If we wrap the Receive
call in a retry, this issue clears up within about a second.
Running on 0.25.0 of this library.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 26 (9 by maintainers)
Whoops! Generally, you’d just keep the pub/sub client open for the duration of your program’s life.
Well, this is embarrassing, we were closing the pubsub client early.