{"id":"887f2283a64576f4","repo":"docker/cli","slug":"unable-to-setup-input-stream-s","errorCode":null,"errorMessage":"unable to setup input stream: %s","messagePattern":"unable to setup input stream: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/container/hijack.go","lineNumber":64,"sourceCode":"\tstreams      command.Streams\n\tinputStream  io.ReadCloser\n\toutputStream io.Writer\n\terrorStream  io.Writer\n\n\tresp client.HijackedResponse\n\n\ttty        bool\n\tdetachKeys string\n}\n\n// stream handles setting up the IO and then begins streaming stdin/stdout\n// to/from the hijacked connection, blocking until it is either done reading\n// output, the user inputs the detach key sequence when in TTY mode, or when\n// the given context is cancelled.\nfunc (h *hijackedIOStreamer) stream(ctx context.Context) error {\n\trestoreInput, err := h.setupInput()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to setup input stream: %s\", err)\n\t}\n\n\tdefer restoreInput()\n\n\toutputDone := h.beginOutputStream(restoreInput)\n\tinputDone, detached := h.beginInputStream(restoreInput)\n\n\tselect {\n\tcase err := <-outputDone:\n\t\treturn err\n\tcase <-inputDone:\n\t\t// Input stream has closed.\n\t\tif h.outputStream != nil || h.errorStream != nil {\n\t\t\t// Wait for output to complete streaming.\n\t\t\tselect {\n\t\t\tcase err := <-outputDone:\n\t\t\t\treturn err\n\t\t\tcase <-ctx.Done():","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/container/hijack.go#L46-L82","documentation":"Error \"unable to setup input stream: %s\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/command/container/hijack.go:64 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}