title: Error Loading Extension Could not load extension from 'C:\..\Local\Temp\scoped_dir6312_32763\internal'. Loading of unpacked extensions is disabled
body: <p>When am running my webdriver script, am getting a confirmation dialog box with below message:</p>
  
  <blockquote>
    <p>Error Loading Extension</p>
    
    <p>Could not load extension from 'C:\Users\username\AppData\Local\Temp\scoped_dir6312_32763\internal'. Loading of unpacked extensions is disabled by the administrator.</p>
    
    <p>Would you like to retry?</p>
    
    <p>Yes No</p>
  </blockquote>
  
  <p>Clicking "yes" lets the tests run. </p>
  
  <p>I am not sure why am I getting this dialog box prompted, </p>
  
  <p>I've tried the mentioned workarounds below but neither of them are working:</p>
  
  <ol>
  <li>Replaced chrome driver with latest version.</li>
  <li><p>Added below code in my script:</p>
  
  <pre><code>ChromeOptions options = new ChromeOptions();
  options.addArguments("no-sandbox");
  options.addArguments("disable-extensions");
  driver = new ChromeDriver(options);
  </code></pre></li>
  </ol>
  
  <p>Below is my Test method:</p>
  
  <pre><code>public void Login() throws IOException{
      test = extent.startTest("Login");
      signInPage = new SignInPage(driver);
      signInPage.enterMailId();   
      String screenShotPath = GetScreenShot.capture(driver, "enterMailId");
      test.log(LogStatus.PASS, "Email id is entered successfully: " + test.addScreenCapture(screenShotPath));
      signInPage.enterpwd();
      //test.log(LogStatus.INFO, "Password is entered successfully");
      screenShotPath = GetScreenShot.capture(driver, "enterpwd");
      test.log(LogStatus.PASS, "Password is entered successfully: " + test.addScreenCapture(screenShotPath));
      signInPage.clickOnLogin();
      test.log(LogStatus.PASS, "User logged in successfully");
  }
  </code></pre>
  
  <p>Below is the method which invoke the browser:</p>
  
  <pre><code>private  void initChromeBrowser(){
      System.setProperty("webdriver.chrome.driver", userdir +"\\chromedriver.exe");
      ChromeOptions options = new ChromeOptions();
      options.addArguments("test-type");
      options.addArguments("no-sandbox");
      //Fix for cannot get automation extension
      options.addArguments("disable-extensions");
      options.addArguments("start-maximized");
      options.addArguments("--js-flags=--expose-gc");         
      options.addArguments("disable-plugins");
      options.addArguments("--enable-precise-memory-info"); 
      options.addArguments("--disable-popup-blocking");
      options.addArguments("--disable-default-apps");
      options.addArguments("test-type=browser");
      options.addArguments("disable-infobars");
      driver = new ChromeDriver(options);
      launchApp();
  }
  </code></pre>
  
  <p>Could there be anything else that I should incorporate in my script to prevent the dialog box.</p>