title: JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory error using GeckoDriver Firefox and Selenium
body: <p>I am getting below error even though I had set the correct path for gecko driver.</p>
  <p>Main:</p>
  <pre><code>import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.firefox.FirefoxDriver;
  import org.testng.Assert;
  import org.testng.annotations.Test;
  
  public class firstCase {
      @Test
      static void titleControl(){
          System.setProperty(&quot;webdriver.gecko.driver&quot;, &quot;D:\\Program Exe's\\geckodriver-v0.26.0-win64\\geckodriver.exe&quot;);          // Wee need that as Intellij doesn't know where it looks for browser
          WebDriver driver = new FirefoxDriver();
          driver.get(&quot;http://www.google.com&quot;);
          Assert.assertEquals(driver.getTitle(),&quot;Google&quot;);
      }
  }
  </code></pre>
  <p>Error:</p>
  <pre><code>1594880236960   mozrunner::runner   INFO    Running command: &quot;C:\\Program Files\\Mozilla Firefox\\firefox.exe&quot; &quot;-marionette&quot; &quot;-foreground&quot; &quot;-no-remote&quot; &quot;-profile&quot; &quot;C:\\Users\\yasin\\AppData\\Local\\Temp\\rust_mozprofiledXH35Y&quot;
  JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
  1594880239039   Marionette  INFO    Listening on port 49419
  1594880239073   Marionette  WARN    TLS certificate errors will be ignored for this session
  Tem 16, 2020 9:17:19 AM org.openqa.selenium.remote.ProtocolHandshake createSession
  INFO: Detected dialect: W3C
  </code></pre>