{"record":{"id":"2bea0e7405f29d75","repo":"kovidgoyal/kitty","slug":"failed-to-read-from-public-s-with-error-darwi","errorCode":null,"errorMessage":"Failed to read from %{public}s with error: %{darwin.errno}d","messagePattern":"Failed to read from %(.+?)s with error: %(.+?)d","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kitty/launcher/cmdline.c","lineNumber":73,"sourceCode":"    memcpy(a->buf + a->pos, arg, sz);\n    a->argv[a->count++] = a->buf + a->pos;\n    a->argv[a->count] = 0;\n    a->pos += sz;\n    a->buf[a->pos++] = 0;\n    return true;\n}\n\nbool\nget_argv_from(const char *filename, const char *argv0, argv_array *final_ans) {\n    (void)get_config_dir;\n    if (!filename || !filename[0]) return true;\n    size_t src_sz;\n    char *src = read_full_file(filename, &src_sz);\n    if (!src) {\n        if (errno == ENOENT || errno == ENOTDIR) return true;\n#ifdef __APPLE__\n        int saved = errno;\n        os_log_error(OS_LOG_DEFAULT, \"Failed to read from %{public}s with error: %{darwin.errno}d\", filename, errno);\n        errno = saved;\n#endif\n        fprintf(stderr, \"Failed to read from %s \", filename);\n        perror(\"with error\");\n        return true;\n    }\n    ShlexState s = {0};\n    argv_array ans = {0};\n    bool ok = false;\n    ans.buf = malloc(src_sz + strlen(argv0) + 64);\n    if (!ans.buf) goto oom;\n    ans.needs_free = true;\n    if (!add_to_argv(&ans, argv0, strlen(argv0))) goto oom;\n    if (!alloc_shlex_state(&s, src, src_sz, false)) goto oom;\n    bool keep_going = true;\n    while (keep_going) {\n        ssize_t q = next_word(&s);\n        switch (q) {","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/launcher/cmdline.c#L55-L91","documentation":"The macOS launcher failed to read a file (read_full_file returned NULL) with errno other than ENOENT/ENOTDIR; the error is logged via os_log_error and stderr. The launcher continues (returns true), so this is informational.","triggerScenarios":"The kitty launcher reading a config/argv file that exists but read() fails on - EACCES, EIO, EMFILE, etc.","commonSituations":"File permission problems, disk/filesystem errors, or macOS sandboxing (missing Full Disk Access) blocking the launcher's files.","solutions":["Check permissions on the file named in the message","Read the perror text after the message for the errno reason","Grant kitty the needed macOS disk/file access permissions","Reinstall kitty if its launcher files are damaged"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"[ -r /path/to/file ] && echo readable","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check file permissions of launcher config files","Grant kitty Full Disk Access on macOS if sandboxed"],"tags":["kitty","macos","launcher","file-read"],"backgroundTag":"file-read-failed","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}