3

We are using Google Contacts API for past few years. Everything seems to be working fine until today..Suddenly all the Contacts API started throwing error "No Authentication Header Found" inspite of passing the correct token to the header.

Here is the complete stack trace of this error

java.lang.NullPointerException: No authentication header information| at com.google.gdata.util.AuthenticationException.initFromAuthHeader(AuthenticationException.java:96)| at com.google.gdata.util.AuthenticationException.(AuthenticationException.java:67)| at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:608)| at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:564)| at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:560)| at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:538)| at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:536)| at com.google.gdata.client.Service.getFeed(Service.java:1135)| at com.google.gdata.client.Service.getFeed(Service.java:1077)| at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:676)| at com.google.gdata.client.Service.query(Service.java:1237)| at com.google.gdata.client.Service.query(Service.java:1178)|

Is anyone facing the same issue?? Please let us know if we need to change something..

TIA,
VijayRaj

VijayRaj
  • 425
  • 1
  • 4
  • 22
  • 1
    my company is experiencing the same issue. we believe it's an issue on the Google side and are attempting to trace it now. – neoice May 02 '13 at 17:23
  • I haven't seen anyone filing a bug in the issue tracker about this error...are you sure this is a Google's issue?? – VijayRaj May 03 '13 at 07:00
  • I wasn't even able to FIND the issue tracker for the Contacts API. every thing I found was either completely silent since 2012 or a dead end. a number of people reported a variety of API issues here: https://news.ycombinator.com/item?id=5635982 – neoice May 03 '13 at 16:51
  • @neoice Even We are facing with the same issue...Any one there to resolve this issue? – Jagadeesh May 07 '13 at 06:01

1 Answers1

1

Looks like an error during authentication that is causing an NPE to be thrown by AuthenticationException. AuthenticationException was changed back in 9/2011 to no longer throw NPE if no authentication header information is set in the exception.

2 approaches:

  1. How old is the version of the gdata client library you are using? Can you update to something more recent to pick up the fix made back in 9/2011?

  2. What oauth scope are you using? If we can figure out why authentication is starting to fail, we can make auth succeed to avoid the NPE bug if you cannot update the gdata client library.

Jenn
  • 26
  • 1
  • I tried updating the version of the gdata client libarary but still got the same error. The scope which we are using while authenticating is https://www.google.com/m8/feeds/contacts and https://www.google.com/m8/feeds/groups.. Any other alternative? – VijayRaj May 09 '13 at 13:30
  • 1
    The scopes should not include 'contacts' or 'groups' at the end. https://www.google.com/m8/feeds/ is the scope used in the client libs. – Jenn May 21 '13 at 20:59
  • Thanks a lot @Jen. It works with that scope. We were using the earlier scopes for the past few years and it worked without any issue. Suddenly for the past few days our customers have been facing this issue and we were clueless about this..Can you please point out to the link where this change was announced so that we can bookmark and keep track of it for any other changes in the future. – VijayRaj May 23 '13 at 06:44
  • There was no announcement as the change (cleaning up outdated scope validation logic) should have been invisible to clients. Apparently there are a few invalid scopes in use that just happened to work over the years. I have restored support for the 2 you've mentioned, in case others cannot update to using the correct scopes, but please use the correct scope if you can. – Jenn Jun 04 '13 at 16:57