kovidgoyal/kitty · warning
Failed to read from %{public}s with error: %{darwin.errno}d
Error message
Failed to read from %{public}s with error: %{darwin.errno}d What it means
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.
Source
Thrown at kitty/launcher/cmdline.c:73
memcpy(a->buf + a->pos, arg, sz);
a->argv[a->count++] = a->buf + a->pos;
a->argv[a->count] = 0;
a->pos += sz;
a->buf[a->pos++] = 0;
return true;
}
bool
get_argv_from(const char *filename, const char *argv0, argv_array *final_ans) {
(void)get_config_dir;
if (!filename || !filename[0]) return true;
size_t src_sz;
char *src = read_full_file(filename, &src_sz);
if (!src) {
if (errno == ENOENT || errno == ENOTDIR) return true;
#ifdef __APPLE__
int saved = errno;
os_log_error(OS_LOG_DEFAULT, "Failed to read from %{public}s with error: %{darwin.errno}d", filename, errno);
errno = saved;
#endif
fprintf(stderr, "Failed to read from %s ", filename);
perror("with error");
return true;
}
ShlexState s = {0};
argv_array ans = {0};
bool ok = false;
ans.buf = malloc(src_sz + strlen(argv0) + 64);
if (!ans.buf) goto oom;
ans.needs_free = true;
if (!add_to_argv(&ans, argv0, strlen(argv0))) goto oom;
if (!alloc_shlex_state(&s, src, src_sz, false)) goto oom;
bool keep_going = true;
while (keep_going) {
ssize_t q = next_word(&s);
switch (q) {View on GitHub (pinned to 6d5d0c4406)
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
Defensive patterns
Strategy: validation
Validate before calling
[ -r /path/to/file ] && echo readable
Prevention
- Check file permissions of launcher config files
- Grant kitty Full Disk Access on macOS if sandboxed
When it happens
Trigger: The kitty launcher reading a config/argv file that exists but read() fails on - EACCES, EIO, EMFILE, etc.
Common situations: File permission problems, disk/filesystem errors, or macOS sandboxing (missing Full Disk Access) blocking the launcher's files.
Related errors
- with error
- This must be run as kitten desktop-ui
- Must be run as kitten diff
- This should be run as kitten dnd
- Should be run as kitten hints
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/2bea0e7405f29d75.
Report an issue: GitHub.