-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
What happened?
Last week I updated my matomo instance from 5.7.1 to 5.8.0 using dockerhub matomo image, the matomo is running on Kubernetes version 1.34.2
The last visit graph was empty since the update (05/03) :
After investigations I discovered that archive tasks failed when running this command :
. /opt/bitnami/scripts/matomo-env.sh \ && . /opt/bitnami/scripts/libbitnami.sh \ && . /opt/bitnami/scripts/liblog.sh \ && /opt/bitnami/scripts/apache/setup.sh \ && /opt/bitnami/scripts/php/setup.sh \ && /opt/bitnami/scripts/mysql-client/setup.sh \ && /opt/bitnami/scripts/matomo/setup.sh \ && /post-init.sh \ && /opt/bitnami/php/bin/php /opt/bitnami/matomo/console core:archive
The associated error :
`matomo 11:37:52.60 INFO ==> Configuring the HTTP port
matomo 11:37:52.61 INFO ==> Configuring the HTTPS port
matomo 11:37:52.62 INFO ==> Configuring Apache ServerTokens directive
matomo 11:37:52.65 INFO ==> Configuring PHP options
matomo 11:37:52.66 INFO ==> Setting PHP expose_php option
matomo 11:37:52.68 INFO ==> Setting PHP output_buffering option
matomo 11:37:52.70 INFO ==> Validating settings in MYSQL_CLIENT_* env vars
matomo 11:37:52.82 INFO ==> Persisted Matomo installation detected
matomo 11:37:52.82 INFO ==> Updating Matomo files in persisted data
matomo 11:37:57.07 INFO ==> Restoring Matomo installation
matomo 11:37:57.09 INFO ==> Trying to connect to the database server
matomo 11:37:57.17 INFO ==> Launching schema update
Everything is already up to date.
Done. To check if this worked please open the system report or run ./console diagnostics:run
and look out for the private directories check. If it doesn't work you may need to execute
this command using a user that has write permissions or maybe you are not using Apache or IIS
web server. Please note you may need to execut this command every time you update Matomo to a newer version.
matomo 11:37:59.43 WARN ==> Skipping cron configuration for Matomo because of running as a non-root user
INFO [2026-03-09 11:38:00] 436 ---------------------------
INFO [2026-03-09 11:38:00] 436 INIT
INFO [2026-03-09 11:38:00] 436 Running Matomo 5.8.0 as Super User
INFO [2026-03-09 11:38:00] 436 ---------------------------
INFO [2026-03-09 11:38:00] 436 NOTES
INFO [2026-03-09 11:38:00] 436 - Async process archiving supported, using CliMulti.
INFO [2026-03-09 11:38:00] 436 - Reports for today will be processed at most every 3600 seconds.
INFO [2026-03-09 11:38:00] 436 You can change this value in Matomo UI > Settings > General Settings.
INFO [2026-03-09 11:38:00] 436 - Archiving was last executed without error 3 hours 51 min ago.
INFO [2026-03-09 11:38:00] 436 ---------------------------
INFO [2026-03-09 11:38:00] 436 START
INFO [2026-03-09 11:38:00] 436 Starting Matomo reports archiving...
INFO [2026-03-09 11:38:00] 436 1 out of 3 archivers running currently
INFO [2026-03-09 11:38:00] 436 Start processing archives for site 1.
INFO [2026-03-09 11:38:00] 436 Will invalidate archived reports for today in site ID = 1's timezone (2026-03-09 00:00:00).
INFO [2026-03-09 11:38:00] 436 Will invalidate archived reports for yesterday in site ID = 1's timezone (2026-03-08 00:00:00).
ERROR [2026-03-09 11:38:03] 436 Got invalid response from API request:
?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2026-03-09&format=json&trigger=archivephp
Response was:
{"result":"error","message":"Undefined constant Piwik\Plugins\BotTracking\Metrics::METRIC_AI_ASSISTANTS_UNIQUE_PAGE_URLS
on /bitnami/dbuser/plugins/BotTracking/RecordBuilders/AIAssistantReports.php(59) ..."}
INFO [2026-03-09 11:38:03] 436 Skipped Archiving website id 1, period = day, date = 2026-03-09, segment = '', 0 visits found. Time elapsed: 2.715s
ERROR [2026-03-09 11:38:05] 436 Got invalid response from API request:
?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2026-03-09&format=json&trigger=archivephp
Response was:
{"result":"error","message":"Undefined constant Piwik\Plugins\BotTracking\Metrics::METRIC_AI_ASSISTANTS_UNIQUE_PAGE_URLS
on /bitnami/dbuser/plugins/BotTracking/RecordBuilders/AIAssistantReports.php(59) ..."}`
Seems this is related to BotTracking plugin which is not refer METRIC_AI_ASSISTANTS_UNIQUE_PAGE_URLS into matomo/plugins/BotTracking/Metrics.php
https://github.com/matomo-org/matomo/blob/5.8.0/plugins/BotTracking/Metrics.php
Which was the case in 5.7.1 version :
https://github.com/matomo-org/matomo/blob/5.7.1/plugins/BotTracking/Metrics.php
It seems related to this commit : 6d37d94#diff-ae00ae1d1d55934b79bdef91a31d648de491ccc59c66eaed73ba6daafaaef560
I deactivated BotTracking plugin and now archive tasks are running well
What should happen?
Archive tasks should run without error
How can this be reproduced?
You can just run this command into matomo 5.8.0 container image :
. /opt/bitnami/scripts/matomo-env.sh \ && . /opt/bitnami/scripts/libbitnami.sh \ && . /opt/bitnami/scripts/liblog.sh \ && /opt/bitnami/scripts/apache/setup.sh \ && /opt/bitnami/scripts/php/setup.sh \ && /opt/bitnami/scripts/mysql-client/setup.sh \ && /opt/bitnami/scripts/matomo/setup.sh \ && /post-init.sh \ && /opt/bitnami/php/bin/php /opt/bitnami/matomo/console core:archive
Matomo version
5.8.0
PHP version
8.4.18
Server operating system
No response
What browsers are you seeing the problem on?
No response
Computer operating system
No response
Relevant log output
ERROR [2026-03-09 11:38:05] 436 Got invalid response from API request:
?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2026-03-09&format=json&trigger=archivephp
Response was:
{"result":"error","message":"Undefined constant Piwik\\Plugins\\BotTracking\\Metrics::METRIC_AI_ASSISTANTS_UNIQUE_PAGE_URLS
on /bitnami/dbuser/plugins/BotTracking/RecordBuilders/AIAssistantReports.php(59) ..."}`Validations
- Read our Contributing Guidelines.
- Follow our Security Policy.
- Check that there isn't already an issue that reports the same bug to avoid creating duplicates.
- The provided steps to reproduce is a minimal reproducible of the Bug.