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

Unhandled exception thrown by occ, no matter the arguments #6911

Closed
grandiego opened this issue Feb 16, 2022 · 1 comment
Closed

Unhandled exception thrown by occ, no matter the arguments #6911

grandiego opened this issue Feb 16, 2022 · 1 comment

Comments

@grandiego
Copy link

Steps to reproduce

  1. Use web-updater to update nextcloud 23.0.0 to 23.0.2
  2. Get warning about missing indices "properties_pathonly_index" in table "oc_properties" and "job_lastcheck_reserved" in table "oc_jobs".
  3. Run sudo -u www-data php8.0 ./occ db:add-missing-indices

Expected behaviour

Missing indices are generated

Actual behaviour

occ fails and shows this error:

An unhandled exception has been thrown:
OCP\AppFramework\Db\DoesNotExistException: Did expect one result but found none when executing: query "SELECT * FROM *PREFIX*mediadc_settings WHERE name = :dcValue1"; in /var/www/cloud/lib/public/AppFramework/Db/QBMapper.php:283
Stack trace:
#0 /var/www/cloud/lib/public/AppFramework/Db/QBMapper.php(361): OCP\AppFramework\Db\QBMapper->findOneQuery()
#1 /var/www/cloud/apps/mediadc/lib/Db/SettingMapper.php(85): OCP\AppFramework\Db\QBMapper->findEntity()
#2 /var/www/cloud/apps/mediadc/lib/Service/UtilsService.php(67): OCA\MediaDC\Db\SettingMapper->findByName()
#3 [internal function]: OCA\MediaDC\Service\UtilsService->__construct()
#4 /var/www/cloud/lib/private/AppFramework/Utility/SimpleContainer.php(106): ReflectionClass->newInstanceArgs()
#5 /var/www/cloud/lib/private/AppFramework/Utility/SimpleContainer.php(114): OC\AppFramework\Utility\SimpleContainer->buildClass()
#6 /var/www/cloud/lib/private/AppFramework/Utility/SimpleContainer.php(131): OC\AppFramework\Utility\SimpleContainer->resolve()
#7 /var/www/cloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(463): OC\AppFramework\Utility\SimpleContainer->query()
#8 /var/www/cloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(435): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback()
#9 /var/www/cloud/lib/private/AppFramework/Utility/SimpleContainer.php(87): OC\AppFramework\DependencyInjection\DIContainer->query()
#10 [internal function]: OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}()
#11 /var/www/cloud/lib/private/AppFramework/Utility/SimpleContainer.php(106): array_map()
#12 /var/www/cloud/lib/private/AppFramework/Utility/SimpleContainer.php(114): OC\AppFramework\Utility\SimpleContainer->buildClass()
#13 /var/www/cloud/lib/private/AppFramework/Utility/SimpleContainer.php(131): OC\AppFramework\Utility\SimpleContainer->resolve()
#14 /var/www/cloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(463): OC\AppFramework\Utility\SimpleContainer->query()
#15 /var/www/cloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(435): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback()
#16 /var/www/cloud/lib/private/AppFramework/Utility/SimpleContainer.php(87): OC\AppFramework\DependencyInjection\DIContainer->query()
#17 [internal function]: OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}()
#18 /var/www/cloud/lib/private/AppFramework/Utility/SimpleContainer.php(106): array_map()
#19 /var/www/cloud/lib/private/AppFramework/Utility/SimpleContainer.php(114): OC\AppFramework\Utility\SimpleContainer->buildClass()
#20 /var/www/cloud/lib/private/AppFramework/Utility/SimpleContainer.php(131): OC\AppFramework\Utility\SimpleContainer->resolve()
#21 /var/www/cloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(463): OC\AppFramework\Utility\SimpleContainer->query()
#22 /var/www/cloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(435): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback()
#23 /var/www/cloud/lib/private/AppFramework/Utility/SimpleContainer.php(87): OC\AppFramework\DependencyInjection\DIContainer->query()
#24 [internal function]: OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}()
#25 /var/www/cloud/lib/private/AppFramework/Utility/SimpleContainer.php(106): array_map()
#26 /var/www/cloud/lib/private/AppFramework/Utility/SimpleContainer.php(114): OC\AppFramework\Utility\SimpleContainer->buildClass()
#27 /var/www/cloud/lib/private/AppFramework/Utility/SimpleContainer.php(131): OC\AppFramework\Utility\SimpleContainer->resolve()
#28 /var/www/cloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(463): OC\AppFramework\Utility\SimpleContainer->query()
#29 /var/www/cloud/lib/private/ServerContainer.php(145): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback()
#30 /var/www/cloud/lib/private/Console/Application.php(217): OC\ServerContainer->query()
#31 /var/www/cloud/lib/private/Console/Application.php(128): OC\Console\Application->loadCommandsFromInfoXml()
#32 /var/www/cloud/console.php(98): OC\Console\Application->loadCommands()
#33 /var/www/cloud/occ(11): require_once('/var/www/cloud/...')

Browser

Firefox, but not relevant to this issue

Server configuration

Operating system: Debian 11

Web server: Nginx 1.21.4

Database: MariaDB 10.6.7
PHP version: 8.0.15

Nextcloud Version: 23.0.2

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your server installation folder

occ app:list also fails with similar message. In fact, it fails even with no arguments, when it should display help.

Nextcloud configuration:

$CONFIG = array ( 'dbtype' => 'mysql', 'dbname' => 'owncloud', 'dbuser' => 'owncloud', 'dbpassword' => 'XXXXXXXX', 'dbhost' => 'mariadb.example.com', 'dbtableprefix' => 'oc_', 'forcessl' => true, 'blacklisted_files' => array ( 0 => '.htaccess', ), 'default_language' => 'es', 'defaultapp' => 'files', 'knowledgebaseenabled' => true, 'knowledgebaseurl' => 'http://api.apps.nextcloud.com/v1', 'appstoreenabled' => true, 'allow_user_to_change_display_name' => true, 'updatechecker' => true, 'theme' => '', 'log_type' => 'syslog', 'datadirectory' => '/nextcloud', 'instanceid' => 'XXXXXXXXXXX', 'passwordsalt' => 'XXXXXXXXXX', 'installed' => true, 'maintenance' => false, 'trusted_domains' => array ( 0 => 'cloud.example.com', ), 'version' => '23.0.2.1', 'ldapIgnoreNamingRules' => false, 'mail_from_address' => 'cloud', 'mail_smtpmode' => 'smtp', 'mail_domain' => 'example.com', 'secret' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXX', 'forceSSLforSubdomains' => true, 'overwrite.cli.url' => 'https://cloud.example.com/', 'htaccess.RewriteBase' => '/', 'memcache.local' => '\\OC\\Memcache\\APCu', 'trashbin_retention_obligation' => 'auto,30', 'versions_retention_obligation' => 'auto,30', 'appcodechecker' => false, 'has_internet_connection' => true, 'xframe_restriction' => true, 'filelocking.enabled' => true, 'memcache.locking' => '\\OC\\Memcache\\Redis', 'redis' => array ( 'host' => '/var/run/redis/redis-server.sock', 'port' => 0, 'timeout' => 0, 'dbindex' => 0, ), 'loglevel' => 0, 'preview_libreoffice_path' => '/usr/lib/libreoffice/program/', 'mail_smtphost' => 'smtp.example.com', 'mail_smtpport' => '25', 'updater.release.channel' => 'stable', 'mysql.utf8mb4' => true, 'app_install_overwrite' => array ( 0 => 'ocsms', 1 => 'telephoneprovider', 2 => 'radio', 3 => 'dashboard', 4 => 'files_texteditor', 5 => 'talked', ), 'has_rebuilt_cache' => true, 'mail_sendmailmode' => 'smtp', 'default_phone_region' => 'ES', 'updater.secret' => 'XXXXXXXXXXXX', };
@grandiego
Copy link
Author

prefixmediadc_settings table is empty. It turns out there's an app called mediaDC installed but not configured. I've disabled it and everything works. Sorry for the noise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant