BookStackApp/BookStack · error · ZipExportException
errors.import_zip_cant_read
Error message
errors.import_zip_cant_read
What it means
ZipExportException raised in ZipExportReader::open when the ZIP import file does not exist or is not readable at zipPath. Input at fault: the uploaded/stored import ZIP path that is absent from disk or lacks read permission.
Source
Thrown at app/Exports/ZipExports/ZipExportReader.php:34
public function __construct(
protected string $zipPath,
) {
$this->zip = new ZipArchive();
}
/**
* @throws ZipExportException
*/
protected function open(): void
{
if ($this->open) {
return;
}
// Validate file exists
if (!file_exists($this->zipPath) || !is_readable($this->zipPath)) {
throw new ZipExportException(trans('errors.import_zip_cant_read'));
}
// Validate file is valid zip
$opened = $this->zip->open($this->zipPath, ZipArchive::RDONLY);
if ($opened !== true) {
throw new ZipExportException(trans('errors.import_zip_cant_read'));
}
$this->open = true;
}
public function close(): void
{
if ($this->open) {
$this->zip->close();
$this->open = false;
}
}View on GitHub (pinned to 18f8469a1c)
Solutions
- Re-upload the import ZIP file
- Check the storage path for imports is intact and readable by PHP
- Verify file permissions on the ZIP file
- Confirm the file was not removed by cleanup jobs before import completed
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at app/Exports/ZipExports/ZipExportReader.php:34 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BookStackApp/BookStack@18f8469a1c (2026-09-02).
Data as JSON: /api/errors/4b50b0fce990158b.
Report an issue: GitHub.