title: Failed to launch browser with "https://accounts.google.com/o/oauth2/v2/auth"
body: <p>I am uploading video from local to youtube.</p>
  
  <p>In local server it is working fine and authenticating window is getting opened . But while uploading video , this below code I am running and getting this error.</p>
  
  <pre><code>2017-04-22 02:57:34.275 -05:00 [Information] C:\Backups\inetpub\YouTube\client_secrets.json
  2017-04-22 02:57:34.479 -05:00 [Information] ==========Failed to launch browser with "https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&amp;response_type=code&amp;client_id=357849494845-pg20dbmdnhoi5gk8go2bakbs9q8635q8.apps.googleusercontent.com&amp;redirect_uri=http:%2F%2Flocalhost:53639%2Fauthorize%2F&amp;scope=https:%2F%2Fwww.googleapis.com%2Fauth%2Fyoutube.upload" for authorization. See inner exception for details.=============
  2017-04-22 02:57:34.481 -05:00 [Information] ==========   at Google.Apis.Auth.OAuth2.LocalServerCodeReceiver.&lt;ReceiveCodeAsync&gt;d__8.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Google.Apis.Auth.OAuth2.AuthorizationCodeInstalledApp.&lt;AuthorizeAsync&gt;d__8.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Google.Apis.Auth.OAuth2.GoogleWebAuthorizationBroker.&lt;AuthorizeAsync&gt;d__4.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Google.Apis.Auth.OAuth2.GoogleWebAuthorizationBroker.&lt;AuthorizeAsync&gt;d__1.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
     at YoutubeApiDemo.classes.UploadVideo.&lt;Run&gt;d__3.MoveNext() in C:\Users\GLB-008PC\Desktop\New folder\YoutubeApiDemo\src\YoutubeApiDemo\classes\UploadVideo.cs:line 45=============
  2017-04-22 02:57:34.487 -05:00 [Debug] Executed action method "YoutubeApiDemo.Controllers.HomeController.UploadVideo (YoutubeApiDemo)", returned result "Microsoft.AspNetCore.Mvc.ContentResult".
  2017-04-22 02:57:34.488 -05:00 [Information] Executing ContentResult with HTTP Response ContentType of "text/plain; charset=utf-8"
  2017-04-22 02:57:34.489 -05:00 [Information] Executed action "YoutubeApiDemo.Controllers.HomeController.UploadVideo (YoutubeApiDemo)" in 224.0549ms
  2017-04-22 02:57:34.489 -05:00 [Information] Request finished in 226.4115ms 200 text/plain; charset=utf-8
  2017-04-22 02:57:34.489 -05:00 [Debug] Connection id ""0HL49AKRM6GUK"" completed keep alive response.
  </code></pre>
  
  <p>My code to perform this task is :</p>
  
  <pre><code>using (var stream = new FileStream(client_secret_path, FileMode.Open, FileAccess.Read))
                  {
                         credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
                         GoogleClientSecrets.Load(stream).Secrets,
                        new[] { YouTubeService.Scope.Youtube, YouTubeService.Scope.YoutubeUpload },
                        username,
                        CancellationToken.None,
                        new FileDataStore("YouTube.Auth.Store")).Result;
  
                  }
  </code></pre>