{"record":{"id":"ef8b6220dd0853f3","repo":"SeleniumHQ/selenium","slug":"unsupported-proxy-type-proxy-type","errorCode":null,"errorMessage":"unsupported proxy type #{proxy.type}","messagePattern":"unsupported proxy type #(.+?)","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"rb/lib/selenium/webdriver/firefox/profile.rb","lineNumber":155,"sourceCode":"        def proxy=(proxy)\n          raise TypeError, \"expected #{Proxy.name}, got #{proxy.inspect}:#{proxy.class}\" unless proxy.is_a? Proxy\n\n          case proxy.type\n          when :manual\n            self['network.proxy.type'] = 1\n\n            set_manual_proxy_preference 'http', proxy.http\n            set_manual_proxy_preference 'ssl', proxy.ssl\n            set_manual_proxy_preference 'socks', proxy.socks\n\n            self['network.proxy.no_proxies_on'] = proxy.no_proxy || ''\n          when :pac\n            self['network.proxy.type'] = 2\n            self['network.proxy.autoconfig_url'] = proxy.pac\n          when :auto_detect\n            self['network.proxy.type'] = 4\n          else\n            raise ArgumentError, \"unsupported proxy type #{proxy.type}\"\n          end\n        end\n\n        alias as_json encoded\n\n        private\n\n        def set_manual_proxy_preference(key, value)\n          return unless value\n\n          host, port = value.to_s.split(':', 2)\n\n          self[\"network.proxy.#{key}\"] = host\n          self[\"network.proxy.#{key}_port\"] = Integer(port) if port\n        end\n\n        def install_extensions(directory)\n          destination = File.join(directory, 'extensions')","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/SeleniumHQ/selenium/blob/aa36b38e696a0909e973bdf5e2f9031ffe842c4b/rb/lib/selenium/webdriver/firefox/profile.rb#L137-L173","documentation":"Raised by Firefox::Profile#proxy= (ArgumentError) when proxy.type is anything other than :manual, :pac, or :auto_detect. The Firefox profile proxy setter only maps these three Selenium proxy types to network.proxy.* preferences; types like :system, :direct, or nil fall into the else branch.","triggerScenarios":"Assigning a Proxy whose type is :system, :direct, or unset/nil to profile.proxy=.","commonSituations":"Using a Proxy intended for Chrome/Edge (which support :system) on a Firefox profile; reading proxy type from environment/config that yields :system or :direct.","solutions":["Use one of the supported types (:manual, :pac, :auto_detect) for the Firefox profile.","For system/direct proxy behavior, configure it differently (e.g. omit the profile proxy and rely on Firefox defaults, or set network.proxy.type manually via profile[]=).","Prefer setting proxy on Capabilities/options where broader type support may apply."],"exampleFix":"// before\nprofile.proxy = Selenium::WebDriver::Proxy.new(type: :system)\n\n// after\nprofile.proxy = Selenium::WebDriver::Proxy.new(type: :auto_detect)\n# or set network.proxy.type directly for 'system' behavior\nprofile['network.proxy.type'] = 5","handlingStrategy":"validation","validationCode":"SUPPORTED = %i[manual pac auto_detect]\nunless SUPPORTED.include?(proxy.type)\n  raise \"Firefox profile proxy supports #{SUPPORTED}, got #{proxy.type}\"\nend\nprofile.proxy = proxy","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use only :manual, :pac, or :auto_detect for Firefox profile proxy.","For :system/:direct behavior, set network.proxy.type via profile[]= directly.","Set proxy on Options/Capabilities for broader type support."],"tags":["firefox","profile","proxy","argument-error"],"backgroundTag":null,"analyzedSha":"aa36b38e696a0909e973bdf5e2f9031ffe842c4b","analyzedAt":"2026-08-14T02:32:32.244Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}