Javascript errors on Tasks page with Foreman 1.24.1/Katello 3.14.0

Problem:
Loading the Foreman Tasks page leads to a blank page. Javascript errors can be seen in the console.
Expected outcome:
Foreman Tasks page should show the current/old tasks
Foreman and Proxy versions:
1.24.1
Foreman and Proxy plugin versions:
Katello 3.14.0
Distribution and version:
CentOS 7.7
Other relevant data:
Uncaught (in promise) {rejected: true, message: {…}}
Promise.then (async)
(anonymous) @ content-script.js:89
Promise.then (async)
(anonymous) @ content-script.js:61
react-dom.production.min.js:187 TypeError: Cannot read property ‘replace’ of null
at foreman-tasks-9de90616613ba2fa3547.js:1
at Array.map ()
at Array. (seamless-immutable.development.js:132)
at t.selectResults (foreman-tasks-9de90616613ba2fa3547.js:1)
at Function.mapToProps (foreman-tasks-9de90616613ba2fa3547.js:1)
at r (wrapMapToProps.js:41)
at f (selectorFactory.js:44)
at selectorFactory.js:63
at Object.run (connectAdvanced.js:21)
at s.l.onStateChange (connectAdvanced.js:199)

Out of interest, I only get the blank page for the page with no filters. If I follow a link from the dashboard to Foreman Tasks with a filter I can look at tasks.

Which version of the tasks plugin are you using?

Looking at the source code, it looks to me like you may have a task in the list that has no action and no label which is causing this line to fail.
As a workaround, could you try finding this task using the API or Hammer and removing it? Also, please open a bug report on projects.theforeman.org under the tasks plugin project so we can fix it properly.

tfm-rubygem-foreman-tasks-0.17.5-1.fm1_24.el7.noarch

Looking in hammer I see:

-------------------------------------|------------------------------------------------------------------|-----------|---------|---------------------|---------------------|---------------|------------
ID                                   | ACTION                                                           | STATE     | RESULT  | STARTED AT          | ENDED AT            | OWNER         | TASK ERRORS
-------------------------------------|------------------------------------------------------------------|-----------|---------|---------------------|---------------------|---------------|------------
f8399e53-b1a2-445c-937f-315d0601d711 |                                                                  | pending   | success |                     |                     |               |

https://projects.theforeman.org/issues/28748

2 Likes