Giter VIP home page Giter VIP logo

Comments (5)

TigerWolf avatar TigerWolf commented on May 14, 2024

What are the other values? Like the expiry time and the date it was issued?
You can find this out by inspecting the token object where it fails.

On Sun, Jan 26, 2014 at 6:13 AM, rohitn [email protected] wrote:

Hi,

Starting about a week ago we started receiving "OAuth2 token refresh
failed" error messages. We have scheduled jobs that download data at 3:30
AM and 5:30 AM. They have both been failing with this error. If we try
again at 7AM then it sometimes succeeds. Today, it did not succeed until
9:45 AM. Any idea why this has started happening? Is there something we can
do to help debug the issue? We have not made any code changes for several
months.

Thanks, Rohit

ERROR 2014-01-25 03:30:35 21896 [Vulcan::Google]: msg:#<AdsCommon::Errors::AuthError: OAuth2 token refresh failed>
/home/offers/tracking/shared/bundle/jruby/1.9/gems/google-ads-common-0.9.3/lib/ads_common/auth/oauth2_handler.rb:94:in refresh_token!' /home/offers/tracking/shared/bundle/jruby/1.9/gems/google-ads-common-0.9.3/lib/ads_common/auth/oauth2_handler.rb:83:inget_token'
/home/offers/tracking/shared/bundle/jruby/1.9/gems/google-ads-common-0.9.3/lib/ads_common/api.rb:113:in `authorize'


Reply to this email directly or view it on GitHubhttps://github.com//issues/16
.

from google-api-ads-ruby.

rohitn avatar rohitn commented on May 14, 2024

Hi @TigerWolf,

Thanks for the response.

Token object has :issued_at=>2014-01-27 08:28:44 -0600, :expires_in=>3600, :id_token=>nil. I believe the units are seconds, so I do not think it is failing because the token has expired. Any other ideas?

Thanks

from google-api-ads-ruby.

mcloonan avatar mcloonan commented on May 14, 2024

Can you please confirm the HTTP response code you're getting when you see this error?

from google-api-ads-ruby.

rohitn avatar rohitn commented on May 14, 2024

Hi @mcloonan
Sorry for the late response, I was out yesterday. I logged the exception that is raised by refresh_token!. Looks like the HTTP response code is 403.

#<Signet::AuthorizationError: Authorization failed.  Server message:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title>Google Accounts</title><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0" /><link rel='stylesheet' type='text/css' href='https://ssl.gstatic.com/accounts/o/1893590695-error_page_css_ltr.css'>
<script type="text/javascript" src="https://ssl.gstatic.com/accounts/o/237772143-common_lib.js"></script>
<style>@media screen and (max-width:500px) {#robot {background: none; min-height: 0; min-width: 0; padding: 0;}#stack_trace {display: none;}}
#oauth2_request_info_header {background-image: url("https://ssl.gstatic.com/accounts/o/blank.gif");}</style></head><body  ><div id="robot"></div><a href="//www.google.com/" id="googlelogo"><img src="//www.google.com/images/logo_sm.gif" alt="Google"></a><p class="large"><b>403.</b> <ins>That's an error.</ins></p><p class="large">You are not authorized to perform this request.  <ins>That's all we know.</ins></p></body></html>>

from google-api-ads-ruby.

mcloonan avatar mcloonan commented on May 14, 2024

When you get 403 responses with valid tokens, that represents a rate limit error. The response could be better, and we're working on improving this so it's more obvious what's happening.

Since this is not related to the Ruby library specifically, I'm going to close this bug.

from google-api-ads-ruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.