{"record":{"id":"95ba7c3ad068a30f","repo":"kovidgoyal/kitty","slug":"unknown-protocol-in-listen-on-value-spec","errorCode":null,"errorMessage":"Unknown protocol in listen-on value: {spec}","messagePattern":"Unknown protocol in listen-on value: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"kitty/utils.py","lineNumber":413,"sourceCode":"        family = socket.AF_UNIX\n        address = rest\n        if address.startswith('@') and len(address) > 1:\n            address = '\\0' + address[1:]\n        else:\n            socket_path = address\n    elif protocol in ('tcp', 'tcp6'):\n        family = socket.AF_INET if protocol == 'tcp' else socket.AF_INET6\n        if rest.startswith('['):  # ]\n            host = rest[1:]\n            host, sep, leftover = host.rpartition(']')\n            _, port = leftover.rsplit(':', 1)\n            if ':' in host and protocol == 'tcp':\n                family = socket.AF_INET6\n        else:\n            host, port = rest.rsplit(':', 1)\n        address = host, int(port)\n    else:\n        raise ValueError(f'Unknown protocol in listen-on value: {spec}')\n    return family, address, socket_path\n\n\ndef parse_os_window_state(state: str) -> int:\n    match state:\n        case 'normal':\n            return WINDOW_NORMAL\n        case 'maximized':\n            return WINDOW_MAXIMIZED\n        case 'minimized':\n            return WINDOW_MINIMIZED\n        case 'fullscreen' | 'fullscreened':\n            return WINDOW_FULLSCREEN\n        case 'hidden':\n            return WINDOW_HIDDEN\n        case _:\n            return WINDOW_NORMAL\n","sourceCodeStart":395,"sourceCodeEnd":431,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/utils.py#L395-L431","documentation":"parse_address_spec() recognized a 'protocol:...' split but the protocol is neither 'unix' nor 'tcp'. The else-branch of the protocol check raises ValueError listing the offending spec. Only unix and tcp sockets are supported for remote control.","triggerScenarios":"--listen-on=fd:3, --listen-on=udp:host:port, or any prefix other than unix/tcp.","commonSituations":"Assuming other socket types (udp, fd inheritance, tls) are supported; typo like 'UNIX:' (case matters); copying a listen string from another program's config.","solutions":["Change the protocol to unix: or tcp:","For a file-descriptor-based socket, obtain it another way — kitty only supports unix/tcp here","Check the exact spelling/case of the protocol prefix"],"exampleFix":"# before\n--listen-on=udp:localhost:9901\n# after\n--listen-on=tcp:localhost:9901","handlingStrategy":"validation","validationCode":"def valid_protocol(spec: str) -> bool:\n    return spec.split(':', 1)[0] in ('unix', 'tcp')","typeGuard":null,"tryCatchPattern":"try:\n    fam, addr, path = parse_address_spec(spec)\nexcept ValueError as e:\n    if 'Unknown protocol' in str(e):\n        spec = 'tcp' + spec[spec.index(':'):]\n        fam, addr, path = parse_address_spec(spec)\n    else:\n        raise","preventionTips":["Restrict generated listen strings to unix:/tcp: prefixes","Document the supported protocol set anywhere users edit listen_on"],"tags":["configuration","listen-on","unsupported-protocol"],"backgroundTag":"unsupported-protocol","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}