Error 401 after some time running
See original GitHub issueHello,
I use the same BigQuery object to execute my queries and about once in a day i get this error
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.
The problem has already been reported here https://github.com/googleapis/google-cloud-node/issues/2139 and then has been transferred and fixed as a google-auth-library-nodejs
issue (https://github.com/googleapis/google-auth-library-nodejs/issues/133).
I am sure that the problem has been fixed in google-auth-library-nodejs
but @google-cloud/bigquery
does not rely on this package and still have the issue.
Environment details
- OS: Debian 8
- Node.js version: 10.9.0
- npm version: 6.2.0
@google-cloud/bigquery
version: 4.1.0
Steps to reproduce
- Use a singleton BigQuery object created with service account credentials
new BigQuery({ credentials: { client_email: 'foo@bar.com', private_key: 'xyz' } })
- Keep making requests using that object.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:8 (4 by maintainers)
Top Results From Across the Web
401 Error: 5 Ways to Troubleshoot and Fix It - Hostinger
The 401 Unauthorized error is triggered by unauthenticated requests made to a WordPress web server. Learn how to identify and fix the issue....
Read more >401 Unauthorized Error: What It Is and How to Fix It
The 401 Unauthorized Error is an HTTP response status code indicating that the client could not authenticate a request.
Read more >HTTP 401 Unauthorized Error | What Is and How to Fix?
401 Unauthorized Error is an HTTP response status code indicating the request sent by the user couldn't be authenticated.
Read more >How to Fix a 401 Unauthorized Error - Lifewire
A 401 Unauthorized error means the page you were trying to see needs a valid user ID/password before you can view it. Here...
Read more >A Useful Guide to Diagnosing and Solving the 401 Error
“401 unauthorized error (unauthorized error) shows that the request from the server didn't get clearance or verification.” Let us take you through the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@callmehiphop We used version 2.0.6, and tried to update to 4.1.0, the error is still the same.
Here is a log of the error for the lasts 7 days:
June 3rd 2019, 04:17:04.047 June 2nd 2019, 22:16:44.173 June 1st 2019, 22:16:06.027 May 30th 2019, 10:15:22.021 May 29th 2019, 22:15:01.034
Greetings folks! I am 84% sure we fixed this one 😃 There was a problem in previous versions of
google-auth-library
that was preventing token refreshes from happening when you’d expect them to. The fix was here: https://github.com/googleapis/google-auth-library-nodejs/commit/fecd4f441f6e5f3024b0ce18fe54f33b21c572a4If you are still experiencing this - please let me know! We would be happy to re-open the bug if it’s still a problem.