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

Scheduler Error Missing parameter displayFormat #19047

Closed
justinvelluppillai opened this issue Apr 4, 2022 · 8 comments · Fixed by #19062
Closed

Scheduler Error Missing parameter displayFormat #19047

justinvelluppillai opened this issue Apr 4, 2022 · 8 comments · Fixed by #19062
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Milestone

Comments

@justinvelluppillai
Copy link
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.

@justinvelluppillai justinvelluppillai added Regression Indicates a feature used to work in a certain way but it no longer does even though it should. Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Apr 4, 2022
@justinvelluppillai justinvelluppillai added this to the 4.9.0 milestone Apr 4, 2022
@henri-hulski
Copy link

henri-hulski commented Apr 5, 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
Copy link
Member

sgiehl commented Apr 5, 2022

I guess before that error was actually kind of "silently" ignored. The error logging here:

$this->logger->error("Scheduler: Error {errorMessage} for task '{task}'",
['errorMessage' => $e->getMessage(), 'task' => $task->getName()]);

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
Copy link
Member

tsteur commented Apr 5, 2022

@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

@justinvelluppillai justinvelluppillai added Bug For errors / faults / flaws / inconsistencies etc. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Apr 5, 2022
@henri-hulski
Copy link

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@example
.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@example
.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
Copy link

Here as photo
Screenshot_20220406-015743

@sgiehl
Copy link
Member

sgiehl commented Apr 6, 2022

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
Copy link
Member

tsteur commented Apr 6, 2022

@sgiehl sounds good to me

@sgiehl
Copy link
Member

sgiehl commented Apr 7, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants