> Documentation index: https://sema4.ai/docs/llms.txt
> Web page: https://sema4.ai/docs/v3/task-engine/troubleshooting

# Fix common problems

What a failed robot run says, why it happens, and what to do.

**Audience:** builders, operators, and IT

> **Task Engine is in private preview.** To get access, [contact us](https://sema4.ai/contact-us/).

Start on the [robot run page](https://sema4.ai/docs/v3/task-engine/robot-runs.md).
Its title says why the run failed, **Artifacts** has `console.txt` and the robot's log, and **Timeline** shows which phase it stopped in.

## When a run fails

| The run page says                                    | What happened                                                        | What to do                                                                                                                                   |
| ---------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| **The robot stopped with an error**                  | The robot exited with an error code                                  | Read `console.txt` and the robot's log in **Artifacts**. Fix the robot, publish a new version, and rerun, or fix the items' data and resume. |
| **The run hit its time limit**                       | The robot was still running when the step's time limit was reached   | Check the robot's log for where it was. If the work is just slow, raise the step's **Time limit**, up to 24 hours.                           |
| **The worker went offline during the run**           | The worker stopped answering while the robot ran                     | Check the machine and its agent. Items it finished stay done. Check the others in the target system, then resume.                            |
| **The worker didn't start the run**                  | The worker was online but never reported starting the robot          | Check that the worker's agent is running and can reach your Sema4.ai address, then resume.                                                   |
| **The worker refused the run**                       | The worker received the run but declined it                          | Check the worker's agent version and its log on the machine. Nothing ran, so resume is safe.                                                 |
| **The worker was removed before it started the run** | An admin removed the worker                                          | Resume on another worker or group.                                                                                                           |
| **The run ended without saying how it went**         | The worker said the run finished but not whether the robot succeeded | Read `console.txt`. Check the items in the target system, then resume.                                                                       |
| **The workflow run was stopped**                     | Someone stopped the step or cancelled the work item                  | See who and why on the work item.                                                                                                            |

## When a step fails before any robot runs

| The step says                                                                | What to do                                                                                                                                                                                       |
| ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| No online worker available to dispatch to                                    | No worker the step may use is online. Start a worker, or point the step at a group with an online worker, then resume. A step waits only while its workers are busy, not while they are offline. |
| The robot didn't start. Robot automation isn't turned on for this workspace. | Task Engine is off for the workspace. Contact [Sema4.ai](https://sema4.ai/contact-us/).                                                                                                          |

## The robot's environment doesn't build

A worker builds a package's environment from `conda.yaml` the first time it runs that version.
When the build fails, the run fails in **Prepare environment**, and the error is in `console.txt`, above `rcc`'s own timeline.

- **A package can't be found or installed.** Check the versions in `conda.yaml`. Old `rpaframework` versions pin dependencies that newer Python releases no longer provide: build and run the package locally with the SDK first, and update the pins there.
- **The worker can't download packages.** The machine needs to reach your package sources, such as conda-forge and PyPI, or your mirrors. See [Network](https://sema4.ai/docs/v3/task-engine/workers.md#network).
- **The build is slow every time.** The first run of each version builds its environment, which can take several minutes. Later runs of the same environment reuse it. For machines without internet access, [pre-build environments](https://sema4.ai/docs/automation/rcc/pre-built-environments).

The Robocorp documentation covers `rcc` problems on the machine itself, such as [clearing the cache](https://sema4.ai/docs/automation/troubleshooting/rcc-clear-cache), [long paths on Windows](https://sema4.ai/docs/automation/troubleshooting/windows-long-path), and [SSL and proxies](https://sema4.ai/docs/automation/troubleshooting/firewall-and-proxies).

## The step keeps waiting

**Waiting for a worker** means every worker the step may use is busy with other work.
The step checks about once a minute and starts as soon as one is idle.

- Look at the group's workers on the **Workers** page: are they busy with long runs, or with other Workflows?
- Add workers to the group, or lower other steps' parallel runs.
- A step pinned to one worker waits for that worker only.

## A worker shows offline

A worker is offline when Sema4.ai hasn't heard from it for three minutes.

- Check that the machine is on and its agent is running: Setup Utility on Windows, or `robocorp-workforce-agent-core start` on macOS and Linux.
- Check that the machine can reach your Sema4.ai address over HTTPS, including WebSockets, through any proxy.
- If your Sema4.ai address changed, link the worker again.

## A desktop robot fails to sign in

See [When sign-in fails](https://sema4.ai/docs/v3/task-engine/windows-desktop.md#when-sign-in-fails).

## A robot can't read a secret or an asset

The robot's log names the refusal.

- **The name doesn't match.** Names are case sensitive, and a robot reads exactly the name in its code.
- **The secret has no value yet.** A secret created for a robot starts empty until someone enters its values.
- **It's in another workspace.** A robot reads the secrets and assets of the workspace it runs in.

## Resume is refused

- **The robots are still stopping.** Wait until the step's runs have ended.
- **The run is older than 90 days.** Its records are gone, so it can't be resumed. Rerun the work item from the start.
- **An agent step that started robots would run again.** Resume only from the robot step, or rerun the work item.

## A version won't publish

| Message                                                | Fix                                                                      |
| ------------------------------------------------------ | ------------------------------------------------------------------------ |
| Package is not a valid ZIP archive.                    | Build the ZIP again with the SDK or `rcc robot wrap`.                    |
| Package must contain robot.yaml or package.yaml.       | Put `robot.yaml` at the top level of the ZIP, not in a folder inside it. |
| Package manifest must declare a non-empty `tasks` map. | Declare at least one task in `robot.yaml`.                               |

A package larger than 100 MB is refused.
A package that publishes from GitHub refuses uploads and `rcc cloud push`.

> **Ask the assistant.**
> The Project's assistant, or your AI tool through [Bring your own builder](https://sema4.ai/docs/v3/byob.md), can read a failed run, its console output, and its items, and tell you what went wrong.
> Ask, for example, "Why did the ERP step fail on yesterday's work item?"
