# WorkflowTaskFailed doesn't update (remains frozen wrt failure reason) making it a bit hard to debug

**URL:** <https://community.temporal.io/t/workflowtaskfailed-doesnt-update-remains-frozen-wrt-failure-reason-making-it-a-bit-hard-to-debug/13092>\
**Category:** Community Support\
**Created:** [August 7, 2024, 11:26am UTC](https://community.temporal.io/t/workflowtaskfailed-doesnt-update-remains-frozen-wrt-failure-reason-making-it-a-bit-hard-to-debug/13092 "2024-08-07T11:26:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ustulation](https://avatars.discourse-cdn.com/v4/letter/u/9de053/32.png) [@ustulation](https://community.temporal.io/u/ustulation)\
**Post date:** [August 7, 2024, 11:26am UTC](https://community.temporal.io/t/workflowtaskfailed-doesnt-update-remains-frozen-wrt-failure-reason-making-it-a-bit-hard-to-debug/13092/1 "2024-08-07T11:26:42Z")

</div>

Consider this workflow (I’m using python btw but I don’t think that should matter, so just writing pseudo-code):

```auto
do-activity-1
raise Exception('foo')
do-activity-2

```

So obviously, this is going to finish `activity-1` and result in `WorkflowTaskFailed` with reason being that exception `foo` was raised. The workflow task will keep getting retried.

Now change code to:

```auto
do-activity-1
raise Exception('bar')
do-activity-2

```

and redploy the worker. From the worker logs I can see that it’s now raising the new exception, but the UI doesn’t update the status of event history, it remains frozen at `WorkflowTaskFailed` with the reason that exception `foo` occurred which is no longer accurate. This is just an example but it makes troubleshooting a bit difficult by looking things up in the UI. It’s as-if the worker was running stale code and wasn’t updated.

Then even introduce non-determinism by changing the code to the following and redeploy the (only) worker:

```auto
do-activity-3
raise Exception('bar')
do-activity-2

```

Again from the worker logs, I can see it quits execution as soon as it sees divergence (expects `activity-1` to be completed by looking at event history but finds `activity-3` in its place in new code). So it immediately detects non-determinism and quits the current execution but the UI for the workflow remains frozen with just the original error that workflow-task failed due to exception `foo`.

Ofc if you now revert back to the 1st snippet and get rid of the exception, the worker now successfully completes the workflow, finishing `activity-2` too now, and the UI updates with all that and finally showing the workflow as completed.

However in the meantime, due to lack of updates it makes troubleshooting a bit difficult. Is this an expected behaviour?

---

<div class="post-metadata">

**Author:** ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)\
**Post date:** [August 7, 2024, 5:21pm UTC](https://community.temporal.io/t/workflowtaskfailed-doesnt-update-remains-frozen-wrt-failure-reason-making-it-a-bit-hard-to-debug/13092/2 "2024-08-07T17:21:24Z")

</div>

You make a good point. Would you file a GitHub issue about this?

---

<div class="post-metadata">

**Author:** ![ustulation](https://avatars.discourse-cdn.com/v4/letter/u/9de053/32.png) [@ustulation](https://community.temporal.io/u/ustulation)\
**Post date:** [August 8, 2024, 2:50am UTC](https://community.temporal.io/t/workflowtaskfailed-doesnt-update-remains-frozen-wrt-failure-reason-making-it-a-bit-hard-to-debug/13092/3 "2024-08-08T02:50:52Z")

</div>

Cheers, will do and link it here.

---

<div class="post-metadata">

**Author:** ![ustulation](https://avatars.discourse-cdn.com/v4/letter/u/9de053/32.png) [@ustulation](https://community.temporal.io/u/ustulation)\
**Post date:** [August 12, 2024, 11:33am UTC](https://community.temporal.io/t/workflowtaskfailed-doesnt-update-remains-frozen-wrt-failure-reason-making-it-a-bit-hard-to-debug/13092/4 "2024-08-12T11:33:08Z")

</div>

[Github issue raised](https://github.com/temporalio/ui/issues/2262).
