ChromeDriver unexpectedly exiting with Status Code 1 in Railway deployment despite successful package installation
areebkhan02
FREEOP

2 years ago

Issue

I'm trying to run a Python web scraper using Selenium and ChromeDriver in my Railway deployment. The packages install correctly, but ChromeDriver exits with Status Code 1 when initialized.

Error Message

Error initializing scraper: Message: Service /usr/bin/chromedriver unexpectedly exited. Status code was: 1

Environment Setup

  • Railway deployment with nixpacks.toml configuration
  • Confirmed packages are being installed correctly during build:

"setup │ python3, ffmpeg-headless, gcc, chromium-browser, chromium-driver, libgconf-2-4, libnss3, libgbm1, libxss1, libasound2, libatk1.0-0, libatk-bridge2.0-0, libcups2, libdrm2, libxkbcommon0, libxcomposite1, libxdamage1, libxfixes3, libxrandr2, libpango-1.0-0"

  • Current nixpacks.toml providers = ["..."] [phases.setup] aptPkgs = [ "...", "chromium-browser", "chromium-driver", "libgconf-2-4", "libnss3", "libgbm1", "libxss1", "libasound2", "libatk1.0-0", "libatk-bridge2.0-0", "libcups2", "libdrm2", "libxkbcommon0", "libxcomposite1", "libxdamage1", "libxfixes3", "libxrandr2", "libpango-1.0-0" ] paths = ["/usr/bin"] [start] cmd = "uvicorn whatsapp_server:app --host 0.0.0.0 --port $PORT"
  • Solutions Already Tried
    • Modified nixpacks.toml to include all necessary dependencies
    • Added extensive Chrome options to disable sandboxing features
    • Tried multiple ChromeDriver initialization approaches (with/without Service object)
    • Tried explicit paths to both Chrome and ChromeDriver binaries
    • Added debugging code to verify binary locations and permissions
  • Questions
    • Is there a known issue with running ChromeDriver in Railway deployments?
    • Are there specific sandbox/container restrictions in Railway that prevent ChromeDriver from working?
    • Are there additional configuration options or environment variables I should set? Any guidance would be greatly appreciated!
Solved

1 Replies

chandrika
EMPLOYEE

2 years ago

Apologies but this looks like an application level question — due to volume, we can only answer platform level issues here. The thread is public so the community might be able to help


Status changed to Awaiting User Response Railway • over 1 year ago


Railway
BOT

a year ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway • about 1 year ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...