3

過去幾年我們使用Google通訊錄API。一切似乎一直工作良好,直到今天..突然,所有的聯繫人API開始拋出錯誤「No Authentication Header Found」,儘管將正確的標記傳遞給標題。未找到身份驗證標頭

下面是這個錯誤

顯示java.lang.NullPointerException的完整的堆棧跟蹤:無認證標頭信息| 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)|在com.google.gdata.client.Service.getFeed(Service.java:1135)上的 |在 com.google.gdata.client.Service.getFeed(Service.java:1077)|在 com.google.gdata.client.GoogleService.getFeed(GoogleService.java:676)|在com.google.gdata.client.Service.query(Service.java:1237)| |在 com.google.gdata.client.Service.query(Service.java:1178)|

是任何人都面臨着同樣的問題?請讓我們知道,如果我們需要改變的東西..

TIA,
VijayRaj

+1

我公司遇到同樣的問題。我們認爲這是Google的一個問題,現在正試圖追蹤它。 – neoice 2013-05-02 17:23:19

+0

我還沒有看到任何人在問題跟蹤器中提交有關此錯誤的錯誤...您確定這是Google的問題嗎? – VijayRaj 2013-05-03 07:00:00

+0

我甚至無法找到聯繫人API的問題跟蹤器。我發現的每一件事情都是自2012年以來完全沉默或死衚衕。許多人在這裏報告了各種API問題:https://news.ycombinator.com/item?id=5635982 – neoice 2013-05-03 16:51:54

回答

1

貌似驗證期間發生錯誤,導致了NPE通過的AuthenticationException被拋出。如果在異常中沒有設置認證頭信息,則AuthenticationException在9/2011中被更改爲不再拋出NPE。

2的方法:

  1. 幾歲的你正在使用的客戶端GDATA庫的版本?你能否更新一些更新的內容來獲取9/2011版本中所做的修復?

  2. 您使用的是什麼oauth範圍?如果我們能夠弄清楚爲什麼身份驗證開始失敗,那麼如果您無法更新gdata客戶端庫,我們可以使auth成功避免NPE錯誤。

+0

我試圖更新gdata客戶端libarary的版本,但仍然得到相同的錯誤。我們在驗證時使用的範圍是https://www.google.com/m8/feeds/contacts和https://www.google.com/m8/feeds/groups ..有沒有其他替代方法? – VijayRaj 2013-05-09 13:30:50

+1

範圍最後不應包含「聯繫人」或「組」。 https://www.google.com/m8/feeds/是客戶端庫中使用的範圍。 – Jenn 2013-05-21 20:59:19

+0

非常感謝@Jen。它適用於該範圍。過去幾年我們使用了較早的範圍,並且沒有任何問題。突然,在過去的幾天裏,我們的客戶一直面臨這個問題,我們對此毫無頭緒。請您指出發佈此更改的鏈接,以便我們可以收藏並追蹤其中的任何其他更改未來。 – VijayRaj 2013-05-23 06:44:54

相關問題