PHP fatal / occ broken after update (Stecamn/Symfony)

Nextcloud version (eg, 29.0.5): 28.0.10
Operating system and version (eg, Ubuntu 24.04): Ubuntu 20.04 LTS
Apache or nginx version (eg, Apache 2.4.25): nginx 1.27.1
PHP version (eg, 8.3): 8.2 / 8.3

After a successful update from 28.0.9 to 28.0.10 via ‘occ upgrade’, every call of occ suddenly brings the following fatal error:

PHP Fatal error:  Declaration of Stecman\Component\Symfony\Console\BashCompletion\CompletionCommand::getNativeDefinition() must be compatible with Symfony\Component\Console\Command\Command::getNativeDefinition(): Symfony\Component\Console\Input\InputDefinition in /var/www/nextcloud/3rdparty/stecman/symfony-console-completion/src/CompletionCommand.php on line 46

I then switched from PHP 8.2.23 to 8.3.11 (because it’s recommended), but the problem remains. The cloud can be accessed normally via browser and seems to work flawlessly (the App “Preview Generator” throws the above log messages every 10 minutes though and occ doesn’t work anymore).

Unfortunately, I don’t have a solution. Do you have any ideas?

config.php:

<?php
$CONFIG = array (
  'maintenance' => false,
  'maintenance_window_start' => 1,
  'instanceid' => 'whatever',
  'passwordsalt' => 'whatever',
  'secret' => 'whatever',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'whatever',
    2 => 'whatever',
    3 => '127.0.1.1',
  ),
  'allow_local_remote_servers' => true,
  'datadirectory' => 'whatever',
  'dbtype' => 'pgsql',
  'version' => '28.0.10.1',
  'overwrite.cli.url' => 'whatever',
  'dbname' => 'whatever',
  'dbhost' => '127.0.0.1',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'whatever',
  'dbpassword' => 'whatever',
  'installed' => true,
  'overwriteprotocol' => 'https',
  'logtimezone' => 'Europe/Berlin',
  'default_language' => 'en',
  'filelocking.enable' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.0,
    'dbindex' => 1,
  ),
  'app_install_overwrite' => 
  array (
    0 => 'dashboardcharts',
    1 => 'gluusso',
    2 => 'files_frommail',
    3 => 'flowupload',
    4 => 'bruteforcesettings',
    5 => 'breezedark',
    6 => 'bbb',
  ),
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'email',
  'mail_domain' => 'whatever',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'whatever',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'whatever',
  'mail_smtppassword' => 'whatever',
  'mail_smtpauthtype' => 'PLAIN',
  'mail_smtpsecure' => 'ssl',
  'default_phone_region' => 'DE',
  'skeletondirectory' => 'whatever',
  'simpleSignUpLink.shown' => false,
  'trashbin_retention_obligation' => 'auto, 7',
  'activity_expire_days' => 28,
  'theme' => '',
  'debug' => false,
  'log_type' => 'file',
  'loglevel' => 0,
  'logfilemode' => 416,
  'syslog_tag' => 'Nextcloud',
  'log_rotate_size' => 52428800,
  'diagnostics.logging' => true,
  'enable_previews' => true,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\XBitmap',
    5 => 'OC\\Preview\\Movie',
    6 => 'OC\\Preview\\PDF',
    7 => 'OC\\Preview\\MP3',
    8 => 'OC\\Preview\\TXT',
    9 => 'OC\\Preview\\MarkDown',
  ),
  'preview_max_memory' => 1024,
  'preview_max_x' => 1920,
  'preview_max_y' => 1080,
  'preview_max_scale_factor' => 1,
  'sharing.minSearchStringLength' => 2,
  'blacklisted_files' => 
  array (
    0 => '.htaccess',
    1 => '.DS_Store',
    2 => 'Thumbs.db',
    3 => 'thumbs.db',
  ),
  'filesystem_check_changes' => 1,
  'login_form_autocomplete' => false,
  'enable_file_metadata' => true,
  'enforce_theme' => '',
  'updater.secret' => 'whatever',
);

Does it work again as soon as you uninstall the BBB app?

2 Likes

I’m having the same problem.
Deactivating the bbb app did indeed solve the problem.
It was not neccessary to uninstall it. Just deactivate, use occ, activate bbb again (if you really need it)

1 Like

In fact, if I disable BBB within the web interface, occ runs again and I can enable BBB via command line. Thanks a lot for the tip and your fast response!

But as soon as I reenable BBB, occ is again not working :frowning:

Although the problem disappeared with disabling BBB, I still don’t understand how it could have happened in the first place. For me, occ is a “meta tool” that should always work and not be knocked out by a single app. Can something like this be prevented in the future?

See here for a fix: 2.7.0 problem with OCC · Issue #287 · littleredbutton/cloud_bbb · GitHub

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.