ephraimncory / google-api-dotnet-client

Automatically exported from code.google.com/p/google-api-dotnet-client
Apache License 2.0
0 stars 0 forks source link

YouTube Uploads Failing #294

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Attempt upload with the following code:

    Public Shared Sub TestUpload()

        Dim Service As YoutubeService = GetYouTubeService()

        Dim SourceVideo As String = "C:\TempMedia\Wildlife.wmv"

        Dim Meta As New Video
        Meta.Snippet = New VideoSnippet
        Meta.Snippet.Title = "Test Wildlife Video"
        Meta.Snippet.Description = "This is a test video only"
        Meta.Snippet.CategoryId = "Entertainment"
        Meta.Snippet.Tags = New List(Of String)
        Meta.Snippet.Tags.Add("Test")
        Meta.Status = New VideoStatus
        Meta.Status.PrivacyStatus = "unlisted"

        Using fs As New FileStream(SourceVideo, FileMode.Open, FileAccess.Read, FileShare.Inheritable)
            Dim UploadRequest As VideosResource.InsertMediaUpload = Service.Videos.Insert(Meta, "snippet,status", fs, "video/x-ms-wmv")
            UploadRequest.ChunkSize = 10000
            While UploadRequest.ResponseBody Is Nothing
                Try
                    UploadRequest.Upload()
                Catch ex As Exception
                    Trace.WriteLine("Failed at:" & UploadRequest.GetProgress.BytesSent.ToString)
                End Try
            End While
            Dim Uploaded = UploadRequest.ResponseBody
        End Using

    End Sub

2. Execute & monitor results with Fiddler
3.

What is the expected output? What do you see instead?
Upload initiates correctly and chunks of data are sent to the server with a 
response code of 308.  Final (partial) chunk generates a 500 or 503 Server 
Unavailable error from the server

What version of the product are you using? On what operating system?
Visual Studio 2012
.NET 4.5
Windows 8
API Version 1.2.4737.25316 (also confirmed with 1.2.4737.25287)

Please provide any additional information below.

Original issue reported on code.google.com by ke...@radioware.co.uk on 4 Mar 2013 at 4:49

GoogleCodeExporter commented 9 years ago
Please refer to the following on Stackoverflow for more details:

http://stackoverflow.com/questions/14941646/youtube-upload-from-vb-net-with-v3-a
pi

Original comment by ke...@radioware.co.uk on 4 Mar 2013 at 5:06

GoogleCodeExporter commented 9 years ago

Original comment by pele...@google.com on 4 Mar 2013 at 11:33

GoogleCodeExporter commented 9 years ago

Original comment by pele...@google.com on 13 Apr 2013 at 4:27

GoogleCodeExporter commented 9 years ago

Original comment by pele...@google.com on 6 May 2013 at 5:38

GoogleCodeExporter commented 9 years ago
with the latest changes on ResumableUpload we started to support server errors
https://code.google.com/p/google-api-dotnet-client/issues/detail?id=311

In the next release we are going also to create exponential back off which will 
be attached to requests.

I'm closing this issue, please check with the latest development version of the 
library (by cloning the repository). It will be included in the next release 
(version 1.4.0)

Original comment by pele...@google.com on 17 May 2013 at 6:10

GoogleCodeExporter commented 9 years ago

Original comment by pele...@google.com on 22 May 2013 at 10:51