October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

How to Fix Selenium Screenshots Failing With Chrome Sandbox Errors

When Chrome fails to start with a sandbox error, add --no-sandbox to the affected WebDriver session and retest. If Chrome starts but screenshot capture fails, diagnose the driver and capture command separately.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If Chrome refuses to start and reports a sandbox error, add --no-sandbox to the Chrome options for that WebDriver session, then rerun a minimal test. Use this only as a targeted workaround: disabling Chrome’s sandbox weakens browser isolation, and it is not a general fix for screenshot commands that fail after Chrome has started.

First determine whether Chrome is failing to launch

A screenshot failure can happen at two different stages: Chrome may exit before the WebDriver session starts, or the browser may start and navigate successfully but fail when Selenium requests a screenshot. The sandbox flag is relevant to the first case only.

As an Amazon Associate I earn from qualifying purchases.

  1. Reduce the test to creating a WebDriver session, navigating to one page, and taking one screenshot.
  2. Save the complete exception and, if available, Chrome and ChromeDriver logs.
  3. Record your Selenium, Chrome, and ChromeDriver versions, operating system or container, and the Chrome arguments used to launch the session.
  4. Check whether Chrome exits before navigation or remains available until the screenshot call.

Selenium notes that many reported errors arise in the underlying drivers that receive Selenium commands, rather than in Selenium itself (Selenium troubleshooting). Do not assume a sandbox problem solely because the screenshot call failed.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Fix a sandbox-related Chrome launch failure

Pass --no-sandbox as a Chrome argument when creating the affected session. Selenium’s Chrome documentation shows this option (Selenium Chrome options).

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents

Python example

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument("--no-sandbox")
driver = webdriver.Chrome(options=options)

try:
    driver.get("https://example.com")
    driver.save_screenshot("shot.png")
finally:
    driver.quit()

Retry the same minimal test. If Chrome now launches but the screenshot still fails, treat that as a separate capture or driver problem and follow the diagnostic steps below.

Security limitation

Chrome’s sandbox is an important isolation boundary. Disabling it reduces protection, so use this workaround only in a constrained automation environment where it is required. Prefer configuring the runtime so Chrome’s normal sandbox can operate when feasible. Do not use sandbox-disabled Chrome for untrusted browsing workloads.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

Send the option to a remote Chrome session

With Selenium Grid or another remote WebDriver endpoint, Chrome runs on the remote node. The argument must be part of the Chrome options or capabilities used to create that remote session; adding it only to a local browser configuration will not affect the remote Chrome process. Selenium’s remote examples demonstrate setting Chrome arguments on the options passed to the remote builder (Selenium Chrome options).

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
from selenium import webdriver
from selenium.webdriver.chrome.options import Options

options = Options()
options.add_argument("--no-sandbox")
driver = webdriver.Remote(
    command_executor="http://grid-host:4444",
    options=options,
)

Replace the example endpoint with your Grid URL. If the remote session still fails, inspect the remote node’s Chrome and ChromeDriver logs and confirm that the requested options reach that node.

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

Separate sandbox errors from headless and display setup

Headless mode controls whether Chrome displays a browser window; it does not disable or repair the sandbox. For a headless run, add the headless argument separately. Selenium’s headless guidance demonstrates --headless=new (Selenium Chrome documentation).

options.add_argument("--headless=new")
options.add_argument("--no-sandbox")

Use the headless argument appropriate for the Chrome version installed in your environment. Chromium’s testing guidance also describes --ozone-platform=headless for tests that do not need to draw, and Xvfb for tests that require a display (Chromium headless testing). Choose between these according to whether the test needs display behavior; neither is a substitute for diagnosing a sandbox launch error.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

If Chrome starts but taking the screenshot fails

  • Check whether navigation and other WebDriver commands work before the screenshot call. If they do, the browser has started and changing launch flags without evidence is unlikely to address the capture failure.
  • Keep the full exception and inspect Selenium and ChromeDriver logs for the failed command.
  • Try to reproduce the same capture in another browser if practical; this can help identify a driver-specific issue, as Selenium suggests in its troubleshooting guidance (Selenium troubleshooting).
  • Confirm that the session is still alive and that the page has reached the state your test expects before requesting the screenshot.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Check Chrome and ChromeDriver compatibility

Capture the actual browser and driver versions from the environment running the test; do not infer them from the Selenium package version. Selenium’s Chrome documentation says Chrome and ChromeDriver must match at the major-version level. The same page says Selenium 4 is compatible with Chrome v75 and newer, but that statement does not guarantee every old browser-and-driver combination works (Selenium Chrome documentation).

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If the Chrome and ChromeDriver major versions differ, align them and rerun the minimal test before investigating more obscure causes.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

Common symptoms and next steps

What you observe What to check next
Chrome exits during session creation with a sandbox-related message Add --no-sandbox to that session’s Chrome options, then retry. Use the workaround with the security limitation described above.
Chrome starts and navigates, but the screenshot call throws Inspect the screenshot exception and driver logs; do not treat it as a launch failure.
Local Chrome works but a remote session fails Pass the options when creating the remote Chrome session and inspect the remote node.
The failure occurs in CI without a display Configure headless mode for the installed Chrome version, or use Xvfb if the test needs a display.
Browser and driver versions appear incompatible Check their actual major versions and align them.

Or skip the browser setup

If your goal is simply to get a website screenshot rather than exercise Selenium, ScreenshotNeo provides a screenshot API. Its one-call request returns an image or PDF; the API accepts URL parameters used by other screenshot APIs as well. See the ScreenshotNeo API documentation.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

ScreenshotNeo accepts cookie or consent banners before capture and removes 60+ known consent platforms, newsletter popups, and chat widgets; these steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and each response identifies the page verdict and billing status in headers. Its MCP server provides screenshot tools for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.

Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month with no card.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Does adding --headless=new fix a Chrome sandbox error?

No. Headless mode changes display behavior; it does not address Chrome’s sandbox. Use it only when your environment needs headless execution.

Should I always run Chrome with --no-sandbox?

No. It weakens browser isolation. Apply it only when a sandbox-related launch failure requires the workaround, and avoid it for untrusted browsing workloads.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.