Home | RU | EN

Selenoid and Configuration Access

WARNING! I couldn't get Selenoid running on Windows 10 with Docker Desktop (Docker Engine 26.1.4; after upgrading to 28.1.5 it worked) and on MacBook with M1 chip (Apple Silicon), although there's a workaround for Mac (link), but it only works for Chrome version 91. I managed to run it only on Linux (Ubuntu; it will probably work on other Linux distributions too), on Windows 11, and on newer MacBooks.

Common Selenoid Setup and Autotest Launch Errors

  1. Browser images specified in browsers.json are not downloaded.
    • Selenoid does not download them automatically, and tests don't start due to missing images. Download the required images manually.
  2. Syntax errors in browsers.json.
    • For "chrome" and "opera" the path key in browsers.json must be "/", not "/wd/hub". For "firefox" keep "/wd/hub". Be careful, otherwise the browser will not start.
    • Typos in image name/version tag (often confusion in the placement of underscores or colons when specifying image version, ChatGPT is guilty of this). For example, instead of selenoid/vnc_chrome:128.0 it's written selenoid/vnc_chrome_128.0.
  3. Path errors in docker-compose.yml (volumes).
    • Due to incorrect paths, Selenoid can't see browsers.json, UI doesn't connect to Selenoid, and videos aren't written. Check directory mounting (paths specified in volumes) - this is a common error.
  4. Video recording is configured incorrectly.
    • Essentially, in docker-compose.yml you just need to add an environment variable with an absolute path to the video folder:
      environment:
        OVERRIDE_VIDEO_OUTPUT_DIR: /root/selenoid_with_video/video
      Here you can't use ${PWD} or ./video - an absolute path is required! You can read more about this in the official documentation: aerokube.com/selenoid … video_recording.
    • Often people forget to pre-download the recorder image: docker pull selenoid/video-recorder:latest-release. You do not need to add this image to docker-compose.yml; it will start automatically, the main thing is to download it once.
    • People forget that you can't use headless mode:
      Configuration.headless = true;
    • It should be removed completely, or replaced with
      Configuration.headless = false;
      If there's no screen, there's nothing to record.
  5. Problems on Windows 10 (Docker Engine 26.1.4; after upgrading to 28.1.5 it worked) and Mac with M1 chip.
    • Containers start, but the browser starts and immediately crashes. If you use Windows, update Docker; after upgrading to 28.1.5 it worked. For Mac, there are workaround options only for Chrome version 91 ( link). Recommendation: use a Linux host or VM/VPS (e.g., Ubuntu Server 22.04, ≥10 GB disk, ≥2 GB RAM), a newer MacBook, or Windows 11.
  6. Incorrect IP address of the tested application in tests.
    • In a container, you can't use localhost to access an application running outside the container - specify the real host IP address.
      Correct example:
      Configuration.baseUrl = "http://192.168.0.127:3000";
      Incorrect example:
      Configuration.baseUrl = "http://localhost:3000";
      Here you must use an IP address, not localhost, because this URL is substituted into the browser address bar opened in the Docker container, and if you specify localhost, the container will think that the application is also running inside the same container, but it is not running in it.
  7. Manual browser check in UI.
    • In general, after installing Selenoid, Selenoid UI and downloading browser images, you need to make sure that browsers can open at least manually, so that later, if something doesn't work, you understand whether it's a problem with tests or Selenoid configuration. For this, after starting Selenoid (docker-compose up -d), go to its ip_address:8080, at the top right there should be 2 CONNECTED labels, then go to the CAPABILITIES tab, select a browser from the dropdown list (if there's no list, then there's a problem with browsers.json or the path to it) and launch it manually. A browser window should appear. If it appears, congratulations - Selenoid is configured, now the main thing is to correctly write everything in the tests themselves.