agent troubleshooting.md

Agent Troubleshooting

Cannot run because no agents are defined

When starting a flow from the Flows panel or the Scheduler, Leapwork shows this message because no Execution Agent is configured or assigned.

Note: Preview mode (Run from the Flow editor) uses your local display and does not require an agent.

Possible solutions

How to verify it's fixed

If the issue persists, contact Priority Support with screenshots, how you launched the run (Flows panel or Scheduler), and timestamps.

"Unknown host" while running a test case

When starting a run, Leapwork shows "Unknown host." This usually means either the hostname is unreachable or the hostname in the selected Environment/Agent settings is incorrect.

Possible solutions

How to verify it's fixed

  1. In Environment/Agent settings, click Test connection → it should succeed.
  2. Re-run the test from the Flows panel/Scheduler → the run should start (Pending → Running) without the "Unknown host" error.

If the issue persists, contact Priority Support with your hostname, test time, and how you launched the run.

Could not connect on port 6777 when adding/testing an Environment

The Controller can't reach the Agent on TCP 6777 (default Controller↔Agent port). Common causes: the Leapwork Agent service isn't installed/running, firewall blocks 6777, the Agent machine is offline, or the port/host is misconfigured.

Possible solutions

How to verify it's fixed

  1. In Environment settings, click Test connection → it should succeed.
  2. From the Controller machine, optionally run Test-NetConnection <host> -Port 6777 (or telnet <host> 6777) → should report open.
  3. Run a small flow on that Agent → status moves Pending → Running without the 6777 error.

If the issue persists, contact Priority Support with screenshots, timestamps, and the affected Environment/host.

Your Remote Desktop Services session has ended

You see this message when:

Result: you get a login screen instead of live video; Web tests may run, but Desktop UI and Image & Text Recognition tests fail.

Possible solutions

How to verify it's fixed

  1. In the Environment, click Test connection → it should succeed and stay connected.
  2. Start a desktop test → you should see live video (no login screen).
  3. Confirm Desktop UI and Image/Text Recognition cases execute without the RDS-ended error.

Leapwork Flow is not able to connect to Agent

After a Leapwork code-signing certificate update, some Windows machines, especially offline/firewalled ones, may fail to connect to Agents or show very slow Agent startup. Windows hasn't refreshed certificate trust lists (CTLs), causing the handshake to stall.

Possible solutions

  1. Open Local Group Policy Editor (gpedit.msc).
  2. Computer Configuration → Windows Settings → Security Settings → Public Key Policies.
  3. Certificate Path Validation Settings → Network Retrieval tab.
  4. Define these policy settings → clear "Automatically update certificates in the Microsoft Root Certificate Program (recommended)".
  5. Apply/OK.

Apply this only to machines without Internet access.

How to verify it's fixed

  1. Restart the Leapwork Agent → it should start promptly (no long delay).
  2. In Flow → Environments, click Test connection → Success.
  3. Run a small flow → status moves Pending → Running without connection errors.

If the issue persists, contact Priority Support with screenshots, timestamps, and affected machine details.

Black screen / "Agent Failed State - Could not connect to Remote agent"

On VMs or PCs with switchable graphics (Intel + NVIDIA/AMD), the Agent may fail to connect from Environments. You might see a black screen on Test connection or a popup saying "Could not connect on port 6777. Agent Failed State."

Possible solutions

  1. Use Intel graphics for LEAPWORK.Win.Agent.exe in the NVIDIA Control Panel or AMD Radeon Settings.
  2. Restart the Remote Agent service.
  3. Try the connection again from Leapwork → Environments.

How to verify it's fixed

Desktop UI - Virtual Desktop case fails on Windows Server / Windows 10 N / Windows 7

Desktop UI or Virtual Desktop runs fail immediately with Failed entries in action logs. This typically happens when Windows components required for desktop automation are missing or disabled.

Possible solutions

Windows Server

Windows 7

Windows 10 N

How to verify it's fixed

If the issue persists, contact Priority Support.

Incorrect password / wrong keys typed on Agent connection

You can log in to the Agent machine via RDP, but Leapwork shows "incorrect password." The likely cause is a keyboard layout mismatch: your local layout differs from the Agent machine's system layout, so characters entered at the login screen are mapped differently.

Possible solutions

How to verify it's fixed

Infinite mirrors when Preview points to Local Agent

While capturing images, the screen shows a hall-of-mirrors effect and the actual app isn't captured. This happens because, with Local Agent, Leapwork becomes the active window during capture.

Possible solutions

  1. Use Local (Display 1) for design/preview
  1. Use a Remote Agent to capture

How to verify it's fixed

Seeing a login screen when testing connection to my local Agent on a VM

On a VM where Flow, Controller, and Agent are installed, testing the Environment can show a login screen (and sometimes "Your Remote Desktop Services session has ended"). This happens when the same Windows user account is used both for your RDP session and for the Agent session; only one active desktop session is allowed.

Possible solutions

  1. Create another Windows user account. See how to do that here.
  2. Create a Remote Agent environment, filling in the hostname of the remote machine (with the Agent) and other relevant data.
  3. Click Test connection. You will see a choice of user accounts. Select the one you have just created and log in.

How to verify it's fixed

Not getting all display resolution options on the Remote Agent

When connecting to a Leapwork Remote Agent (often on VMs like VMware, Citrix, Hyper-V), fewer display resolutions are shown than in Remote Desktop. RDP and Leapwork use different technologies; the Agent can only offer resolutions exposed by the VM's virtual display/driver.

Possible solutions

  1. Ask your VM administrator to enable the required resolutions in the hypervisor settings for that VM.
  1. On the Agent machine, install/update the VM guest tools or display drivers (e.g., VMware Tools, Citrix VDA, Hyper-V guest services).
  2. Restart Windows on the Agent VM, then restart the Leapwork Agent service.
  3. Reopen the Environment editor and refresh the resolutions list.

How to verify it's fixed

If you still can't see the required resolutions on the Agent, contact your VM administrators---this is an environment configuration issue rather than a Leapwork issue.

Error when connecting to local Agent using localhost

When connecting to the Local Agent with the hostname "localhost," the connection may fail. This typically happens if the Leapwork Agent service is not running, or if localhost name resolution is not working correctly on the machine.

Possible solutions

  1. Check Leapwork Agent service
  1. Test localhost resolution

How to verify it's fixed

If the issue persists, contact Priority Support with details about the machine and the error message.

Can't schedule tests on my local Agent after switching to Windows authentication

From Leapwork version 2020.1 onwards, when Flow, Controller, and Agent are installed on the same machine, test scheduling fails if you rely on Windows authentication. This happens because Windows only allows one active user session per machine. When Flow is running under your active session, the Agent cannot start a second one for scheduled execution.

Possible solutions

  1. Reinstall Leapwork with Agent password authentication
  1. Use a separate machine for the Agent

How to verify it's fixed

If the problem persists after reinstalling with Agent password authentication or configuring a remote Agent, contact Priority Support with details of your installation and authentication settings.

What's the impact if the Agent screen is locked?

When the Agent machine's screen is locked during execution, the test outcome depends on the application type being automated. The lock interrupts video capture and, in some cases, the actual automation steps.

Possible outcomes

Possible solutions

How to verify it's fixed

If the issue continues, contact Priority Support for further assistance.