title: ERROR:gpu_process_transport_factory.cc(1007)-Lost UI shared context : while initializing Chrome browser through ChromeDriver in Headless mode
body: <p>I am getting this error when I attempt to run code on 2 of 3 computers:</p>
  
  <pre><code>[0502/155335.565:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context.
  </code></pre>
  
  <p>Here is the code:</p>
  
  <pre><code>from selenium import webdriver
  from selenium.webdriver.chrome.options import Options
  import os
  
  chrome_options = Options()
  chrome_options.add_argument("--headless")
  chrome_options.add_argument("--disable-gpu")
  chrome_options.add_argument("--window-size=1920x1080")
  
  chrome_driver = os.getcwd() + "\\chromedriver.exe"
  print "chrome driver:" + chrome_driver
  
  driver = webdriver.Chrome(chrome_options=chrome_options, 
  executable_path=chrome_driver)
  
  driver.get("http://www.google.com")
  
  luck_button = driver.find_element_by_css_selector("[name=btnI")
  luck_button.click()
  
  driver.get_screenshot_as_file("capture.png")
  </code></pre>
  
  <p>Now I have checked all of the systems, they are running windows 10 64-bit, google chrome 64 bit Version: 66.0.3359.139, python 2.7 32-bit, chromedriver.exe 32-bit, pycharm 2018.1.1</p>
  
  <p>funny thing is if I run this without the headless options then everything works. The browser pops up, the <code>I'm feeling lucky</code> button is pressed, and a screen shot is taken. Only if I add in the headless bit does this error occur.</p>
  
  <p>I am not sure what could be different on 1 system that would allow this to work when the other systems are running the same software.</p>