Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsSome links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
ERROR:gpu_process_transport_factory.cc: Lost UI shared context is a GPU-process log message—not, by itself, proof that Headless Chrome has failed. If Chrome starts, navigates, and renders the page, judge the run by its assertions and page output. If the test also has a timeout, missing element, or blank screenshot, troubleshoot that observable failure separately. On Linux and macOS, try removing a leftover --disable-gpu flag; Chrome’s documentation says those platforms no longer require it. Windows is the exception in the documentation. Chrome’s Headless documentation also warns that guidance for the original headless shell is not necessarily guidance for today’s Headless implementation.
What the message means—and what it does not
The line has appeared in historical Headless Chrome and WebDriver reports. In some reported setups, it appeared even though the browser continued to work. One module’s known-issues documentation likewise describes it as a headless-mode message that did not affect operation in that module. These examples show that the log can be non-blocking; they do not establish that every occurrence is harmless or that a test passed.
| # | Preview | Product | Price | |
|---|---|---|---|---|
| 1 |
|
LOADpro Electronic Specialties 182 Fundamental Electrical Troubleshooting Book | $46.08 | Buy on Amazon |
Separate the log from the outcome. Did Chrome launch? Did it reach the intended URL? Did the expected element appear? Did the screenshot contain the page? Did the test assertion pass? Those observations tell you whether you have a browser-startup problem, a page-readiness or layout problem, or simply a noisy log. A warning in the console is not a substitute for checking the test result.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Historical reports are useful for understanding the symptom, not for prescribing a current browser setup. For example, the Protractor report used Chrome 69.0.3497.100 on Windows 7, while another WebDriver report involved Chrome 66.0.3359.139 on Windows 10. Those are old, report-specific environments—not current compatibility recommendations.
#1 Best Overall
- 200 PAGE TROUBLESHOOTING GUIDE: Comprehensive 200 page manual covers every major aspect of automotive electrical diagnostics, giving technicians a deep reference for real world testing methods used in daily repair and maintenance work
- WRITTEN BY A MECHANIC: Authored by a working mechanic with hands on experience, providing practical explanations and real world examples that help technicians understand how electrical systems behave during actual service conditions
- COVERS KEY COMPONENTS: Explains batteries, relays, potentiometers, resistors, solenoids and voltmeters, helping users build a strong foundation for diagnosing faults across modern automotive electrical and electronic systems
- FINDING FAULTS MADE CLEAR: Breaks down shorts to ground, battery draws, corrosion issues and voltage drop testing, giving technicians step by step insight into identifying common failures that cause intermittent or persistent problems
- HANDWRITTEN AND HAND DRAWN: All pages are handwritten with hand drawn illustrations, improving clarity and making complex concepts easier to visualize, especially for technicians who learn best through simple, direct explanations
First, establish whether Chrome or the test actually failed
Record the environment before changing flags
Save the complete startup log and note the operating system, Chrome version, ChromeDriver version, automation framework and version, launch arguments, and the first failing assertion. The same log line does not identify one universal cause, so changing several variables at once makes a useful comparison difficult.
- Record the full browser and driver version strings, not just “Chrome” or “ChromeDriver.”
- Keep the exact launch arguments and configured viewport dimensions.
- Note whether Chrome exits, hangs, or remains available to navigate.
- Capture the first actual test failure and, when possible, a screenshot and page state from that moment.
Check the page, not only the process log
If Chrome remains alive, verify the final URL and page title, inspect whether the target element exists, and look at the screenshot or rendered page. A browser that navigates and displays content has not necessarily failed because the GPU log appeared. Conversely, a blank screenshot or missing element is a real symptom even if the only conspicuous console line mentions the GPU.
If the first concrete failure is a missing element or timeout, investigate the selector, page state, and timing. Do not infer that the GPU message caused a selector failure merely because both occurred in the same run.
Check --disable-gpu against your operating system
Chrome for Developers says --disable-gpu is no longer required on Linux or macOS and is needed only on Windows as a temporary workaround for some bugs. That makes the flag a platform-specific diagnostic—not a universal remedy for Headless Chrome failures. See the official Headless Chrome documentation for the current platform guidance.
| Environment | What to try | How to interpret it |
|---|---|---|
| Linux or macOS | If your launch configuration contains --disable-gpu, remove it for a test run. |
Compare navigation, rendering, screenshots, and assertions. Do not assume removing the flag fixes unrelated page or timing failures. |
| Windows | Chrome’s documentation says the flag is needed only on Windows, as a temporary workaround for some bugs. Keep it only where it is required by your setup or resolves an observed issue. | The documentation does not establish that every Windows test needs it, nor that it explains every occurrence of the log. |
Change one setting at a time. If removing the flag on Linux or macOS changes the actual browser behavior, record that result alongside the versions and environment. If only the log changes while the page and assertions behave the same, that is useful evidence too.
Verify the viewport and page readiness
Use the dimensions your test expects
A headless browser still lays out a page at a viewport size. If the configured window is smaller or larger than the environment used when the test was written, responsive design can change the layout, hide or reposition controls, and make screenshots look different. The historical Protractor report used --window-size=800,600 and described blank-looking screenshots; that report is a reason to check the viewport, not a recommendation that 800×600 suits every test.
Set the viewport explicitly to the dimensions your assertions and visual checks expect. Compare screenshots at the same size, and check whether the target element is visible in the resulting layout. Do not treat a different responsive layout as evidence of a GPU failure.
Wait for the required state, not an arbitrary amount of time
Modern pages may render content after navigation has completed. If a test searches too early, it can time out or report a missing element even though the page later becomes usable. Use your framework’s expected-condition mechanism to wait for the specific element or state the test needs, then inspect the failure screenshot or page state if the wait expires. The historical Protractor discussion specifically points to expected conditions for Angular-related timing.
A wait should correspond to a meaningful condition—such as the target element being present or visible—not simply conceal a wrong selector, unexpected page, or permanent load failure. If the condition does not arrive, record what page Chrome reached and what the screenshot shows.
A minimal Selenium Python diagnostic
This example assumes Selenium is installed and a compatible ChromeDriver is available to Selenium on PATH. It opens one URL, sets a fixed viewport, waits for the document body, prints basic page information, and saves a screenshot. On Linux and macOS it deliberately omits --disable-gpu. On Windows, enable that argument only if your setup calls for the documented workaround. The example helps separate browser navigation and rendering from the original noisy log; it is not a universal test configuration.
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
URL = "https://example.com"
options = Options()
options.add_argument("--headless")
options.add_argument("--window-size=1280,800")
# Windows only: uncomment if your setup needs this temporary workaround.
# options.add_argument("--disable-gpu")
driver = webdriver.Chrome(options=options)
try:
driver.get(URL)
WebDriverWait(driver, 20).until(
EC.presence_of_element_located((By.TAG_NAME, "body"))
)
print("URL:", driver.current_url)
print("Title:", driver.title)
print("Body present:", bool(driver.find_elements(By.TAG_NAME, "body")))
driver.save_screenshot("headless-check.png")
finally:
driver.quit()
Run it with the same Chrome binary, driver, operating system, and relevant flags as the failing test wherever possible. If this simple navigation works but the application test fails, focus next on the application’s readiness condition, selector, viewport, or test-specific configuration. If Chrome cannot launch or navigate, preserve the startup output and investigate the browser/driver setup rather than treating the log line as the diagnosis.
Use current Headless guidance, not copied legacy flags
Chrome’s documentation marks its original Headless Chrome shell page as deprecated and explains that a newer Headless implementation has shipped, alongside a separate legacy shell binary. As a result, advice written for the original shell or for old browser versions may not describe the implementation in your current environment. Check the current official documentation and use browser and driver versions appropriate to the environment you actually run.
This is particularly important when copying a 2018-era launch command. The old Protractor and WebDriver reports document the symptom and their own environments; they are not proof that an old version number, framework setting, or flag combination is appropriate for a current project.
Troubleshooting by symptom
| What you observe | What to inspect next |
|---|---|
| The log appears, but Chrome navigates, renders, and assertions pass. | Treat the test outcome as successful unless another observable failure exists. Keep the log with the environment details if you need to compare runs; the line alone does not demonstrate a failed test. |
| Chrome starts but the screenshot is blank or the page looks wrong. | Check the final URL, viewport dimensions, page state, and whether the page content had become ready when the screenshot was taken. Compare the screenshot with the expected responsive layout. |
| A selector is missing or a wait times out. | Inspect the page at the failure point, verify the selector and target URL, and wait for the specific expected state. Do not attribute a missing element to the GPU log without evidence. |
| Chrome fails to start or navigate. | Capture the full startup output and version information, then verify the browser/driver setup and launch arguments. The available reports do not establish one universal cause for startup failure. |
| The run changes after editing GPU flags. | Compare one change at a time on the relevant operating system, recording actual page and assertion behavior as well as whether the log changed. |
Or skip the browser setup
If your goal is a screenshot or PDF of a URL—not to run or debug a Selenium test—you can use ScreenshotNeo, a website screenshot API and MCP server. It is not a fix for a failing ChromeDriver test: it is an alternative when you need the capture output without setting up your own browser automation. A single GET request can return a PNG, JPEG, WebP, or PDF. The capture can accept cookie or consent banners like a visitor and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in X-Page-Verdict and X-Billed headers. AI agents can use its MCP server tools take_screenshot, get_page_info, and capture_pdf.
For the API key and available parameters, see the ScreenshotNeo documentation. Replace the example URL with the page you want to capture:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
The Free plan includes 1,000 screenshots a month with no card required; paid plans start at $5 for 3,000 screenshots. Sign up for ScreenshotNeo’s free plan.
Sources and scope
- Chrome for Developers: Headless Chrome shell — Headless implementation context and platform guidance for
--disable-gpu. - Stack Overflow: Lost UI Shared Context Error — Running Protractor tests in headless Chrome — a historical Protractor report with a Windows 7, Chrome 69 setup.
- Stack Overflow: ChromeDriver showing Lost UI Shared Context — a historical WebDriver report and environment.
- MetaCPAN: WWW-Mechanize-Chrome 0.19 README — module-specific known-issue note about the message.
Frequently Asked Questions
Can I silence the line without changing browser behavior?
The cited sources do not establish a general logging switch that safely suppresses this message across current Chrome versions and automation frameworks. Prefer recording it and verifying page behavior over hiding output that could contain other useful diagnostics.
Should I switch to the legacy headless shell to avoid the message?
The available evidence does not show that switching binaries is a fix. Chrome’s documentation distinguishes the newer Headless implementation from the legacy shell; choose the implementation your project requires and diagnose the actual failure in that environment.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Recommended Free Tools

