Hi Railway/Nixpacks team! Need help getting SeleniumBase(uc=True) working in a Nixpacks deployment.
Goal: Headless Chromium logs into Google, gets cookies.
Problem: Driver(uc=True, headless=True) fails during init in Railway deployment. Base FastAPI app works fine.
Environment: Railway, Nixpacks (Python), python:3.9-slim base, seleniumbase, fastapi, uvicorn, supabase.
nixpacks.toml:
[phases.setup]
nixPkgs = ["chromium", "nss"]
(Dockerfile apt-get install chrome is commented out).
Status & What Fails:
- SSH confirms Nix-installed
chromiumruns, network/permissions seem OK. - Error shifted after adding
nss: Previouslyuc_driverexited (Status 127 - likely missing libs, friend sawlibnss3.soerror). Nowuc_driverfile isn't found/saved inseleniumbase/drivers/at all. - Crucially: Adding a larger list of potential libs (e.g.,
gtk+3,libX11) tonixPkgscaused the Nixpacks build itself to fail.
Questions:
- What's the correct way to include all required shared libraries for
chromium&uc_drivervianixPkgs? - Why might adding many common libs break the Nixpacks build? (Known conflicts/issues?)
- How best to debug the
uc_driverstartup failure within the Nixpacks runtime?
Using seleniumbase.Driver(uc=True, headless=True) in Python. Any pointers on the Nixpacks config for headless browsers would be great! Thanks!