1. Help Center
  2. Troubleshooting

My deployment keeps on failing in the "Get Working Directory" step. What do I do?

On some edge cases, in self-hosted agents, the deployment pod might experience issues during env0 state metadata. Here's how to take care of this issue

For this issue, we assume you are using a remote backend for managing your TF state.

Constant errors in "Get Working Directory" step in a self hosted agent usually mean that some stored state metadata was corrupted. If this issue happens to you, please try the following:

1. Update your agent to the latest version. See docs for more info

2. Run a new deployment with the following configuration:

2.1. "Approve plan automatically" - should be unchecked

2.2. Add ENV0_IGNORE_STATE environment variable, with the value "true"

3. Once the deployment is waiting for approval - Cancel it

4. Redeploy the environment again, and remove the ENV0_IGNORE_STATE variable