title: WinAppDriver continuously throws an error as 'Unknown error, Operation timed out'
body: <p>I'm trying to automate UI's of an extension installed in <strong>Visual Studio 2019 Enterprise</strong> using WinAppDriver and after all the successful completion of configurations and test scenarios, the WinAppDriver server keeps throwing an error as below.</p>
  
  <pre><code>Accept: application/json, image/png
  Connection: Keep-Alive
  Content-Length: 169
  Content-Type: application/json;charset=utf-8
  Host: 127.0.0.1:4723
  User-Agent: selenium/3.141.0 (.net windows)
  
  HTTP/1.1 500 Internal Error
  Content-Length: 117
  Content-Type: application/json
  
  {"status":13,"value":{"error":"unknown error","message":"Operation timed out. (Exception from HRESULT: 0x80131505)"}}
  </code></pre>
  
  <p>Initially my test suit was successfully run but, now it keeps throwing above error.</p>
  
  <p>Also, in the Visual Studio it logs an error as;</p>
  
  <blockquote>
    <p>"Message:
    Test method abc.1234.test threw exception:
    System.NullReferenceException: Object reference not set to an instance of an object."</p>
  </blockquote>
  
  <p>This is how my session is created.</p>
  
  <pre><code>if (session == null)
  {
  TestLogger.LogInfo("Session object is null, creating new singleton object");
  Connector winAppRun = new Connector();
  
  try
   {
  
  winAppRun.WinAppUrl = configHelper.GetWinAppDriverURL() + configHelper.GetWinAppDriverPort();
  winAppRun.ProjectLocation = ConfigurationManager.AppSettings.Get("AppLocation");
  
  AppiumOptions opt = new AppiumOptions();
  
  opt.AddAdditionalCapability("app", winAppRun.ProjectLocation);
  opt.AddAdditionalCapability("deviceName", "WindowsPC");
  **session = new WindowsDriver&lt;WindowsElement&gt;(new Uri(winAppRun.WinAppUrl), opt, TimeSpan.FromMinutes(5));**
  Thread.Sleep(TimeSpan.FromSeconds(10));
  </code></pre>
  
  <p>If some one can give a solution for my issue, it would be highly appreciated.
  Thank you.</p>