# Task showing as running ages after having successfully completed?

**URL:** <https://cylc.discourse.group/t/task-showing-as-running-ages-after-having-successfully-completed/759>\
**Category:** Cylc Support\
**Created:** [September 14, 2023, 3:03am UTC](https://cylc.discourse.group/t/task-showing-as-running-ages-after-having-successfully-completed/759 "2023-09-14T03:03:03Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonnyhtw](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jonnyhtw/32/232_2.png) [@jonnyhtw](https://cylc.discourse.group/u/jonnyhtw)\
**Post date:** [September 14, 2023, 3:03am UTC](https://cylc.discourse.group/t/task-showing-as-running-ages-after-having-successfully-completed/759/1 "2023-09-14T03:03:03Z")

</div>

hi there,

i’m using `cylc` 8.2.1 and UI version 2.0.0 and i’m often getting the situation where the UI shows a task as running when it has already finished. for example…

```auto
> cylc log u-cy821//19780901T0000Z/install_ancil_lfric|tail -1
2023-09-14T02:18:08Z INFO - succeeded

```

but…

![image](https://global.discourse-cdn.com/free1/uploads/cylc1/original/1X/93eb6180856a014dcb38d5108e245f9ac708c80e.png)

it shows the right graph when i reload the webpage.

bizarrely not even polling the task works!

cheers,

jonny

---

<div class="post-metadata">

**Author:** ![hilary.j.oliver](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/hilary.j.oliver/32/4_2.png) [@hilary.j.oliver](https://cylc.discourse.group/u/hilary.j.oliver)\
**Post date:** [September 14, 2023, 3:29am UTC](https://cylc.discourse.group/t/task-showing-as-running-ages-after-having-successfully-completed/759/2 "2023-09-14T03:29:25Z")

</div>

I think that’s a UI bug that we’re aware of, and possibly have fixed already (for the next release).

> it shows the right graph when i reload the webpage.

… which tends to support that conclusion.

Next time it happens, can you check the tree and table views as well - does it appear there too?

Polling the task won’t correct it, because the scheduler already has the correct state, as evidenced by your log message.

---

<div class="post-metadata">

**Author:** ![jonnyhtw](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jonnyhtw/32/232_2.png) [@jonnyhtw](https://cylc.discourse.group/u/jonnyhtw)\
**Post date:** [September 14, 2023, 3:32am UTC](https://cylc.discourse.group/t/task-showing-as-running-ages-after-having-successfully-completed/759/3 "2023-09-14T03:32:25Z")

</div>

ah ok good to know thanks, i’ll take a look at the other views when/if it happens again.

i’ve learned something about polling haha.

---

<div class="post-metadata">

**Author:** ![jonnyhtw](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jonnyhtw/32/232_2.png) [@jonnyhtw](https://cylc.discourse.group/u/jonnyhtw)\
**Post date:** [September 14, 2023, 3:34am UTC](https://cylc.discourse.group/t/task-showing-as-running-ages-after-having-successfully-completed/759/4 "2023-09-14T03:34:53Z")

</div>

ok it happened again. the bug persists on the table view (and graph) but not in the tree view. 🤪

---

<div class="post-metadata">

**Author:** ![hilary.j.oliver](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/hilary.j.oliver/32/4_2.png) [@hilary.j.oliver](https://cylc.discourse.group/u/hilary.j.oliver)\
**Post date:** [September 14, 2023, 3:42am UTC](https://cylc.discourse.group/t/task-showing-as-running-ages-after-having-successfully-completed/759/5 "2023-09-14T03:42:23Z")

</div>

> [@jonnyhtw](#):
>
> i’ve learned something about polling haha.

Yep, polling tells the scheduler to go check that a job really is doing what it (the scheduler) thinks it is doing. Sometimes required after network glitches and the like, that prevent job status messages from coming back.

In your case, the scheduler already has it right, but the UI (or the datastore that feeds it) has not done its housekeeping properly.

> the bug persists on the table view (and graph) but not in the tree view. 🤪

That makes sense. The table and graph views subscribe to the same data updates; the tree is different. You should treat the tree view as the definitive source of truth for the moment, if you see something fishy.

---

<div class="post-metadata">

**Author:** ![MetRonnie](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/metronnie/32/125_2.png) [@MetRonnie](https://cylc.discourse.group/u/MetRonnie)\
**Post date:** [September 14, 2023, 9:27am UTC](https://cylc.discourse.group/t/task-showing-as-running-ages-after-having-successfully-completed/759/6 "2023-09-14T09:27:34Z")

</div>

If you see this again, can you try opening the browser developer tools (normally by `Ctrl+Shift+I`) and seeing if there are any red error messages in the console? That will help us differentiate between what might be two similar bugs

---

<div class="post-metadata">

**Author:** ![jonnyhtw](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jonnyhtw/32/232_2.png) [@jonnyhtw](https://cylc.discourse.group/u/jonnyhtw)\
**Post date:** [September 14, 2023, 11:40pm UTC](https://cylc.discourse.group/t/task-showing-as-running-ages-after-having-successfully-completed/759/7 "2023-09-14T23:40:31Z")

</div>

got it, good to know that the tree view is the one to rely on.

---

<div class="post-metadata">

**Author:** ![jonnyhtw](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jonnyhtw/32/232_2.png) [@jonnyhtw](https://cylc.discourse.group/u/jonnyhtw)\
**Post date:** [September 14, 2023, 11:40pm UTC](https://cylc.discourse.group/t/task-showing-as-running-ages-after-having-successfully-completed/759/8 "2023-09-14T23:40:57Z")

</div>

will do @MetRonnie, never seen/used that before!

---

<div class="post-metadata">

**Author:** ![jonnyhtw](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jonnyhtw/32/232_2.png) [@jonnyhtw](https://cylc.discourse.group/u/jonnyhtw)\
**Post date:** [September 29, 2023, 4:43am UTC](https://cylc.discourse.group/t/task-showing-as-running-ages-after-having-successfully-completed/759/9 "2023-09-29T04:43:19Z")

</div>

@MetRonnie it’s happened again for the circled task, here’s the `ctrl+shift+i` output. can’t see anything obvious but then again i’ve never looked at this output before, cheers

 ![image](https://global.discourse-cdn.com/free1/uploads/cylc1/original/1X/d24a2ac1311e86b9bd2cd1b382bcaabd404fc22a.png)

---

<div class="post-metadata">

**Author:** ![MetRonnie](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/metronnie/32/125_2.png) [@MetRonnie](https://cylc.discourse.group/u/MetRonnie)\
**Post date:** [October 2, 2023, 10:34am UTC](https://cylc.discourse.group/t/task-showing-as-running-ages-after-having-successfully-completed/759/10 "2023-10-02T10:34:27Z")

</div>

Ah, when you open the devtools please click on the “Console” tab. From the red icon it looks there were 13 errors reported so it looks like one particular bug but would need to see the error messages to know for sure

---

<div class="post-metadata">

**Author:** ![jonnyhtw](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jonnyhtw/32/232_2.png) [@jonnyhtw](https://cylc.discourse.group/u/jonnyhtw)\
**Post date:** [October 3, 2023, 11:02pm UTC](https://cylc.discourse.group/t/task-showing-as-running-ages-after-having-successfully-completed/759/11 "2023-10-03T23:02:41Z")

</div>

ah ok will do!

cheers

---

<div class="post-metadata">

**Author:** ![jonnyhtw](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jonnyhtw/32/232_2.png) [@jonnyhtw](https://cylc.discourse.group/u/jonnyhtw)\
**Post date:** [October 6, 2023, 3:39am UTC](https://cylc.discourse.group/t/task-showing-as-running-ages-after-having-successfully-completed/759/12 "2023-10-06T03:39:08Z")

</div>

here you go @MetRonnie !

 ![image](https://global.discourse-cdn.com/free1/uploads/cylc1/original/1X/3f7b02bf9d0a544f9d32976926a346df234a3fa7.png)

---

<div class="post-metadata">

**Author:** ![MetRonnie](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/metronnie/32/125_2.png) [@MetRonnie](https://cylc.discourse.group/u/MetRonnie)\
**Post date:** [October 6, 2023, 8:43am UTC](https://cylc.discourse.group/t/task-showing-as-running-ages-after-having-successfully-completed/759/13 "2023-10-06T08:43:59Z")

</div>

Sorry maybe I wasn’t clear - it’s only the red error messages we need to look at (the yellow warnings are known about and don’t actually cause any problems)

---

<div class="post-metadata">

**Author:** ![jonnyhtw](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jonnyhtw/32/232_2.png) [@jonnyhtw](https://cylc.discourse.group/u/jonnyhtw)\
**Post date:** [October 9, 2023, 11:07pm UTC](https://cylc.discourse.group/t/task-showing-as-running-ages-after-having-successfully-completed/759/14 "2023-10-09T23:07:10Z")

</div>

ok i think i’ve got them now haha

 ![image](https://global.discourse-cdn.com/free1/uploads/cylc1/original/1X/d02ba131016091061f2a4f8d54cd45c6f677c808.png)

 ![image](https://global.discourse-cdn.com/free1/uploads/cylc1/original/1X/dab1a55521b4b23611f4eea62830b8c59da41d5d.png)

hth

---

<div class="post-metadata">

**Author:** ![MetRonnie](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/metronnie/32/125_2.png) [@MetRonnie](https://cylc.discourse.group/u/MetRonnie)\
**Post date:** [October 10, 2023, 9:56am UTC](https://cylc.discourse.group/t/task-showing-as-running-ages-after-having-successfully-completed/759/15 "2023-10-10T09:56:28Z")

</div>

Thanks, that’s useful to see. The first error looks like it’s the same bug as [TypeError during pruning causes tasks to be left behind as running when they have actually succeeded · Issue #1470 · cylc/cylc-ui · GitHub](https://github.com/cylc/cylc-ui/issues/1470)

As for the subsequent Websocket errors, did you shut down your UIServer before taking this screenshot? Because that is normal in that case (there is no longer anything for the UI to communicate with)

---

<div class="post-metadata">

**Author:** ![jonnyhtw](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jonnyhtw/32/232_2.png) [@jonnyhtw](https://cylc.discourse.group/u/jonnyhtw)\
**Post date:** [October 10, 2023, 10:50pm UTC](https://cylc.discourse.group/t/task-showing-as-running-ages-after-having-successfully-completed/759/16 "2023-10-10T22:50:20Z")

</div>

hey @MetRonnie

yes it does look similar to the other issue you link to there. i’ve also seen arrows disappearing multiple times in various workflows.

the your other question, the web UI was active the whole time.

cheers,

jonny
