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

[BUG] RuntimeException for CLI command "kitodo:index" #1393

Open
fschoelzel opened this issue Dec 3, 2024 · 3 comments
Open

[BUG] RuntimeException for CLI command "kitodo:index" #1393

fschoelzel opened this issue Dec 3, 2024 · 3 comments
Labels
🐛 bug A non-security related bug.

Comments

@fschoelzel
Copy link
Contributor

fschoelzel commented Dec 3, 2024

Description

RuntimeException for CLI command kitodo:index, Indexing a single document into database and Solr.

[RuntimeException]
Unable to call method "getQueryParams" of non-object "request".

Failed to run typo3 kitodo:index -d https://[...] -p 2 -s dlfCore0: exit status 1

Reproduction

example command:

ddev typo3 kitodo:index -d https://api.deutsche-digitale-bibliothek.de/items/WSGSC3P73OTKV2KDNUKAMYIZZW3BJ2T3/source/record -p 2 -s dlfCore0

[-p|--pid PID] = change to your PID

Error Log

Tue, 03 Dec 2024 17:23:55 +0100 [CRITICAL] request="c0ff19bbee230" component="Helhum.Typo3Console.Error.ExceptionRenderer": Unable to call method "getQueryParams" of non-object "request".- RuntimeException: Unable to call method "getQueryParams" of non-object "request"., in file /var/www/html/vendor/symfony/expression-language/Node/GetAttrNode.php:110 - {"exception":"RuntimeException: Unable to call method \"getQueryParams\" of non-object \"request\". in /var/www/html/vendor/symfony/expression-language/Node/GetAttrNode.php:110\nStack trace:\n#0 /var/www/html/vendor/symfony/expression-language/Node/FunctionNode.php(47): Symfony\\Component\\ExpressionLanguage\\Node\\GetAttrNode->evaluate(Array, Array)\n#1 /var/www/html/vendor/symfony/expression-language/Node/BinaryNode.php(105): Symfony\\Component\\ExpressionLanguage\\Node\\FunctionNode->evaluate(Array, Array)\n#2 /var/www/html/vendor/symfony/expression-language/ExpressionLanguage.php(59): Symfony\\Component\\ExpressionLanguage\\Node\\BinaryNode->evaluate(Array, Array)\n#3 /var/www/html/vendor/typo3/cms-core/Classes/ExpressionLanguage/Resolver.php(73): Symfony\\Component\\ExpressionLanguage\\ExpressionLanguage->evaluate('traverse(reques...', Array)\n#4 /var/www/html/vendor/typo3/cms-core/Classes/TypoScript/IncludeTree/Visitor/IncludeTreeConditionMatcherVisitor.php(164): TYPO3\\CMS\\Core\\ExpressionLanguage\\Resolver->evaluate('traverse(reques...')\n#5 /var/www/html/vendor/typo3/cms-core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php(55): TYPO3\\CMS\\Core\\TypoScript\\IncludeTree\\Visitor\\IncludeTreeConditionMatcherVisitor->visitBeforeChildren(Object(TYPO3\\CMS\\Core\\TypoScript\\IncludeTree\\IncludeNode\\ConditionInclude), 5)\n#6 /var/www/html/vendor/typo3/cms-core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php(62): TYPO3\\CMS\\Core\\TypoScript\\IncludeTree\\Traverser\\ConditionVerdictAwareIncludeTreeTraverser->traverseRecursive(Object(TYPO3\\CMS\\Core\\TypoScript\\IncludeTree\\IncludeNode\\ConditionInclude), Array, 5)\n#7 /var/www/html/vendor/typo3/cms-core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php(62): TYPO3\\CMS\\Core\\TypoScript\\IncludeTree\\Traverser\\ConditionVerdictAwareIncludeTreeTraverser->traverseRecursive(Object(TYPO3\\CMS\\Core\\TypoScript\\IncludeTree\\IncludeNode\\AtImportInclude), Array, 4)\n#8 /var/www/html/vendor/typo3/cms-core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php(62): TYPO3\\CMS\\Core\\TypoScript\\IncludeTree\\Traverser\\ConditionVerdictAwareIncludeTreeTraverser->traverseRecursive(Object(TYPO3\\CMS\\Core\\TypoScript\\IncludeTree\\IncludeNode\\FileInclude), Array, 3)\n#9 /var/www/html/vendor/typo3/cms-core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php(62): TYPO3\\CMS\\Core\\TypoScript\\IncludeTree\\Traverser\\ConditionVerdictAwareIncludeTreeTraverser->traverseRecursive(Object(TYPO3\\CMS\\Core\\TypoScript\\IncludeTree\\IncludeNode\\IncludeStaticFileDatabaseInclude), Array, 2)\n#10 /var/www/html/vendor/typo3/cms-core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php(62): TYPO3\\CMS\\Core\\TypoScript\\IncludeTree\\Traverser\\ConditionVerdictAwareIncludeTreeTraverser->traverseRecursive(Object(TYPO3\\CMS\\Core\\TypoScript\\IncludeTree\\IncludeNode\\SysTemplateInclude), Array, 1)\n#11 /var/www/html/vendor/typo3/cms-core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php(49): TYPO3\\CMS\\Core\\TypoScript\\IncludeTree\\Traverser\\ConditionVerdictAwareIncludeTreeTraverser->traverseRecursive(Object(TYPO3\\CMS\\Core\\TypoScript\\IncludeTree\\IncludeNode\\RootInclude), Array, 0)\n#12 /var/www/html/vendor/typo3/cms-extbase/Classes/Configuration/BackendConfigurationManager.php(305): TYPO3\\CMS\\Core\\TypoScript\\IncludeTree\\Traverser\\ConditionVerdictAwareIncludeTreeTraverser->traverse(Object(TYPO3\\CMS\\Core\\TypoScript\\IncludeTree\\IncludeNode\\RootInclude), Array)\n#13 /var/www/html/vendor/typo3/cms-extbase/Classes/Configuration/BackendConfigurationManager.php(320): TYPO3\\CMS\\Extbase\\Configuration\\BackendConfigurationManager->getTypoScriptSetup()\n#14 /var/www/html/vendor/typo3/cms-extbase/Classes/Configuration/BackendConfigurationManager.php(171): TYPO3\\CMS\\Extbase\\Configuration\\BackendConfigurationManager->getExtbaseConfiguration()\n#15 /var/www/html/vendor/typo3/cms-extbase/Classes/Configuration/ConfigurationManager.php(143): TYPO3\\CMS\\Extbase\\Configuration\\BackendConfigurationManager->getConfiguration(NULL, NULL)\n#16 /var/www/html/public/typo3conf/ext/dlf/Classes/Command/BaseCommand.php(131): TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManager->getConfiguration('Framework')\n#17 /var/www/html/public/typo3conf/ext/dlf/Classes/Command/IndexCommand.php(104): Kitodo\\Dlf\\Command\\BaseCommand->initializeRepositories(2)\n#18 /var/www/html/vendor/symfony/console/Command/Command.php(279): Kitodo\\Dlf\\Command\\IndexCommand->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#19 /var/www/html/vendor/symfony/console/Application.php(1094): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#20 /var/www/html/vendor/symfony/console/Application.php(342): Symfony\\Component\\Console\\Application->doRunCommand(Object(Kitodo\\Dlf\\Command\\IndexCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#21 /var/www/html/vendor/symfony/console/Application.php(193): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#22 /var/www/html/vendor/typo3/cms-core/Classes/Console/CommandApplication.php(112): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#23 /var/www/html/vendor/typo3/cms-cli/typo3(23): TYPO3\\CMS\\Core\\Console\\CommandApplication->run()\n#24 /var/www/html/vendor/typo3/cms-cli/typo3(24): {closure}()\n#25 /var/www/html/vendor/bin/typo3(119): include('/var/www/html/v...')\n#26 {main}"}

Environment

  • DDEV 1.24.0
  • mariadb:10.6
  • Apache Solr version: 8.11.2
  • TYPO3 version: 12.4.23
  • PHP version: 8.2
@fschoelzel fschoelzel changed the title [BUG] RuntimeException while kitodo:index [BUG] RuntimeException for CLI command "kitodo:index" Dec 3, 2024
@fschoelzel
Copy link
Contributor Author

PID on this Portal is 2.
The initializeRepositories Method can't get the frameworkConfiguration (line 131 in Classes/Command/BaseCommand.php).

The verbose Output of the Error in my Console:

ddev typo3 kitodo:index -d https://api.deutsche-digitale-bibliothek.de/items/WSGSC3P73OTKV2KDNUKAMYIZZW3BJ2T3/source/record -p 2 -s dlfCore0 -v

Index single document into database and Solr.
=============================================


                                                                   
  [ RuntimeException ]                                             
  Unable to call method "getQueryParams" of non-object "request".  
                                                                   

Exception trace:
#0 ()
   vendor/symfony/expression-language/Node/GetAttrNode.php:110
#1 Symfony\Component\ExpressionLanguage\Node\GetAttrNode->evaluate()
   vendor/symfony/expression-language/Node/FunctionNode.php:47
#2 Symfony\Component\ExpressionLanguage\Node\FunctionNode->evaluate()
   vendor/symfony/expression-language/Node/BinaryNode.php:105
#3 Symfony\Component\ExpressionLanguage\Node\BinaryNode->evaluate()
   vendor/symfony/expression-language/ExpressionLanguage.php:59
#4 Symfony\Component\ExpressionLanguage\ExpressionLanguage->evaluate()
   vendor/typo3/cms-core/Classes/ExpressionLanguage/Resolver.php:73
#5 TYPO3\CMS\Core\ExpressionLanguage\Resolver->evaluate()
   vendor/typo3/cms-core/Classes/TypoScript/IncludeTree/Visitor/IncludeTreeConditionMatcherVisitor.php:164
#6 TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeConditionMatcherVisitor->visitBeforeChildren()
   vendor/typo3/cms-core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php:55
#7 TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser->traverseRecursive()
   vendor/typo3/cms-core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php:62
#8 TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser->traverseRecursive()
   vendor/typo3/cms-core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php:62
#9 TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser->traverseRecursive()
   vendor/typo3/cms-core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php:62
#10 TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser->traverseRecursive()
   vendor/typo3/cms-core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php:62
#11 TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser->traverseRecursive()
   vendor/typo3/cms-core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php:62
#12 TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser->traverseRecursive()
   vendor/typo3/cms-core/Classes/TypoScript/IncludeTree/Traverser/ConditionVerdictAwareIncludeTreeTraverser.php:49
#13 TYPO3\CMS\Core\TypoScript\IncludeTree\Traverser\ConditionVerdictAwareIncludeTreeTraverser->traverse()
   vendor/typo3/cms-extbase/Classes/Configuration/BackendConfigurationManager.php:313
#14 TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager->getTypoScriptSetup()
   vendor/typo3/cms-extbase/Classes/Configuration/BackendConfigurationManager.php:329
#15 TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager->getExtbaseConfiguration()
   vendor/typo3/cms-extbase/Classes/Configuration/BackendConfigurationManager.php:173
#16 TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager->getConfiguration()
   vendor/typo3/cms-extbase/Classes/Configuration/ConfigurationManager.php:145
#17 TYPO3\CMS\Extbase\Configuration\ConfigurationManager->getConfiguration()
   typo3conf/ext/dlf/Classes/Command/BaseCommand.php:132
#18 Kitodo\Dlf\Command\BaseCommand->initializeRepositories()
   typo3conf/ext/dlf/Classes/Command/IndexCommand.php:104
#19 Kitodo\Dlf\Command\IndexCommand->execute()
   vendor/symfony/console/Command/Command.php:279
#20 Symfony\Component\Console\Command\Command->run()
   vendor/symfony/console/Application.php:1094
#21 Symfony\Component\Console\Application->doRunCommand()
   vendor/symfony/console/Application.php:342
#22 Symfony\Component\Console\Application->doRun()
   vendor/symfony/console/Application.php:193
#23 Symfony\Component\Console\Application->run()
   vendor/typo3/cms-core/Classes/Console/CommandApplication.php:112
#24 TYPO3\CMS\Core\Console\CommandApplication->run()
   vendor/typo3/cms-cli/typo3:23
#25 {closure}()
   vendor/typo3/cms-cli/typo3:24
#26 include()
   vendor/bin/typo3:119

kitodo:index [--dry-run] [-d|--doc DOC] [-p|--pid PID] [-s|--solr SOLR] [-o|--owner [OWNER]] [--softCommit]

Failed to run typo3 kitodo:index -d https://api.deutsche-digitale-bibliothek.de/items/WSGSC3P73OTKV2KDNUKAMYIZZW3BJ2T3/source/record -p 2 -s dlfCore0 -v: exit status 1

@stweil
Copy link
Member

stweil commented Dec 29, 2024

I struggle with the same error (TYPO3 12, solr-9.7.0, mariadb 10.11.6):

root@v22024089067283036:/var/www/typo3_12/vendor/kitodo/presentation# /var/www/typo3_12/vendor/bin/typo3 kitodo:index --doc https://digital.ladenburg.de/data/Ladenburger_Wochenblatt/mets18690130.xml --pid 3 --solr dlfCore0

Index single document into database and Solr.
=============================================


In GetAttrNode.php line 110:
                                                                   
  Unable to call method "getQueryParams" of non-object "request".  
                                                                   

kitodo:index [--dry-run] [-d|--doc DOC] [-p|--pid PID] [-s|--solr SOLR] [-o|--owner [OWNER]] [--softCommit]

@stweil
Copy link
Member

stweil commented Jan 4, 2025

I now tried indexing with TYPO3 11 and the official dlf release and get a different error:

/var/www/typo3_11/vendor/bin/typo3 kitodo:index --doc https://digital.ladenburg.de/data/Ladenburger_Wochenblatt/mets18690130.xml --pid 3 --solr dlfCore1

Index single document into database and Solr.
=============================================


In ErrorHandler.php line 140:
                                                                                                                             
  PHP Warning: Undefined array key 0 in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Command/BaseCommand.php line 233  
                                                                                                                             

kitodo:index [--dry-run] [-d|--doc DOC] [-p|--pid PID] [-s|--solr SOLR] [-o|--owner [OWNER]]

Other METS files get a different error:

root@v22024089067283036:/var/www/typo3_11# /var/www/typo3_11/vendor/bin/typo3 kitodo:index --doc https://digital.ladenburg.de/data/Ladenburger_Wochenblatt/mets.xml --pid 3 --solr dlfCore1

Index single document into database and Solr.
=============================================


In ErrorHandler.php line 140:
                                                                                                                             
  PHP Warning: Undefined array key 1 in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Common/MetsDocument.php line 440  
                                                                                                                             

kitodo:index [--dry-run] [-d|--doc DOC] [-p|--pid PID] [-s|--solr SOLR] [-o|--owner [OWNER]]

This one required the bug fix from PR #1417.

@sebastian-meyer sebastian-meyer added the 🐛 bug A non-security related bug. label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug A non-security related bug.
Projects
None yet
Development

No branches or pull requests

3 participants