Skip to content

OCP\Files\NotFoundException: Max preview size 0, invalid! #7156

@max-nextcloud

Description

@max-nextcloud

Describe the bug
Found this in the logs of our instance:

OCP\Files\NotFoundException: Max preview size 0, invalid!
  File "/var/www/nextcloud/lib/private/Preview/Generator.php", line 124, in OC\Preview\Generator::generatePreviews
    throw new NotFoundException('Max preview size 0, invalid!');
  File "/var/www/nextcloud/lib/private/Preview/Generator.php", line 87, in OC\Preview\Generator::getPreview
    return $this->generatePreviews($file, [$specification], $mimeType);
  File "/var/www/nextcloud/lib/private/PreviewManager.php", line 167, in OC\PreviewManager::getPreview
    $preview = $this->getGenerator()->getPreview($file, $width, $height, $crop, $mode, $mimeType);
  File "/text/lib/Service/AttachmentService.php", line 90, in OCA\Text\Service\AttachmentService::getImageFileContent
    return $this->previewManager->getPreview($imageFile, 1024, 1024);
  File "/text/lib/Service/AttachmentService.php", line 55, in OCA\Text\Service\AttachmentService::getImageFile
    return $this->getImageFileContent($imageFileName, $textFile, $preferRawImage);

Expected behavior
No errors in the logs

Server details:

our server, latest 31

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    ☑️ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions