getgrav/grav · error · RuntimeException

Cannot retrieve stream as the file is missing

Error message

Cannot retrieve stream as the file is missing

What it means

Error "Cannot retrieve stream as the file is missing" thrown in getgrav/grav.

Source

Thrown at system/src/Grav/Framework/Form/FormFlashFile.php:248

        ];
    }

    /**
     * @return void
     * @throws RuntimeException if is moved or not ok
     */
    private function validateActive(): void
    {
        if (!$this->isOk()) {
            throw new RuntimeException('Cannot retrieve stream due to upload error');
        }

        if ($this->moved) {
            throw new RuntimeException('Cannot retrieve stream after it has already been moved');
        }

        if (!$this->getTmpFile()) {
            throw new RuntimeException('Cannot retrieve stream as the file is missing');
        }
    }

    /**
     * @return bool return true if there is no upload error
     */
    private function isOk(): bool
    {
        return \UPLOAD_ERR_OK === $this->getError();
    }
}

View on GitHub (pinned to 6040efed04)

When it happens

Trigger: Thrown at system/src/Grav/Framework/Form/FormFlashFile.php:248 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of getgrav/grav@6040efed04 (2026-08-17). Data as JSON: /api/errors/1dea80c885186ddf. Report an issue: GitHub.