Browser-Based YouTube Upload in Firefox 16 Aborts Unexpectedly

504 Views Asked by At

I have a regular YouTube browser-based upload form, as shown below. It works great in IE, Chrome, and older versions of Firefox. However, my Firefox 16.0.2, just hangs on the POST. I have replicated the problem on other computers with Firefox 16.x.

The file uploads correctly if I manually override the SSL by changing YouTube's URL from: https://uploads.gdata.youtube.com to http://uploads.gdata.youtube.com.

To make things even stranger, the request is not logged at all on the Net tab in Firebug. On Firefox's Web Console, I can see the request, but the response and status code is totally missing. Then, if I use Fiddler with the Decrypt HTTPS traffic option enabled the file uploads correctly.

Anyone have any ideas what could be going on or how to monitor the SSL traffic without fixing the problem?

<!DOCTYPE html>
<html>
    <head><title>YouTube Test</title></head>
    <body>
        <form id="frmYouTube" enctype="multipart/form-data" method="post" action="https://uploads.gdata.youtube.com/action/FormDataUpload/YOU_TUBE_URL?nexturl=https%3a%2f%2fMY.DOMAIN.COM%2fDIR_1%2fDIR_2%3fid2%3dLOCAL_ID">
        <table>
            <tr><td><input type="file" name="file" /></td></tr>
            <tr><td>
                    <input type="hidden" name="token" value="MY_YOUTUBE_TOKEN" />
                    <input type="submit" value="Upload" />
            </td></tr>
        </table>
        </form>
</body>
</html>

The YouTube url and token are generated on the backend using ASP.Net with the Google.GData.YouTube library. Here is part of that code:

public class BaseModel
{

    public string SITE_YOUTUBE_APP_NAME = "";
    public string SITE_YOUTUBE_DEV_KEY = "";
    public string SITE_YOUTUBE_USERNAME = "";
    public string SITE_YOUTUBE_PASSWORD = "";
    public string YOUTUBE_CATEGORY = "";

    public FormUploadToken FormToken;

    public void Load()
    {

        YouTubeRequestSettings settings = new YouTubeRequestSettings(
            SITE_YOUTUBE_APP_NAME, SITE_YOUTUBE_DEV_KEY,
            SITE_YOUTUBE_USERNAME, SITE_YOUTUBE_PASSWORD);

        YouTubeRequest request = new YouTubeRequest(settings);

        Video newVideo = new Video();

        string title = "Test Title";

        string description = "Test Description";

        newVideo.Title = title;
        newVideo.Tags.Add(new MediaCategory(YOUTUBE_CATEGORY, YouTubeNameTable.CategorySchema));
        newVideo.Keywords = "test";
        newVideo.Description = description;
        newVideo.YouTubeEntry.Private = false;

        FormToken = request.CreateFormUploadToken(newVideo);
    }
}
2

There are 2 best solutions below

0
On BEST ANSWER

Since Firefox 17 is now available and Google does not completely support Firefox 16 for this feature, I added a warning for users with Firefox 16 to upgrade to Firefox 17 or use a different browser. Not ideal, but this was the only reasonable solution given the number of test users who were unsuccessful on Firefox 16.

0
On

From my testing YouTube browser based uploading is very temperamental, sometimes it works(1-5% chance) most of the time it doesn't, I just uploaded a video using 54.243.53.37/Home/Index using Firefox 16 on Windows 7, but I know most of the time it just won't initialize.

However disabling your firewall increases the chance of uploading successfully. Not sure why this is though (It could just be lucky observations of course).