@justinvelluppillai opened this Issue on April 4th 2022 Contributor

We're getting a few errors from a demo cron task with the below message:

ERROR [2022-04-04 04:18:27] 366279 Scheduler: Error Missing parameter : displayFormat for task 'Piwik\Plugins\ScheduledReports\API.sendReport_50'

It looks like a recent bug maybe introduced with Matomo 4.8.0.

Be good to see if we can reproduce this issue and find the cause or any recent merges that are relevant.

@henri-hulski commented on April 5th 2022

I can confirm.
After last update I get mails with an error message like

ERROR [2022-04-05 00:05:18] 
2906292  Scheduler: 
Error Missing parameter : 
displayFormat for task 
'Piwik\Plugins\ScheduledReports\API.sendReport_2'
@sgiehl commented on April 5th 2022 Member

I guess before that error was actually kind of "silently" ignored. The error logging here:
https://github.com/matomo-org/matomo/blob/f20c4cbed3de7f3fcc49810d5721b257d5a56d43/core/Scheduler/Scheduler.php#L312-L313
has been added in #18335

@justinvelluppillai @henri-hulski are you able to look up the configuration for the failing report. Would be good to know the configured parameters and type for the report. You can look that up in the database table matomo_report

@tsteur commented on April 5th 2022 Member

@sgiehl I can provide this information as I've noticed this error too but was waiting for it to appear more often before creating the bug.

It looks like below

image
@henri-hulski commented on April 5th 2022

Here is the content of matomo_report:

Baza danych: piwik_db, Tabela: piwik__report, Zamiar: Przesyłanie danych
idreport idsite login description idsegment period hour type format reports parameters ts_created ts_last_sent deleted evolution_gr
aph_within_
period
evolution_gr
aph_period_
n
period_para
m
idreport idsite login description idsegment period hour type format reports parameters ts_created ts_last_sent deleted evolution_gr
aph_within_
period
evolution_gr
aph_period_
n
period_para
m
1 2 henri<a class='mention' href='https://github.com/example'>@example</a>
.com
Einträge von
registrierten
Benutzern
monatlich
1 month 0 email pdf ["MultiSites_get
All","VisitsSum
mary_get","Acti
ons_getPageTitl
es","UserCountr
y_getCountry","
UserCountry_ge
tRegion","User
Country_getCit
y","CustomVari
ables_getCusto
mVariables","Vi
sitorInterest_ge
tNumberOfVisit
sPerVisitDuratio
n","VisitorIntere
st_getNumberO
fVisitsPerPage",
"VisitorInterest_
getNumberOfVi
sitsByVisitCoun
t","VisitorIntere
st_getNumberO
fVisitsByDaysSi
nceLast","VisitF
requency_get",
"DevicesDetecti
on_getType","D
evicesDetection
_getOsFamilies"
,"DevicesDetect
ion_getOsVersi
ons","DevicesD
etection_getBro
wserFamilies","
DevicesDetecti
on_getBrowser
Versions","User
Settings_getRe
solution","Devic
esDetection_ge
tBrowsers","De
vicesDetection_
getBrowserVers
ions","DevicesD
etection_getOs
Versions","Devi
cesDetection_g
etType","UserS
ettings_getLang
uage"]
{"displayForma
t":"1","emailMe
":true,"evolutio
nGraph":false}
2013-12-24
18:30:51
2014-02-02
10:03:37
1 0
2 2 henri<a class='mention' href='https://github.com/example'>@example</a>
.com
Alle Besucher
monatlich
month 22 email pdf Array Array 2013-12-24
18:35:20
2016-10-02
00:34:17
0 0
Powered by TCPDF (www.tcpdf.org) Numer strony: 1/1 06 Kwi 2022, 01:49
@henri-hulski commented on April 5th 2022

Here as photo
Screenshot_20220406-015743

@sgiehl commented on April 6th 2022 Member

Ok. It seems both have broken reports configured. The reports & parameters columns should contain a json configuration. For some reason some of the records contain Array. I can't remember but seems we had a bug there somewhen in the past and saving a report didn't work correctly. All records were last sent in 2016, so guess the problem is a bit older.
As mentioned in my previous comment, the error was simply hidden before, but now those broken records are reported.

@tsteur I think we should simply add an update script and remove all records where reports or parameters are set to Array. Those records can't work anyway.

@tsteur commented on April 6th 2022 Member

@sgiehl sounds good to me

@sgiehl commented on April 7th 2022 Member

Will set up a quick PR for that. Moving back to 4.10.

This Issue was closed on April 12th 2022
Powered by GitHub Issue Mirror