{"record":{"id":"821c38e66131f22b","repo":"Seldaek/monolog","slug":"something-went-wrong-while-selecting-a-stream","errorCode":null,"errorMessage":"Something went wrong while selecting a stream.","messagePattern":"Something went wrong while selecting a stream\\.","errorType":"exception","errorClass":"UnexpectedValueException","httpStatus":null,"severity":"error","filePath":"src/Monolog/Handler/ProcessHandler.php","lineNumber":131,"sourceCode":"    private function startProcess(): void\n    {\n        $this->process = proc_open($this->command, static::DESCRIPTOR_SPEC, $this->pipes, $this->cwd);\n\n        foreach ($this->pipes as $pipe) {\n            stream_set_blocking($pipe, false);\n        }\n    }\n\n    /**\n     * Selects the STDERR stream, handles upcoming startup errors, and throws an exception, if any.\n     *\n     * @throws \\UnexpectedValueException\n     */\n    private function handleStartupErrors(): void\n    {\n        $selected = $this->selectErrorStream();\n        if (false === $selected) {\n            throw new \\UnexpectedValueException('Something went wrong while selecting a stream.');\n        }\n\n        $errors = $this->readProcessErrors();\n\n        if (\\is_resource($this->process) === false || $errors !== '') {\n            throw new \\UnexpectedValueException(\n                sprintf('The process \"%s\" could not be opened: ' . $errors, $this->command)\n            );\n        }\n    }\n\n    /**\n     * Selects the STDERR stream.\n     *\n     * @return int|bool\n     */\n    protected function selectErrorStream()\n    {","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/Seldaek/monolog/blob/57eb1028342134e701e77c617565d51b6e5a2a53/src/Monolog/Handler/ProcessHandler.php#L113-L149","documentation":"Error \"Something went wrong while selecting a stream.\" thrown in Seldaek/monolog.","triggerScenarios":"Thrown at src/Monolog/Handler/ProcessHandler.php:131 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"57eb1028342134e701e77c617565d51b6e5a2a53","analyzedAt":"2026-08-17T02:36:30.259Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}