For the specific CentOS 7 report behind this error, the accepted community answer recommends installing the GNU FreeSans font package, then retrying the headless screenshot. The report involved Google Chrome 59.0.3071.86 in 2017; this is a historical, case-specific fix, not a confirmed remedy for every Chrome crash that prints “Could not get the download directory.”
What the original error refers to
The original report describes a command-line screenshot attempt on CentOS 7 using Chrome 59.0.3071.86. Chrome printed “Could not get the download directory” and then terminated with Trace/breakpoint trap. The user had already tried creating download folders in the home directory without resolving the crash. See the original Stack Overflow report.
As an Amazon Associate I earn from qualifying purchases.
The accepted answer says installing gnu-free-sans-fonts fixed that case. Treat this as a community-reported workaround for that environment, not an official Chrome diagnosis or a guarantee for other versions or systems.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Apply the reported CentOS 7 fix
- Check the environment. Record the Chrome version and the full command you use. The matching report used Chrome 59.0.3071.86 and requested a screenshot, rather than saving a browser download.
- Check package availability. Confirm that
gnu-free-sans-fontsis available from the repositories configured on your CentOS 7 host. Availability can depend on repository configuration. - Install the package if available.
sudo yum install gnu-free-sans-fontsThis is the command given by the accepted answer. Read the accepted Stack Overflow answer.
- Retry the screenshot. The accepted answer suggests this example command:
google-chrome --headless --disable-gpu --enable-logging -v=10
--screenshot=out.png http://www.chromestatus.com
If you are checking against the original report, its command used google-chrome-stable, logging level -v=5, output file out.png, and http://www.google.com. Use the Chrome executable and target URL appropriate to your installation.
#1 Best Overall
- Dell PowerEdge R730xd 24B SFF 2U Server
- 2x Intel Xeon E5-2690 v4 2.6Ghz 14-Core (28-cores Total)
- 128GB DDR4 RAM – 4x 1.2TB 10K SAS 2.5” 12Gb/s
- Dell H730P mini 2GB 12Gb/s RAID
- 2x 750W PSU - 2x 10Gb SFP+ 2x 1Gb (RJ45) NIC
Separate screenshot crashes from download-directory problems
The message alone does not establish that Chrome cannot find a folder you need to create. In the CentOS 7 report, creating home-directory download folders did not fix the screenshot crash; the accepted answer instead reports the font-package installation.
Later community reports describe a different issue: Chrome/ChromeDriver 110 sessions not honoring download.default_directory, with files going elsewhere or downloads marked canceled. Some participants said --headless=new helped their cases, while the discussion did not establish whether the defect belonged to ChromeDriver or Chromium. That is a download-preference problem, not evidence that the flag fixes the Chrome 59 screenshot crash. Read the ChromeDriver Users discussion.
Rank #2
- Model: Dell OptiPlex 7050 Small Form Factor (SFF)
- Processor: Intel Core i7-7700 3.60 GHz
- Memory: 32GB DDR4 Ram
- Storage: 1TB Solid State Drive (SSD) Fast Boot + Storage
- Operating System: Windows 11 Pro (64-bit)
- Screenshot process crashes: Check the Chrome version, screenshot command, quoted log line, and whether the process ends with a trace/breakpoint trap.
- Automated download goes to the wrong place or is canceled: Check Chrome and ChromeDriver versions, the configured download directory, and the observed download behavior as a separate problem.
Troubleshooting if the package does not help
- The package cannot be found: Check the host’s enabled repositories and whether they provide
gnu-free-sans-fonts. The historical answer does not establish which repositories a particular machine needs. - The crash continues after installation: Confirm that you installed the package on the machine running Chrome, then capture the complete command, Chrome version, and log. The reported fix is not established as universal.
- You are using a newer Chrome/ChromeDriver download workflow: Do not apply the CentOS screenshot workaround or assume
--headless=newis a fix. Verify the versions and diagnose the download preference behavior independently.
Or skip the browser setup
If your goal is to obtain a website screenshot rather than debug a local Chrome installation, ScreenshotNeo provides a screenshot API. One GET request can return an image or PDF; for example, cURL can save a WebP screenshot like this:
Free tools Windows power users keep installed
One-click scans. No signup required.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo documentation for API details. Cookie banners, popups, and chat widgets are removed before capture; bot checks, blank pages, and failed loads are never billed. An MCP server lets AI agents take screenshots, and 1,000 screenshots a month are free with no card; paid plans start at $5 for 3,000. Sign up for free.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Frequently Asked Questions
Does `–headless=new` fix the CentOS 7 Chrome 59 screenshot crash?
The available report about that flag concerns later Chrome/ChromeDriver download-preference behavior, not the Chrome 59 screenshot crash.
Rank #3
- 2.80 GHz processor speed ensures efficient operation with consistent reliability
- Intel Xeon 2.80 GHz processor provides enterprise-grade performance with built-in security and remote management capabilities
- Quad-core (4 Core) processor core helps server process data quickly and reliably for maximum productivity
- 1 processors supported for faster processing and improved access to data, optimizing performance under heavy loads
- With 16 GB memory, you can multitask between applications seamlessly, keeping productivity high and response times quick
Is the FreeSans package an official Chrome fix?
No. It is the workaround reported in the accepted community answer for the specific historical CentOS 7 case.
Quick Recap
Best Value
- HP Z4 G4 Workstation Tower
- Intel Xeon W-2133 6-Core 3.6GHz (3.9GHz Turbo)
- 64GB DDR4 Memory - Nvidia Quadro P400 2GB
- 512GB NVMe M.2 SSD (boot) + 2TB HDD (storage)
- Windows 11 Pro 64-bit
Rank #4
- MODEL P74439-005: Compact and affordable HPE ProLiant MicroServer Gen11 powered by Intel Pentium Gold G7400 3.7GHz processor, ideal for file sharing, NAS, and basic business workloads
- READY OUT OF THE BOX: Includes 16GB DDR5 UDIMM memory (expandable to 128GB), one 1TB SATA 6G Business Critical HDD, embedded Intel VROC SATA, dedicated iLO-M.2 port kit, 180w external power adapter and 1/1/1 warranty for dependable plug-and-play server operation
- WHISPER-QUIET & SPACE-SAVING: Ultra-compact mini tower design fits easily in small office spaces; supports wall, flat, or vertical placement for deployment flexibility
- INTEGRATED REMOTE MANAGEMENT: Comes with HPE iLO 6 and embedded TPM 2.0 for secure, license-free remote server administration through shared port access
- EXPANDABLE DESIGN: Two PCIe slots (including PCIe 5.0) and four LFF-NHP drive bays provide robust options for storage and component scalability. Features new MR408i-p controller support for enhanced storage performance
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.

