Closed GoogleCodeExporter closed 9 years ago
Can you provide an http log?
https://code.google.com/p/google-api-objectivec-client/wiki/Introduction#Logging
_HTTP_Server_Traffic
Original comment by grobb...@google.com
on 4 Dec 2013 at 6:21
Sure, here's the log:
youtube.videos.insert
2013-12-04 09:04:10 +0000
Request: POST
https://www.googleapis.com/upload/rpc?uploadType=resumable&prettyPrint=false
Request headers:
Accept: application/json-rpc
Authorization: Bearer _snip_
Cache-Control: no-cache
Content-Type: application/json-rpc; charset=utf-8
User-Agent: jp.nagisa-inc.FOOBAR/1.0 google-api-objc-client/2.0 iPhone/7.0.2 (gzip)
X-Upload-Content-Length: 9680229
X-Upload-Content-Type: video/x-m4v
Request body: (383 bytes)
{
"method" : "youtube.videos.insert",
"id" : "gtl_1",
"jsonrpc" : "2.0",
"params" : {
"part" : "snippet,status",
"resource" : {
"status" : {
"privacyStatus" : "public"
},
"snippet" : {
"description" : "FOOBAR",
"title" : "FOOBAR",
"tags" : [
"FOOBAR"
]
}
}
},
"apiVersion" : "v3"
}
Response: status 200
Response headers:
Alternate-Protocol: 443:quic
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Length: 209
Content-Type: application/json
Date: Wed, 04 Dec 2013 09:04:11 GMT
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Pragma: no-cache
Server: HTTP Upload Server Built on Nov 15 2013 16:02:54 (1384560174)
Response body: (209 bytes)
{
"id" : "gtl_1",
"error" : {
"message" : "Unauthorized",
"code" : -32602,
"data" : [
{
"domain" : "youtube.header",
"reason" : "youtubeSignupRequired",
"locationType" : "header",
"location" : "Authorization",
"message" : "Unauthorized"
}
]
}
}
-----------------------------------------------------------
Original comment by nish...@nagisa-inc.jp
on 5 Dec 2013 at 12:59
I commented out the two assertions so it returns an error instead of crash.
(just as it would in non-debug build if I understand correctly)
Original comment by nish...@nagisa-inc.jp
on 5 Dec 2013 at 1:01
The fetcher was written expecting errors as http status codes, but the YouTube
API is now retuning them as JSON. I'll modify the library to not assert there,
effectively similar to what you've done.
Incidentally, this issue tracker is intended for the OAuth 2 library, not for
the GTL library.
Original comment by grobb...@google.com
on 5 Dec 2013 at 1:37
much appreciated.
Original comment by nish...@nagisa-inc.jp
on 5 Dec 2013 at 1:44
This should be resolved in the top-of-trunk library. Please update your library
sources.
https://code.google.com/p/gtm-http-fetcher/source/detail?r=134
Thank you for reporting the issue.
Original comment by grobb...@google.com
on 6 Dec 2013 at 11:33
Original issue reported on code.google.com by
nish...@nagisa-inc.jp
on 4 Dec 2013 at 9:46