Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Preview generation has failed" on Nextcloud 14.0.3 #12643

Closed
rcdailey opened this issue Nov 24, 2018 · 6 comments
Closed

"Preview generation has failed" on Nextcloud 14.0.3 #12643

rcdailey opened this issue Nov 24, 2018 · 6 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug needs info stale Ticket or PR with no recent activity

Comments

@rcdailey
Copy link
Contributor

Using the nextcloud:apache Docker image at version 14.0.3, I get the following error in logs during preview generation in the "Images" tab of Nextcloud:

Error | gallery | Exception: Preview generation has failed | a few seconds ago
-- | -- | -- | --
Error | gallery | OCP\Files\NotFoundException: Max preview size 0, invalid!/var/www/html/lib/private/PreviewManager.php - line 205:OC\Preview\Generator->getPreview(OC\Files\Node\File {}, 200, 200, false, "fill", "image/jpeg")/var/www/html/apps/gallery/lib/Service/PreviewService.php - line 106:OC\PreviewManager->getPreview(OC\Files\Node\File {}, 200, 200, false)/var/www/html/apps/gallery/lib/Controller/Preview.php - line 167:OCA\Gallery\Service\PreviewService->createPreview(OC\Files\Node\File {}, 200, 200, true, false)/var/www/html/apps/gallery/lib/Controller/Preview.php - line 117:OCA\Gallery\Controller\PreviewController->getPreviewData(OC\Files\Node\File {}, true, 200, 200, true, false)/var/www/html/apps/gallery/lib/Controller/PreviewController.php - line 134:OCA\Gallery\Controller\PreviewController->getData(250697, 200, 200)/var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 166:OCA\Gallery\Controller\PreviewController->getPreview(250697, 200, 200)/var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 99:OC\AppFramework\Http\Dispatcher->executeController(OCA\Gallery\ ... {}, "getPreview")/var/www/html/lib/private/AppFramework/App.php - line 118:OC\AppFramework\Http\Dispatcher->dispatch(OCA\Gallery\ ... {}, "getPreview")/var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:OC\AppFramework\App::main("PreviewController", "getPreview", OC\AppFramew ... {}, { fileId: "2 ... "})OC\AppFramework\Routing\RouteActionHandler->__invoke({ fileId: "2 ... "})/var/www/html/lib/private/Route/Router.php - line 297:call_user_func(OC\AppFramew ... {}, { fileId: "2 ... "})/var/www/html/lib/base.php - line 987:OC\Route\Router->match("/apps/gallery/preview/250697")/var/www/html/index.php - line 42:OC::handleRequest() | a few seconds ago

I get a lot of the "Max preview size 0" errors. I'm not sure why.

My docker compose is as follows:

version: '3.7'

services:
  db:
    image: mysql:8
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    restart: always
    user: $UID:$GID
    networks:
      - nextcloud
    volumes:
      - ./database/data:/var/lib/mysql
      - /etc/localtime:/etc/localtime:ro
    environment:
      - MYSQL_ROOT_PASSWORD=
    env_file:
      - db.env

  redis:
    image: redis
    restart: always
    networks:
      - nextcloud
    volumes:
      - /etc/localtime:/etc/localtime:ro

  app:
    image: nextcloud:apache
    hostname: nextcloud
    container_name: nextcloud
    restart: always
    networks:
      - nextcloud
      - reverse_proxy
    volumes:
      - ./nextcloud/config:/var/www/html
      - /media/nextcloud:/data
      - /etc/localtime:/etc/localtime:ro
    environment:
      - MYSQL_HOST=db
    env_file:
      - db.env
    depends_on:
      - db
      - redis

  cron:
    image: nextcloud:apache
    restart: always
    entrypoint: /cron.sh
    networks:
      - nextcloud
    volumes:
      - ./nextcloud/config:/var/www/html
      - /media/nextcloud:/data
      - /etc/localtime:/etc/localtime:ro
    environment:
      - MYSQL_HOST=db
    env_file:
      - db.env
    depends_on:
      - db
      - redis

networks:
  reverse_proxy:
    external: 'true'
    name: reverse_proxy
  nextcloud:
    driver: bridge

And my config.php is:

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'redis',
    'port' => 6379,
  ),
  'datadirectory' => '/data',
  'instanceid' => 'redacted',
  'passwordsalt' => 'redacted',
  'secret' => 'redacted',
  'trusted_domains' =>
  array (
    0 => 'redacted',
  ),
  'dbtype' => 'mysql',
  'version' => '14.0.3.0',
  'overwrite.cli.url' => 'https://redacted/',
  'dbname' => 'nextcloud',
  'dbhost' => 'db',
  'dbport' => '3306',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'nextcloud',
  'installed' => true,
  'mail_domain' => 'redacted',
  'mail_from_address' => 'admin',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpport' => '465',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'redacted',
  'mail_smtppassword' => 'redacted',
  'mail_smtpauthtype' => 'LOGIN',
  'log_type' => 'file',
  'logfile' => '/var/logs/nextcloud.log',
  'loglevel' => 1,
  'preview_max_x' => 2048,
  'preview_max_y' => 2048,
  'preview_max_scale_factor' => 1,
  'htaccess.RewriteBase' => '/',
  'theme' => 'nextcloud-breeze-dark',
);
@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #11821 (Nextcloud 14.0.3 dont start after Update postgresql 10), #331 (Failing Preview tests on PHP7), #11880 (WebDAV problem in nextcloud 14.0.3), #11784 (14.0.3), and #6604 (Can't access nextcloud 12.0.3).

@LifeBasher
Copy link

have you tried to use the preview generator app in nextcloud? and what os are u using for your server?

@rcdailey
Copy link
Contributor Author

I have not, I expect the stock functionality to work. And the host OS is Ubuntu 18, but remember I said I'm using the docker image.

@LifeBasher
Copy link

Im not working with them so i cant say why the normal functionnality doesnt work but well you should try the command line :P

@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Jun 12, 2019
@kesselb
Copy link
Contributor

kesselb commented Nov 16, 2019

Still happening? You usually see the above error if the calculation for the width or height of the image fails. Probably a image with broken meta information.

@ghost
Copy link

ghost commented Dec 16, 2019

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

@ghost ghost added the stale Ticket or PR with no recent activity label Dec 16, 2019
@ghost ghost closed this as completed Dec 30, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug needs info stale Ticket or PR with no recent activity
Projects
None yet
Development

No branches or pull requests

6 participants
@rcdailey @kesselb @skjnldsv @nextcloud-bot @LifeBasher and others