-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Google Analytics wrong result #131
Comments
What's your request? Could you share a snippet? |
Hi, yes, sorry, here: https://gist.github.com/anddimario/8559849 Thanks for your time. |
I'm not able to reproduce, would you like to share your |
Hi, i've edited the gist with the complete object ( https://gist.github.com/anddimario/8559849 ). I'm using the npm version 0.4.7. I'm doing other tests, it seems that the problem is the requests number (but it's not a normal rate limit error) and not the single metrics, i've tryed to refresh the tokens for each request without results. Thanks for your time. |
I'm looking at your code, and if a refresh token is invalid, there are multiple token refreshing requests are made concurrently which is racy and may malform the request body. The best approach is to refresh the token manually if Qps related errors will returns a rate limit error which has a valid JSON body. On the other hand, IMHO, client library is doing a bad job while handling token refreshes and I've initiated ideas several times in the past to fix it. But, the expectations of developers in terms of the default behavior on token expires were very diverse and wrapping a solution into OAuth2Client was not meeting everyone's needs. |
Hi, understood, really thanks, i'll do some test based on your suggestions. Only one last thing, is the Thanks for your time. |
Just released 1.0.3 which likely addresses this issue. The access token will be refreshed prior to initial request if has expired or is missing and you have a refresh token set. If the request fails due to a missing, invalid, or revoked access token, we will no longer attempt to refresh and re-attempt the request. https://github.com/google/google-api-nodejs-client/releases/tag/1.0.3 |
We have tried to make it as straightforward and well documented as possible so as to avoid making incorrectly formatted requests, especially around refreshing access tokens. Closing this as I believe we have eliminated this issue, especially around checking |
Hi, only for some analytics request we have this error:
It's displayed not as error, in the callback, but as normal result.
Have someone some suggestions about this problem?
Thanks for your time.
Best regards.
The text was updated successfully, but these errors were encountered: