{"record":{"id":"bc0c097dd843bf82","repo":"SeleniumHQ/selenium","slug":"unsupported-platform-platform-os","errorCode":null,"errorMessage":"unsupported platform: #{Platform.os}","messagePattern":"unsupported platform: #(.+?)","errorType":"exception","errorClass":"Error::WebDriverError","httpStatus":null,"severity":"critical","filePath":"rb/lib/selenium/webdriver/common/selenium_manager.rb","lineNumber":86,"sourceCode":"          validate_command_result(command, status, result, stderr)\n\n          result\n        end\n\n        def platform_location\n          directory = File.expand_path(bin_path, __FILE__)\n          if Platform.windows?\n            \"#{directory}/windows/selenium-manager.exe\"\n          elsif Platform.mac?\n            \"#{directory}/macos/selenium-manager\"\n          elsif Platform.linux?\n            \"#{directory}/linux/selenium-manager\"\n          elsif Platform.unix?\n            WebDriver.logger.warn('Selenium Manager binary may not be compatible with Unix',\n                                  id: %i[selenium_manager unix_binary])\n            \"#{directory}/linux/selenium-manager\"\n          else\n            raise Error::WebDriverError, \"unsupported platform: #{Platform.os}\"\n          end\n        end\n\n        def execute_command(*command)\n          WebDriver.logger.debug(\"Executing Process #{command}\", id: :selenium_manager)\n\n          Open3.capture3(*command)\n        rescue StandardError => e\n          raise Error::WebDriverError, \"Unsuccessful command executed: #{command}; #{e.message}\"\n        end\n\n        def parse_result_and_log(stdout)\n          json_output = stdout.empty? ? {'logs' => [], 'result' => {}} : JSON.parse(stdout)\n\n          json_output['logs'].each do |log|\n            level = log['level'].casecmp('info').zero? ? 'debug' : log['level'].downcase\n            WebDriver.logger.send(level, log['message'], id: :selenium_manager)\n          end","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/SeleniumHQ/selenium/blob/aa36b38e696a0909e973bdf5e2f9031ffe842c4b/rb/lib/selenium/webdriver/common/selenium_manager.rb#L68-L104","documentation":"Raised by SeleniumManager.platform_location when the runtime OS cannot be classified as Windows, Mac, Linux, or generic Unix. The Selenium Manager binary is only bundled for those platforms; if Platform.os returns something unrecognized (e.g., a niche or embedded OS), the driver-path resolution fails at startup with WebDriverError.","triggerScenarios":"Running on an exotic or embedded platform (e.g., AIX, Solaris with a host triplet not matching linux/unix/mac/windows). Running on a minimal container where Platform.os misidentifies the OS. Running on a new architecture where Platform heuristics fail.","commonSituations":"CI on unusual Docker base images. Cross-compilation or emulated environments. Running on BSD variants where Platform.unix? might not return true.","solutions":["Set the SE_MANAGER_PATH environment variable to point to a compatible selenium-manager binary for your platform.","Specify the driver path explicitly via Service.driver_path= or options to bypass Selenium Manager entirely.","Verify Platform.os output in your environment (e.g., in IRB: require 'selenium-webdriver'; Selenium::WebDriver::Platform.os) and report if it should be classified as unix/linux."],"exampleFix":"// before\n# Selenium Manager auto-detection fails on unsupported OS\noptions = Selenium::WebDriver::Options.chrome\n\n// after (set SE_MANAGER_PATH)\nENV['SE_MANAGER_PATH'] = '/usr/local/bin/selenium-manager'\noptions = Selenium::WebDriver::Options.chrome\n\n// after (bypass Selenium Manager with explicit driver path)\nSelenium::WebDriver::Service.chrome(driver_path: '/path/to/chromedriver')","handlingStrategy":"validation","validationCode":"# Pre-flight check: ensure platform is supported or SE_MANAGER_PATH is set\nunless %w[linux macos windows].any? { |p| Selenium::WebDriver::Platform.os.to_s.include?(p) } ||\n       Selenium::WebDriver::Platform.unix? || Selenium::WebDriver::Platform.windows? ||\n       ENV.key?('SE_MANAGER_PATH')\n  raise 'Unsupported platform for Selenium Manager. Set SE_MANAGER_PATH or specify driver_path manually.'\nend","typeGuard":null,"tryCatchPattern":"begin\n  driver = Selenium::WebDriver.for :chrome\nrescue Selenium::WebDriver::Error::WebDriverError => e\n  raise unless e.message.include?('unsupported platform')\n  # fall back to explicit driver path\n  service = Selenium::WebDriver::Service.chrome(driver_path: ENV.fetch('CHROMEDRIVER_PATH'))\n  driver = Selenium::WebDriver.for(:chrome, service: service)\nend","preventionTips":["On non-standard platforms, always set SE_MANAGER_PATH or specify driver_path explicitly.","Document the target platform in your deployment/Docker setup and pre-install drivers.","Test driver initialization in the target environment during CI setup, not just locally."],"tags":["selenium-manager","platform","environment","ruby"],"backgroundTag":null,"analyzedSha":"aa36b38e696a0909e973bdf5e2f9031ffe842c4b","analyzedAt":"2026-08-14T02:32:32.244Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}