Most Selenium errors on Ubuntu come from one of four places: test timing, a missing or mismatched browser driver, a browser that cannot start with the installed Linux libraries, or a network/architecture constraint that blocks driver management. PhantomJS adds a separate issue: it is legacy, and Selenium’s native support for it was removed because its WebDriver implementation is no longer actively developed. Identify which layer is failing before reinstalling packages or changing test code.
Start by recording the failing environment
Before changing anything, capture the details from the process that actually runs the test—not just from an interactive terminal. Record:
- Ubuntu release and CPU architecture.
- Programming language, Selenium binding version, and whether the test is headless.
- Browser name and version, plus driver name and version if a separate driver is installed.
- Whether the run is in a container, CI job, IDE, service, or snap-confined environment.
- Whether the machine needs a proxy to reach the internet.
- The complete error and the point at which it occurs: session creation, browser startup, navigation, or an element lookup.
Ubuntu package names and availability can vary by release and browser packaging method. Check the release-specific Ubuntu documentation before applying package instructions; Ubuntu’s documentation portal links to release documentation.
Decide whether the failure is timing or infrastructure
Selenium’s troubleshooting guidance identifies poor synchronization as its most common Selenium-related error. A test that looks like a browser or driver failure may simply be trying to inspect a page before the page has reached the expected state.
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 →Repair Windows errors before they cause bigger problemsFix Now →#1 Best Overall
- 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
Use the failure pattern to narrow it down
- A temporary longer wait makes the test pass: investigate synchronization. Replace fragile timing assumptions with an explicit wait for the condition the test needs, such as an element becoming available. Avoid treating a longer fixed sleep as the permanent repair.
- The same test fails in multiple browsers: first inspect application timing and test assumptions. A shared failure is less likely to be caused by one browser’s driver.
- Only one browser fails: check that browser’s executable, driver selection, and version compatibility.
- The browser never opens or exits immediately: inspect the startup error, driver-manager output, architecture, and Linux shared-library messages before changing page-level waits.
Keep synchronization and startup diagnosis separate: a WebDriver session that cannot launch has not yet reached the point where page waits can fix it.
Fix missing or mismatched ChromeDriver and GeckoDriver
A WebDriver session requires a browser-specific driver: for example, ChromeDriver for Chrome or Chromium, and GeckoDriver for Firefox. The language binding, browser, and driver all need to work together. A driver executable may be found through PATH, downloaded and managed by Selenium Manager, or specified through the binding’s Service object.
Check what the failing process can see
Run the version command for the driver under the same user and environment as the failing test. For example:
chromedriver --version
geckodriver --version
If a command is not found in that environment, the driver is not available there through PATH. A driver visible in your login shell may be absent from a service, IDE, CI runner, container, or snap-confined process. Print PATH from the test process and compare it with the shell where the command succeeds.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #2
- 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
Choose a driver-location method
- Use Selenium Manager: upgrade the language binding to Selenium 4.6 or later and allow Selenium Manager to discover and obtain a driver, when the machine’s network, architecture, and browser setup support it.
- Put a manually obtained driver on PATH: use a driver compatible with the browser version, then verify its version from the test’s runtime environment.
- Set an explicit Service path: point the binding at the driver executable when PATH lookup or automatic management is unsuitable. This is especially useful when the runner uses a different PATH or the machine needs a specific driver binary.
A message that the driver supports a different browser version is a compatibility problem, not a synchronization problem. Check both reported versions and replace or manage the incompatible component rather than adding waits.
Use Selenium Manager with the right expectations
Selenium Manager is the official manager shipped with Selenium releases from version 4.6 onward. It can discover, download, and cache drivers; newer functionality can also manage browser binaries. When it works, the binding can start a session without you manually wiring in a driver path.
Automatic management still depends on the environment. A proxy or firewall can prevent downloads, and architecture limitations can make the bundled manager binary unsuitable. Package-manager and browser-installation differences can also affect discovery. Enable Selenium Manager’s debug logging when diagnosing what it detected and attempted. If the manager cannot work on the runner, use an explicit compatible driver and configure it with a Service object.
Minimal Python launch and explicit-path alternative
For Selenium 4.6 or later, a basic Chrome session can let Selenium Manager locate the driver:
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
- 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.
from selenium import webdriver
# Selenium Manager handles driver discovery when supported by the environment.
driver = webdriver.Chrome()
try:
driver.get("https://example.com")
print(driver.title)
finally:
driver.quit()
If you have installed a compatible driver at a known location, configure the Service explicitly instead:
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
service = Service(executable_path="/usr/local/bin/chromedriver")
driver = webdriver.Chrome(service=service)
try:
driver.get("https://example.com")
print(driver.title)
finally:
driver.quit()
Change the example path to the actual executable on the Ubuntu host. These examples illustrate session creation; your browser choice, installed versions, and runtime constraints determine which route is appropriate.
Read Ubuntu browser startup errors literally
If the driver starts but the browser immediately exits, inspect the reported shared-library error. Selenium’s Linux troubleshooting examples identify two specific cases:
- A Firefox error naming
libdbus-glib-1.so.2points to thelibdbus-glib-1-2package. - A Chrome for Testing error naming
libatk-1.0.so.0points to thelibatk-bridge2.0-0package.
Install the package appropriate to the error using the package manager available for your Ubuntu release, then retry the browser startup. Do not assume these are the only possible missing libraries. A different missing-library name needs its own diagnosis, and package names or availability can vary with the Ubuntu release and the way the browser was installed.
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 reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchRank #4
- 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
Headless runs and Linux images
A server image may have no display and may omit libraries expected by a browser package. Headless mode addresses the display requirement, but it does not supply missing shared libraries, correct a mismatched driver, or make an unsupported architecture work. When a headless run fails during startup, compare it with the exact browser and driver versions and inspect the first browser or library error rather than repeatedly changing test waits.
Account for PATH, snap, CI, and containers
Driver discovery can differ between an interactive session and the process that runs a test. A service may have a smaller PATH; a CI runner or container may use another filesystem; snap confinement may limit what the process can access. Diagnose from inside the failing process:
- Print its
PATHand run the driver’s version command as the same user. - Confirm that the browser executable is available in that environment.
- Check whether Selenium Manager can access the network through the configured proxy.
- If automatic discovery selects the wrong binary or cannot access it, provide a known compatible driver through the binding’s Service object.
- On a container or CI image, check the image’s architecture and installed shared libraries as well as the host’s.
Selenium documents PATH, explicit Service paths, environment-variable driver paths, and limitations around custom managers. An explicit path is often the clearest choice when the process environment is controlled by a runner rather than your shell.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Diagnose PhantomJS only to maintain legacy code
PhantomJS troubleshooting can still matter if an existing application depends on it, but it should be treated as legacy maintenance. Selenium’s JavaScript change log says native support was removed because PhantomJS’s WebDriver implementation is no longer under active development.
Best Value
- 【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.
Check the old installation and page failure
Start with the executable that is actually selected:
phantomjs --version
which phantomjs
If the version is unexpected, check for duplicate installations and correct the selected executable before debugging the page. If PhantomJS starts but an HTTPS page fails, check network access and the SSL/OpenSSL libraries. For proxy-related behavior, inspect the proxy configuration and determine whether it should be corrected or disabled for that run. If the browser process runs but the page itself fails, add PhantomJS page error callbacks and use its remote debugger to distinguish browser startup from page loading.
These checks can help contain a failure; they do not change PhantomJS’s maintenance status or make it a durable choice for new Selenium work.
Move PhantomJS tests to a maintained browser
For ongoing automation, port the test to a maintained Chrome/Chromium or Firefox target and validate it on the Ubuntu image used in production. Do not assume that changing the browser name is sufficient: review the test’s capabilities and synchronization, then exercise the behaviors that tend to depend on the runtime.
- Confirm browser and WebDriver compatibility and decide whether Selenium Manager, PATH, or an explicit Service path fits deployment.
- Validate headless startup and the Linux libraries available in the production image.
- Test downloads, certificates, proxy behavior, and screenshots on the actual runner.
- Check CPU architecture and network access before relying on automatic driver or browser downloads.
Those checks align the migration with the factors that make browser automation reliable on Ubuntu: compatible components, a predictable driver path, workable Linux dependencies, and a maintainable browser implementation.
Or skip the browser setup
If the task is to capture a website rather than run interactive WebDriver assertions, ScreenshotNeo can return a screenshot or PDF from one GET request. It is not a replacement for Selenium tests that need to inspect application state, but it avoids installing and maintaining a browser-driver stack for screenshot capture. 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
ScreenshotNeo accepts cookie/consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before the capture; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and each response identifies its page verdict and billing status in headers. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month with no card.
Keep the repair focused
Use the error stage to choose the next check: wait conditions for timing failures, driver and browser compatibility for session failures, shared-library messages for Linux startup failures, and network or architecture checks for manager failures. For PhantomJS, limit troubleshooting to necessary legacy support and plan migration rather than treating a workaround as a long-term repair.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →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.

