Chrome Headless usually uses a different profile because the automation launch is pointed at a different user-data directory, Chrome channel, or temporary directory—not because Headless has a separate profile system. In chrome://version, copy the Profile Path, then use its parent directory as --user-data-dir. If you need a clean profile instead, set a separate directory deliberately. Never run simultaneous Chrome processes against the same profile directory.
What Chrome means by a profile and a user-data directory
Chrome’s user-data directory is the parent folder for browser data and profiles. It holds per-installation local state as well as profile folders such as Default and Profile 1. The profile folder contains a particular profile’s data, including history, bookmarks, and cookies. Chromium’s User Data Directory documentation distinguishes the two levels.
For example, a Profile Path might be /home/alex/.config/google-chrome/Profile 1. In that case, the user-data directory is /home/alex/.config/google-chrome, not the full Profile Path and not the Profile 1 subfolder. Chrome’s profile guide describes profiles as subdirectories within the user-data directory.
That distinction explains a common surprise: if you pass the child profile folder as --user-data-dir, Chrome may create or use a new profile layout beneath it. The browser then appears to have ignored the profile you intended to select. This is a path-selection problem, not evidence that Headless discarded your data.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Why Headless may open a different profile
Headless is a way to run Chrome without visible UI. Modern Chrome uses a unified browser implementation for Headless and headful mode; Headless does not inherently start with separate profile data. Google documents that the old Headless implementation became a standalone chrome-headless-shell starting with Chrome 132.0.6793.0. Unless you intentionally use that shell, switching from visible Chrome to modern Headless should not by itself change which profile is available.
The profile can still differ because the two launches do not necessarily use the same executable, operating-system account, startup arguments, or data-directory default. Chrome Stable, Beta, Dev, Canary, Chromium, and Chrome for Testing can have different default profile roots. Automation frameworks may also launch a downloaded browser or assign a temporary directory. If --user-data-dir is absent, misspelled, relative to an unexpected working directory, or points to the wrong parent, Chrome may quietly use or initialize another location.
- Wrong directory level: The argument names a child such as
DefaultorProfile 1, rather than its parent. - Different Chrome build: The executable in automation is not the same channel or installation as the one you use interactively.
- Implicit framework directory: The launcher chooses a temporary or framework-managed data directory that is not your regular Chrome data directory.
- Directory already in use: Another process has opened the same profile, so a second session cannot safely share it.
- Different OS user: The automation process runs under another account, whose default Chrome data location is different.
Identify the exact profile and launch Chrome against it
- Open the working visible profile. In the Chrome window that has the bookmarks, cookies, or other state you expect, enter
chrome://versionin the address bar. - Copy Profile Path. This is the path to the profile directory itself. For example, it may end in
/Profile 1or/Default. - Use the parent as the user-data directory. Remove the final profile-folder component. If the path is
/home/alex/.config/google-chrome/Profile 1, the parent to pass is/home/alex/.config/google-chrome. - Confirm the executable and channel. Check which Chrome binary the automation tool launches; do not assume it is the same one as your desktop shortcut.
- Inspect the actual launch arguments. Log or otherwise examine the command line produced by the framework. Look for a second
--user-data-dir, a temporary path, or a different browser executable. - Check for another process using the directory. Close the existing Chrome session before reusing its profile, or choose a separate automation directory.
Use an absolute path for a persistent directory so the result does not depend on the process’s working directory. On Linux, Chromium documents that --user-data-dir takes precedence over CHROME_USER_DATA_DIR; check both the argument and environment if the selected path is unexpected.
Fix it from the command line
For a profile you intend to reuse, set the user-data directory to the correct parent. This Linux example uses an absolute path:
google-chrome --headless --user-data-dir=/home/alex/.config/google-chrome
Replace that path with the parent of the target Profile Path on your system. On Windows or macOS, use the Chrome executable and path syntax for that installation; the key is still to supply the parent directory, not the child profile folder. If a launcher adds its own data-directory argument, make the final effective value the one you intend.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
If the goal is repeatable automation rather than reuse of personal browsing state, create a dedicated directory instead:
google-chrome --headless --user-data-dir=/tmp/chrome-automation-profile
Chrome initializes a new, empty directory with profile data. A purpose-built directory avoids coupling a test to your daily browser state and makes it easier to discard or recreate the automation environment. Do not expect it to contain the cookies or bookmarks from your regular profile unless you have deliberately arranged for that state to be present.
Set the directory in Puppeteer
Puppeteer accepts a userDataDir launch option. Supply the user-data directory, not the final Default or Profile 1 component:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch({
headless: true,
userDataDir: '/home/alex/.config/google-chrome'
});
try {
const page = await browser.newPage();
await page.goto('https://example.com');
console.log(await page.title());
} finally {
await browser.close();
}
For shared or parallel automation, prefer a separate directory for each job rather than pointing concurrent launches at one persistent profile. Generate a unique directory per job, close the browser when the job ends, and remove disposable directories after shutdown. Keep a persistent profile only when retaining state across runs is an explicit requirement.
Set the directory in Selenium
In Java, add the Chrome arguments to ChromeOptions before creating the driver:
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
ChromeOptions options = new ChromeOptions();
options.addArguments("--headless=new");
options.addArguments("--user-data-dir=/home/alex/chrome-automation-profile");
WebDriver driver = new ChromeDriver(options);
try {
driver.get("https://example.com");
System.out.println(driver.getTitle());
} finally {
driver.quit();
}
Use a directory that is not simultaneously open by another Chrome process. Selenium’s Chrome options documentation lists --headless=new and --user-data-dir=... as Chrome arguments. Also keep ChromeDriver’s major version matched to the Chrome major version it controls; a mismatch can prevent launch even when the profile path is correct.
Connect remote debugging to the intended profile
If a tool connects to an already-running browser over the Chrome DevTools Protocol, start the intended Chrome binary with both a debugging port and a non-default data directory, then connect the client to that port:
Free tools Windows power users keep installed
One-click scans. No signup required.
/usr/bin/google-chrome
--remote-debugging-port=9222
--user-data-dir=/tmp/chrome-profile-stable
Use a port and directory that match the client configuration. The chrome-devtools-mcp documentation says its persistent profile is reused between runs, only one browser can use it at a time, and --isolated creates a temporary directory. Do not expose a remote-debugging endpoint to networks or users who should not control that browser; keep access limited to the local workflow that needs it.
Choose between a persistent profile and an isolated one
| Approach | Use it when | Trade-off |
|---|---|---|
| Reuse a dedicated persistent directory | Runs need state retained between sessions. | State can carry over between runs, and the directory must not be used by concurrent Chrome processes. |
| Use a fresh temporary directory | Runs should start clean or execute in parallel. | State does not persist unless the workflow saves or recreates it another way. |
| Use the everyday desktop profile | You specifically need its existing browser state and can ensure it is not open elsewhere. | It is stateful and not suitable for simultaneous independent sessions; channel and OS path differences can make it easy to target the wrong directory. |
For a single interactive debugging session, a known persistent directory can be convenient. For many workers or repeatable tests, isolated per-job directories reduce accidental state sharing and profile-lock conflicts. This choice is separate from Headless: either mode needs a correctly selected, available data directory.
Troubleshoot the common failures
Chrome launches, but bookmarks or cookies are missing
Recheck the Profile Path in the visible browser and derive its parent exactly. Then verify that automation launches the same Chrome channel and OS account. Also inspect the final arguments for a framework-supplied temporary directory that overrides your intended setting.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
A new profile appears inside the folder you specified
The supplied path may be the profile folder itself rather than its parent. For a Profile Path ending in /Profile 1, use the directory one level above it as --user-data-dir.
Recommended Free Tools
Chrome refuses to start or reports that the profile is in use
Another Chrome process may already own that directory. Close that process before retrying, or switch the automation to its own directory. Do not try to make parallel workers share a single profile; each concurrent session needs a unique directory or an isolated temporary profile.
The correct flag seems to have no effect
Log the complete launch command and inspect environment configuration. Confirm the exact spelling and value of --user-data-dir, check whether the framework also sets a directory, and account for CHROME_USER_DATA_DIR on Linux if no command-line override is present.
Selenium fails before the page opens
Separate driver setup from profile diagnosis: verify ChromeDriver’s major version matches Chrome’s major version, then retry with a known available user-data directory. A version mismatch is a launch compatibility issue, not proof that the profile path is wrong.
Remote debugging connects to the wrong session
Start the intended binary with the configured non-default directory and debugging port, then ensure the client attaches to that same port. A persistent remote-debugging profile can only be used by one browser at a time.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Or skip the browser setup
If your actual goal is to capture a website screenshot rather than automate a particular local Chrome profile, ScreenshotNeo provides a screenshot API and MCP server. It is not a fix for Puppeteer or Selenium profile selection; it lets you request a remote capture without configuring a local browser profile. Its clean-shot options accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture, with each step switchable. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and whether the request was billed. Its MCP server offers take_screenshot, get_page_info, and capture_pdf to AI agents and MCP clients such as Claude and Cursor.
One GET request returns a PNG, JPEG, WebP, or PDF. For example, save a WebP screenshot with cURL (see the ScreenshotNeo API documentation for options and response details):
curl -G "https://api.screenshotneo.com/v1/shot"
-d access_key=YOUR_API_KEY
--data-urlencode url=https://example.com
-o shot.webp
The same request in Python:
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://example.com"},
timeout=90,
)
open("shot.webp", "wb").write(r.content)
Or in Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://example.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
const image = Buffer.from(await res.arrayBuffer());
await import('node:fs/promises').then(fs => fs.writeFile('shot.webp', image));
The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up for the free plan and try ScreenshotNeo.
FAQ
Does opening a profile in Headless change or erase its data?
Headless itself is not a separate profile store. The relevant question is which data directory the launch selected and whether another Chrome process is using it.
Can multiple automation jobs reuse one user-data directory?
They should not run concurrently against the same directory. Use a unique directory per job or an isolated temporary profile for parallel work.
Frequently Asked Questions
Does opening a profile in Headless change or erase its data?
Headless itself is not a separate profile store. The relevant question is which data directory the launch selected and whether another Chrome process is using it.
Can multiple automation jobs reuse one user-data directory?
They should not run concurrently against the same directory. Use a unique directory per job or an isolated temporary profile for parallel work.
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.

