nextcloud / nextcloudpi

📦 Build code for NextcloudPi: Raspberry Pi, Odroid, Rock64, curl installer...
https://nextcloudpi.com
2.58k stars 297 forks source link

Feature Suggestion: nc-previews.sh throws exception "Command "preview:pre-generate" is not defined" if Preview Generator app is not enabled. #1991

Open ptandler opened 1 month ago

ptandler commented 1 month ago

I noticed that I had the preview generator ap disabled and therefore got this exception:

Running nc-previews

In Application.php line 720:

  [Symfony\Component\Console\Exception\CommandNotFoundException]  
  Command "preview:pre-generate" is not defined.                  

  Did you mean one of these?                                      
      notification:generate                                       
      preview:generate                                            
      preview:repair                                              
      preview:reset-rendered-texts                                

Exception trace:
  at /var/www/nextcloud/3rdparty/symfony/console/Application.php:720
 Symfony\Component\Console\Application->find() at /var/www/nextcloud/3rdparty/symfony/console/Application.php:259
 Symfony\Component\Console\Application->doRun() at /var/www/nextcloud/3rdparty/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at /var/www/nextcloud/lib/private/Console/Application.php:213
 OC\Console\Application->run() at /var/www/nextcloud/console.php:100
 require_once() at /var/www/nextcloud/occ:11

It took me a bit to figure out why these commands were missing, so maybe you could add the hint that the Preview Generator app needs to be installed and enabled and / or maybe check it's status and offer to install and enable the app.

System information

NextcloudPi diagnostics ``` NextcloudPi version v1.55.2 NextcloudPi image NextCloudPi_RaspberryPi_v1.50.3.img OS Debian GNU/Linux 11. 6.1.21-v8+ (aarch64) automount yes USB devices sda datadir /media/myCloudDrive/ncdata/data data in SD no data filesystem btrfs data disk usage 788G/1,9T rootfs usage 12G/29G swapfile /var/swap dbdir /media/myCloudDrive/ncdatabase Nextcloud check ok Nextcloud version 28.0.10.1 HTTPD service up PHP service up MariaDB service up Redis service up HPB service up Postfix service up Internet check ok Public IPv4 ***REMOVED SENSITIVE VALUE*** Public IPv6 ***REMOVED SENSITIVE VALUE*** Port 80 closed Port 443 closed IP ***REMOVED SENSITIVE VALUE*** Gateway ***REMOVED SENSITIVE VALUE*** Interface eth0 Certificates ***REMOVED SENSITIVE VALUE*** NAT loopback no Uptime 57min ```
Nextcloud configuration ``` { "system": { "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": { "0": "localhost", "7": "nextcloudpi", "5": "nextcloudpi.local", "8": "nextcloudpi.lan", "3": "nextcloudpi", "11": "2001:16b8:b523:6600:109b:e152:beba:f390", "1": "192.168.178.36", "14": "nextcloudpi" }, "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "28.0.10.1", "overwrite.cli.url": "https:\/\/nextcloudpi\/", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword-new-2023-01": "8UU43BDvMWEPyZ6OWrzR50B3m8ovU6ezPVWuxIUxWhQ=", "dbpassword-correct": "4Ek\/MrVBVLgbUH3YqamLee4Kr48vcWMt4dNc07bjT40=", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "instanceid": "***REMOVED SENSITIVE VALUE***", "memcache.local": "\\OC\\Memcache\\APCu", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0, "timeout": 0, "password": "***REMOVED SENSITIVE VALUE***" }, "tempdirectory": "\/media\/myCloudDrive\/ncdata\/data\/tmp", "mail_smtpmode": "smtp", "mail_smtpauthtype": "LOGIN", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "preview_max_x": "2048", "preview_max_y": "2048", "jpeg_quality": "60", "overwriteprotocol": "https", "trusted_proxies": "***REMOVED SENSITIVE VALUE***", "loglevel": "2", "log_type": "file", "htaccess.RewriteBase": "\/", "logfile": "\/media\/myCloudDrive\/ncdata\/data\/nextcloud.log", "maintenance": false, "theme": "", "default_phone_region": "DE", "mail_sendmailmode": "smtp", "mail_smtpsecure": "tls", "mail_smtpauth": 1, "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "587", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "maintenance_window_start": 1 } } ```
theCalcaholic commented 1 week ago

Nextcloudpi actually takes care of installing and enabling the app - but maybe it got automatically disabled when updating to a version of Nextcloud that was not yet officially supported by NCP?