What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
“Process unexpectedly closed with status 1” is a startup failure, not a diagnosis. With Watir and Firefox, first confirm how Firefox was installed, then inspect geckodriver’s log and the temporary profile path it tried to use. If Firefox is a Flatpak, a likely cause is that Firefox’s sandbox cannot access the profile directory created by geckodriver. A Mozilla report records one Flatpak-specific workaround: create the Firefox runtime temporary directory and set TMPDIR for the process launching the test. It is not a universal fix, and the documented reproduction used Selenium rather than Watir.
What the status-1 error means
Watir asks WebDriver to start Firefox; geckodriver then launches the browser. If Firefox exits during startup, the client may report “Process unexpectedly closed with status 1.” One Mozilla Bugzilla report also showed the message “Your Firefox profile cannot be loaded. It may be missing or inaccessible.” That wording points toward a profile-access problem in that case, but an exit code alone does not identify the cause.
A particularly relevant scenario is a mismatch between the environment running geckodriver and the environment in which a container-packaged Firefox runs. The driver may create a temporary profile on the host, while Firefox inside its sandbox sees a different filesystem. A path passed to Firefox does not itself grant the sandbox permission to read it. Mozilla’s geckodriver documentation discusses this issue for container-packaged browsers and notes Ubuntu 22.04+ as a case where the default Firefox package is known to be affected by container-package behavior. That Ubuntu note is separate from the Flatpak issue report; it does not establish that the reporter was using Ubuntu. Mozilla’s container-package guidance explains the broader filesystem constraint.
Do not assume this is a Flatpak problem until you confirm the installed browser package. Other causes remain possible, and the evidence here does not establish a single fix for every status-1 exit.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Confirm the browser package and collect evidence
Identify the Firefox build
Determine whether the executable used by your test is a Flatpak, Snap, distribution package, or direct Mozilla release. If several Firefox builds are installed, check which one the driver actually launches; identifying a package on disk is not enough if Watir or geckodriver selects a different executable.
Also record the installed Firefox and geckodriver versions and how each was installed. A historical Mozilla report used geckodriver 0.34.0, but that describes the report’s setup only; it is not a current version recommendation.
Read geckodriver’s log before changing paths
Reproduce the failure with geckodriver logging enabled at a level that shows startup details, and inspect geckodriver.log or the destination configured for your setup. Look for the Firefox executable selected, the temporary profile path passed at launch, and errors around browser startup. In the cited Bugzilla discussion, a Mozilla maintainer asked for trace logs and recommended checking the driver log.
Keep the log from the failing run. It lets you verify whether a proposed change actually altered the profile location or browser executable, instead of treating another exit code as proof that a fix worked. Selenium’s common-errors guide is also useful for understanding why a WebDriver error message may describe a symptom rather than the underlying cause.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesCheck whether the profile is visible inside the sandbox
- Find the profile path in the log. Do not guess that Firefox uses a particular temporary directory; check the path geckodriver generated for this run.
- Check access from both sides. The directory must be usable by geckodriver and visible and accessible to Firefox inside its package environment. A host-side directory that exists and is writable may still be outside the browser’s sandbox view.
- Verify the package’s permissions and runtime location. Confirm that the path belongs to the installed package and that its directory exists. A path string by itself does not alter sandbox permissions.
- Change one thing at a time. After selecting an accessible profile location or setting an environment variable, rerun the test and compare the new log’s profile path and startup result with the original.
If the failure does not involve an inaccessible profile, do not keep changing temporary directories. Recheck the executable selection, package permissions, and actual Firefox and geckodriver versions instead.
Rank #2
Choose a fix that fits the installation
Mozilla documents several ways to address container-package filesystem mismatches. The right option depends on which Firefox build you need and where geckodriver can run. Mozilla’s geckodriver usage documentation describes the general approaches.
| Approach | Best fit | What to check |
|---|---|---|
| Use a non-container Firefox build with geckodriver | You can choose a direct Firefox release rather than the sandboxed package. | Make sure the test launches the intended browser executable. This changes the browser installation and avoids this particular container filesystem mismatch; it does not rule out other startup failures. |
| Run geckodriver in the same package environment | Your distribution provides a compatible driver alongside the packaged Firefox. | The driver must actually run in the browser’s package environment. Mozilla warns that selecting the wrong executable path can break this arrangement. |
Set geckodriver’s --profile-root |
You can configure the driver and identify a directory accessible to both programs. | Choose a location that Firefox can really access under its sandbox permissions. Mozilla gives an accessible directory under $HOME as a general example; the Flatpak discussion points to the package runtime location instead. A path alone does not grant access. |
Set TMPDIR to Flatpak’s Firefox runtime temporary directory |
Your setup matches the Flatpak case reported to Mozilla. | Create the package-specific directory first and confirm it is accessible to both processes. This is a reported workaround, not a guarantee for other package IDs or configurations. |
Try the documented Flatpak workaround when it matches
In Mozilla Bug 1755140, a reporter said the following worked for their Flatpak Firefox setup. The reporter created $XDG_RUNTIME_DIR/app/org.mozilla.firefox/tmp/ and set TMPDIR to that directory for the process launching the test:
mkdir -p "$XDG_RUNTIME_DIR/app/org.mozilla.firefox/tmp"
TMPDIR="$XDG_RUNTIME_DIR/app/org.mozilla.firefox/tmp/" ruby your_watir_script.rb
Replace your_watir_script.rb with your script’s path. Run this in the shell that launches the test, after confirming XDG_RUNTIME_DIR is set and the directory matches the Firefox Flatpak package installed on your machine. The trailing slash is part of the reporter’s example. A Mozilla maintainer explained that the override needs to reach geckodriver’s environment; launching the client process with TMPDIR set is how it was done in that report.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteThis is a precise, environment-specific example, not a universal Watir command. The Bugzilla reproduction was reported using Python and Selenium, not Watir. The underlying profile visibility constraint can also affect a Watir launch if its browser and driver use the same kind of sandboxed setup, but the report did not test Watir. If the path or environment differs on your machine, verify the generated profile location in the log rather than copying the example blindly.
Mozilla’s issue discussion also reports that setting TMPDIR to an arbitrary directory directly under $XDG_RUNTIME_DIR did not work in that case, while the Firefox package’s runtime location did. Do not treat that outcome as a rule for all systems; use the directory and permissions appropriate to the installed package.
Verify the result and troubleshoot remaining failures
- The error is unchanged and the profile path is unchanged: Confirm that the environment variable was set in the shell that launches the test and inherited by geckodriver. Check for another launcher or service that starts the test with a different environment.
- The new profile path is still inaccessible: Recheck the package ID, runtime directory, and sandbox permissions. Consider Mozilla’s documented alternatives: a non-container build, a driver in the same package environment, or a configured
--profile-rootthat is genuinely shared. - Firefox starts but exits for another reason: Stop treating this as a profile-path failure. Read the driver log around the exit and check which executable was launched, the package permissions, and the browser and driver versions actually in use.
- You are not using Flatpak: Do not apply the Flatpak runtime path just because the message includes status 1. Use the logs to identify the profile and browser package, then choose a fix that matches that installation.
- The driver works from a shell but not from an IDE or service: Compare the launch environment and selected executable. The documented workaround depends on geckodriver inheriting the environment, so a different launcher can change whether it takes effect.
After any change, confirm that the next run reaches Firefox startup and that the log reflects the intended executable and profile path. If it still exits, the reviewed documentation and issue report do not support a universal status-1 fix; use the actual log and package setup to narrow the diagnosis.
Or skip the browser setup
If the job is to capture a website screenshot rather than run Watir interactions or browser tests, ScreenshotNeo can return a screenshot or PDF from one GET request. It is not a Watir or WebDriver fix. Its capture options include accepting cookie/consent banners and removing known consent platforms, newsletter popups, and chat widgets before capture, with each step switchable. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed; response headers report the page verdict and billing status. It also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for AI agents.
cURL example (see the ScreenshotNeo API documentation):
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 shots per month with no card; paid plans start at $5 for 3,000 shots. Every feature is on every plan. To try it, sign up for 1,000 free screenshots a month with no card.
Frequently Asked Questions
Does the status-1 message prove that the Firefox profile is missing?
No. It reports that Firefox exited during startup. An inaccessible temporary profile is one documented cause, particularly relevant to sandboxed Firefox, but the driver log and package setup are needed to distinguish it from other causes.
Was the Flatpak workaround tested with Watir?
The Mozilla Bugzilla report’s reproduction used Selenium. It documents the environment-specific workaround, not a verified Watir test; apply it to Watir only when your package and driver setup match the same filesystem-access condition.
Free tools Windows power users keep installed
One-click scans. No signup required.
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.




