@mattab opened this Issue on May 29th 2019 Member

This error was triggered in core:archive for 2 different users, with the same backtrace, where they mention "getSiteSearchCategories" ie. Piwik\Plugins\ImageGraph\API->get(1, 'day', '2019-04-22,2019...', 'Actions', 'getSiteSearchCategories', 'evolution', '2', false, false, true, 700, 200, 9, 11, true, false, false, '222222', 'FFFFFF', 'CCCCCC', false, true, false, false)

Maybe this can be reproduced by creating a scheduled email report which includes the SiteSearch.getSiteSearchCategories report and an evolution graph?

See below the error message and backtrace. I could provide the dump on request but maybe it's not necesary to fix the issue, somehow?

 Uncaught exception in API: /var/www/html/plugins/API/RowEvolution.php(362): Unexpected state: row evolution API call returned empty DataTable\Map.
Unexpected state: row evolution API call returned empty DataTable\Map.
<a href='/0'>#0</a> /var/www/html/plugins/API/RowEvolution.php(505): Piwik\Plugins\API\RowEvolution->enhanceRowEvolutionMetaData(Array, Object(Piwik\DataTable\Map))
<a href='/1'>#1</a> /var/www/html/plugins/API/RowEvolution.php(71): Piwik\Plugins\API\RowEvolution->getMultiRowEvolution(Object(Piwik\DataTable\Map), Array, 'Actions', 'getSiteSearchCa...', Array, 'nb_visits', '1', true)
<a href='/2'>#2</a> /var/www/html/plugins/API/API.php(495): Piwik\Plugins\API\RowEvolution->getRowEvolution(1, 'day', '2019-04-22,2019...', 'Actions', 'getSiteSearchCa...', '', false, 'nb_visits', 'ru', Array, '1', true)
<a href='/3'>#3</a> [internal function]: Piwik\Plugins\API\API->getRowEvolution(1, 'day', '2019-04-22,2019...', 'Actions', 'getSiteSearchCa...', false, false, 'nb_visits', 'ru', false, '1', true, false)
<a href='/4'>#4</a> /var/www/html/core/API/Proxy.php(237): call_user_func_array(Array, Array)
<a href='/5'>#5</a> /var/www/html/core/Context.php(28): Piwik\API\Proxy->Piwik\API\{closure}()
<a href='/6'>#6</a> /var/www/html/core/API/Proxy.php(328): Piwik\Context::executeWithQueryParameters(Array, Object(Closure))
<a href='/7'>#7</a> /var/www/html/core/API/Request.php(265): Piwik\API\Proxy->call('\\Piwik\\Plugins\\...', 'getRowEvolution', Array)
<a href='/8'>#8</a> /var/www/html/core/API/Request.php(507): Piwik\API\Request->process()
<a href='/9'>#9</a> /var/www/html/plugins/ImageGraph/API.php(318): Piwik\API\Request::processRequest('API.getRowEvolu...', Array)
<a href='/10'>#10</a> [internal function]: Piwik\Plugins\ImageGraph\API->get(1, 'day', '2019-04-22,2019...', 'Actions', 'getSiteSearchCa...', 'evolution', '2', false, false, true, 700, 200, 9, 11, true, false, false, '222222', 'FFFFFF', 'CCCCCC', false, true, false, false)
<a href='/11'>#11</a> /var/www/html/core/API/Proxy.php(237): call_user_func_array(Array, Array)
<a href='/12'>#12</a> /var/www/html/core/Context.php(28): Piwik\API\Proxy->Piwik\API\{closure}()
<a href='/13'>#13</a> /var/www/html/core/API/Proxy.php(328): Piwik\Context::executeWithQueryParameters(Array, Object(Closure))
<a href='/14'>#14</a> /var/www/html/core/API/Request.php(265): Piwik\API\Proxy->call('\\Piwik\\Plugins\\...', 'get', Array)
<a href='/15'>#15</a> /var/www/html/core/ReportRenderer.php(268): Piwik\API\Request->process()
<a href='/16'>#16</a> /var/www/html/core/ReportRenderer/Html.php(175): Piwik\ReportRenderer::getStaticGraph(Array, 700, 200, true, NULL)
<a href='/17'>#17</a> /var/www/html/core/ReportRenderer/Html.php(139): Piwik\ReportRenderer\Html->getAttachment(Array, Array, '\xD0\x92\xD1\x82\xD0\xBE\xD1\x80\xD0\xBD\xD0\xB8\xD0\xBA,...')
<a href='/18'>#18</a> /var/www/html/plugins/ScheduledReports/API.php(1012): Piwik\ReportRenderer\Html->getAttachments(Array, Array, '\xD0\x92\xD1\x82\xD0\xBE\xD1\x80\xD0\xBD\xD0\xB8\xD0\xBA,...')
<a href='/19'>#19</a> /var/www/html/plugins/ScheduledReports/API.php(538): Piwik\Plugins\ScheduledReports\API->getAttachments(Object(Piwik\ReportRenderer\Html), Array, Array, '\xD0\x92\xD1\x82\xD0\xBE\xD1\x80\xD0\xBD\xD0\xB8\xD0\xBA,...')
<a href='/20'>#20</a> /var/www/html/plugins/ScheduledReports/API.php(599): Piwik\Plugins\ScheduledReports\API->generateReport('2', '2019-05-21', 'ru', 2, 'day')
<a href='/21'>#21</a> /var/www/html/core/Context.php(75): Piwik\Plugins\ScheduledReports\API->Piwik\Plugins\ScheduledReports\{closure}()
<a href='/22'>#22</a> /var/www/html/plugins/ScheduledReports/API.php(670): Piwik\Context::changeIdSite('1', Object(Closure))
<a href='/23'>#23</a> [internal function]: Piwik\Plugins\ScheduledReports\API->sendReport('2')
<a href='/24'>#24</a> /var/www/html/core/Scheduler/Scheduler.php(264): call_user_func(Array, '2')
<a href='/25'>#25</a> /var/www/html/core/Scheduler/Scheduler.php(136): Piwik\Scheduler\Scheduler->executeTask(Object(Piwik\Scheduler\Task))
<a href='/26'>#26</a> /var/www/html/plugins/CoreAdminHome/API.php(66): Piwik\Scheduler\Scheduler->run()
<a href='/27'>#27</a> /var/www/html/core/CronArchive.php(612): Piwik\Plugins\CoreAdminHome\API->runScheduledTasks()
<a href='/28'>#28</a> /var/www/html/core/CronArchive.php(317): Piwik\CronArchive->runScheduledTasks()
<a href='/29'>#29</a> /var/www/html/core/Access.php(628): Piwik\CronArchive->Piwik\{closure}()
<a href='/30'>#30</a> /var/www/html/core/CronArchive.php(319): Piwik\Access::doAsSuperUser(Object(Closure))
<a href='/31'>#31</a> /var/www/html/plugins/CoreConsole/Commands/CoreArchiver.php(27): Piwik\CronArchive->main()
<a href='/32'>#32</a> /var/www/html/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Piwik\Plugins\CoreConsole\Commands\CoreArchiver->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
<a href='/33'>#33</a> /var/www/html/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
<a href='/34'>#34</a> /var/www/html/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Piwik\Plugins\CoreConsole\Commands\CoreArchiver), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
<a href='/35'>#35</a> [internal function]: Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
<a href='/36'>#36</a> /var/www/html/core/Console.php(98): call_user_func(Array, Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
<a href='/37'>#37</a> /var/www/html/core/Access.php(628): Piwik\Console->Piwik\{closure}()
<a href='/38'>#38</a> /var/www/html/core/Console.php(99): Piwik\Access::doAsSuperUser(Object(Closure))
<a href='/39'>#39</a> /var/www/html/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Piwik\Console->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
<a href='/40'>#40</a> /var/www/html/console(27): Symfony\Component\Console\Application->run()
<a href='/41'>#41</a> {main} 
@katebutler commented on June 20th 2019 Member

This exception is the "normal" behaviour when there is no data in the datatable. It seems silly that we would get so deep into the code before we notice this, so I'm adding a check much earlier in the process to fail gracefully when there is no data.

This Issue was closed on July 2nd 2019
Powered by GitHub Issue Mirror