Source: https://nishanth-fern-test.docs-staging.pageloop.ai/web/debug-a-flow-failure

# Debug a Flow failure

If a Flow does not work as expected after launch, use Whatfix debugging commands to identify why a particular step failed.

You may need to debug a Flow failure in the following scenarios:

- [Flow does not run correctly](/web/flow-does-not-run-correctly)
- [Flow tooltip flickers or appears at different position](/web/flow-tooltip-flickers-or-appears-at-different-position)
- [Flow could not detect the element for the next step](/web/flow-couldnt-detect-the-element-for-the-next-step)
- [Flow steps skip while you run the Flow](/web/flow-steps-skip)

---

### Debug a Flow Failure

Follow these steps to debug a Flow failure:

1. Launch the Flow you want to debug.
2. Play the Flow until it fails.
3. Open your browser's [**Developer Tools**](https://developer.chrome.com/docs/devtools/open). ![debug\_flow\_devtools.png](/images/7a/debug_flow_devtools-7a55c1bd.png)
4. Go to the **Console** tab. ![debug\_console.png](/images/68/debug_console-68068591.png)
5. Type the following command in the Console and press **Enter**:

```plaintext
_wfx_debug_finder('flow');
```

![debug\_flow\_finder.png](/images/d8/debug_flow_finder-d8b739b3.png)

Info

The **\_wfx\_debug\_finder();** command returns debug logs for all content loaded on the page. To view logs for a specific content type, specify the content type as a parameter in the command.

1. Click **Finder Summary Logs** to expand the details. ![debug\_flow\_steps.png](/images/53/debug_flow_steps-5328749e.png)

The output displays the Flow ID and step numbers in the following format: **\<Flow ID>:\<Step Number>**.
2\. Click the failed step number to view its details. ![debug\_flow\_failed\_step.png](/images/2e/debug_flow_failed_step-2e380367.png)

The step object contains fields that help you identify the cause of the Flow failure.

---

### Determine Whether a Flow Step Succeeded or Failed

Check the **result** field to determine whether the step succeeded or failed. ![debug\_flow\_result.png](/images/37/debug_flow_result-37308263.png)

---

### View a Summary of the Failure

Check the **customer\_facing\_reason** field to view a summary of the issue and a recommended resolution. ![debug\_flow\_customer\_reasons.png](/images/28/debug_flow_customer_reasons-1-284e0de7.png)

This field contains the following sub-fields:

- **failure\_reason:** Identifies the reason the step failed.
- **possible\_action**: Recommends an action to resolve the issue.

The following table lists common failure reasons and their recommended actions:

| failure\_reason                                                                                                  | possible\_action                                                                            |
| ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| Display rules provided for the step failed to find the element.                                                  | Verify the display rule and update it if necessary.                                         |
| CSS Selector provided for the step failed to find the element.                                                   | Verify the CSS selector and update it if necessary.                                         |
| Step is not created on the page where the flow was played.                                                       | Check whether previous steps navigate to the correct page before the failed step.           |
| Smart Detect configuration issue. The trusted HTML property defined in the configuration could not be found.     | Contact Support for help fine-tuning the Smart Detect configuration.                        |
| Whatfix cannot find the original element that was selected when the content was created.                         | Ensure that the element is visible to users and verify that the Flow navigation is correct. |
| Whatfix could not find the element because one or more properties captured during content creation have changed. | Reselect the element to resolve the issue.                                                  |

---

### View Information About a Flow Step

Check the **step\_info** field. ![debug\_flow\_step\_info.png](/images/25/debug_flow_step_info-259cf642.png)

This field contains the following sub-fields:

- **element\_tag:** The HTML tag of the element the Flow step is latched to.
- **flow\_title:** The title of the Flow.
- **is\_step\_optional:** Indicates whether the Flow step is [optional](/web/defining-a-step-as-optional) or not.

## Related

- [Why do I get a Flow Failure email when the Flow is running properly?](/web/why-do-i-get-flow-failure-email-even-when-the-flow-is-running-properly)
