2012-10-19 92 views
1

我試圖用iPhone上的視頻上傳到iPhone的「已安裝的應用程序」與GData for ObjectiveC。服務異常

目前,我收到一個錯誤在我的上傳票:ServiceException - 錯誤代碼500

從文檔我想不通這是什麼錯誤意味着什麼,我做錯了:

500(內部錯誤)--500響應代碼表示YouTube 處理請求時發生錯誤。您可以稍後重試請求 。

我在一週之內只收到了這個錯誤(所以這不是臨時中斷),我嘗試了Youtube API的不同產品註冊。

任何人都可以發現我做錯了我的要求嗎?

下面你可以找到日誌從的GData的GTMHttpDebugLogs:

uploadTicket:finishedWithEntry:error: 

2012-10-18 17:13:26 +0000 
Request: POST https://uploads.gdata.youtube.com/resumable/feeds/api/users/default/uploads 
Request headers: 
    Accept: application/atom+xml, text/xml 
    Authorization: AuthSub token=<authorization subtoken refreshed every time> 
    Cache-Control: no-cache 
    Content-Length: 793 
    Content-Type: application/atom+xml; charset=utf-8 
    GData-Version: 2.0 
    Slug: video-filename.mp4 
    User-Agent: <bundle>/2.0.0 GData-ObjectiveC/1.12 iPhone/5.1 (gzip) 
    X-GData-Key: key=<my developer key 
    X-Upload-Content-Length: 4005670 
    X-Upload-Content-Type: video/mp4 

Request body: (793 bytes) 
<?xml version="1.0" encoding="UTF-8"?> 
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:gml="http://www.opengis.net/gml" xmlns:app="http://www.w3.org/2007/app" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:media="http://search.yahoo.com/mrss/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:yt="http://gdata.youtube.com/schemas/2007"><yt:accessControl action="list"/><media:group><media:description>Video description here</media:description><media:keywords/><media:category scheme="http://gdata.youtube.com/schemas/2007/categories.cat">Music</media:category><media:title>Video title here</media:title></media:group></entry> 


Response: status 500 
Response headers: 
    Cache-Control: no-cache, no-store, must-revalidate 
    Content-Length: 171 
    Content-Type: application/vnd.google.gdata.error+xml 
    Date: Thu, 18 Oct 2012 17:13:19 GMT 
    Expires: Fri, 01 Jan 1990 00:00:00 GMT 
    Pragma: no-cache 
    Server: HTTP Upload Server Built on Oct 3 2012 16:52:30 (1349308350) 
    X-GData-User-Country: US 
    X-GUploader-UploadID: <### I made this upload id anonymous ###> 

Response body: (171 bytes) 
<errors xmlns='http://schemas.google.com/g/2005'><error><domain>GData</domain><code>ServiceException</code><internalReason>Internal Error</internalReason></error></errors> 
----------------------------------------------------------- 

回答

0

這是由<yt:accessControl action="list"/>在你的要求,這是不是一個有效的值所引起。它應該是類似於<yt:accessControl action='list' permission='denied'/>

這就是說,API應該適度地處理並且不會返回內部服務器錯誤。我會在內部向相關人員提交一個錯誤來解決這個問題。

+0

謝謝你的回答,我將有機會從現在開始測試這2天。如果我遇到麻煩,我會告訴你。 :D謝謝你獲得:D – ghostmaverick55

+0

它工作。謝謝 ! – ghostmaverick55