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

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top