kovidgoyal/kitty · error
terminal asked for drag data from URI list but no list prese
Error message
terminal asked for drag data from URI list but no list present
What it means
The terminal asked for remote drag data from the text/uri-list drag source, but no drag source with a non-empty uri_list exists. The kitten finishes the drag with EINVAL and returns this error.
Source
Thrown at kittens/dnd/drag.go:488
}
} else {
if x.file, err = os.Open(x.path); err != nil {
dnd.finish_drag("EIO")
return err
}
dnd.drag_status.current_remote_file = x
if err = dnd.send_next_file_chunk(); err != nil {
return err
}
}
return
}
func (dnd *dnd) on_drag_remote_data_request(idx int) (err error) {
ds := dnd.drag_sources["text/uri-list"]
if ds == nil || len(ds.uri_list) < 1 {
dnd.finish_drag("EINVAL")
return fmt.Errorf("terminal asked for drag data from URI list but no list present")
}
if idx < 0 || idx >= len(ds.uri_list) {
dnd.finish_drag("EINVAL")
return fmt.Errorf("terminal asked for drag data from URI list with out of bounds index: %d", idx)
}
ds.uri_list[idx].was_sent = true
dnd.drag_status.remote_data_requests = append(dnd.drag_status.remote_data_requests, idx)
if len(dnd.drag_status.remote_data_requests) == 1 {
err = dnd.send_next_remote_data_request()
}
return
}
func (dnd *dnd) send_next_remote_data_request() (err error) {
if len(dnd.drag_status.remote_data_requests) == 0 {
return nil
}
i := dnd.drag_status.remote_data_requests[0]View on GitHub (pinned to 6d5d0c4406)
Solutions
- Pass at least one valid file/directory path when using the kitten as a drag source
- Update kitty to eliminate protocol mismatch where the terminal wrongly requests uri-list data
- Report upstream if it happens with valid drag sources configured
Defensive patterns
Strategy: validation
Validate before calling
// Validate before enabling remote drag: require at least one URI
if len(uriList) == 0 { return errors.New("pass at least one file to drag") } Prevention
- Always pass file arguments when dragging as a uri-list source
- Check drag_sources["text/uri-list"] is populated before advertising remote capability
When it happens
Trigger: on_drag_remote_data_request is called when drag_sources["text/uri-list"] is nil or its uri_list is empty — i.e. the drag was started without any file/URI arguments but the terminal still requested remote data.
Common situations: Running the dnd kitten in drag-source mode with no file paths, or a terminal that incorrectly requests uri-list data from a text-only drag.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- This kitten should be run as: kitten quick-access-terminal
- terminal responded with drag source error: %s
- terminal asked for drag data from MIME list with out of boun
- terminal sent a duplicate drag data request
- terminal asked for drag data from URI list with out of bound
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/f424974a16f67570.
Report an issue: GitHub.