Send Keys: Terminal error: KeyboardbLocked

Hi All ,

I am trying to automate mainframe screens and many times automation fails with error

Send Keys: Terminal error: KeyboardbLocked
RemoteException wrapping System.Exception: Terminal error: KeyboardbLocked
at UiPath.Terminal.Activities.TerminalSession.OnFaultedCallback(NativeActivityFaultContext faultContext, Exception exception, ActivityInstance source)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Any suggession how to fix this error ?

Is this an activity from the Terminal Package ?

yes , it is from terminal package

Hey @shraddha_joshi

Could you please show a snap of your workflow like how are you doing it ?


I am using set field at position , send control key , move cursor activities

Right now the automation is failing randomly at any activity with error KeyboardbLocked

If it got failed at any specific activity we could fix it but it gets failed at any random point which is strange part of it.

Okay got it, It’s not about Send keys then.

So is there anything which makes the terminal screen locked even if you can think of something manually ?

Just trying to understand the behavior manually.

no , manually it works fine screen doesnt get locked , it only happens while running automation

I’ve done tons of terminal automations and haven’t seen this error one time. I suggest talking to your mainframe admins to see if they can tell you what the error means and what is causing it. It could be something to do with the way you have your connection configured, emulation, etc.

Hey @shraddha_joshi

Can you please try debugging it step by step slowly ?


Hello @shraddha_joshi

Is it happening always at the same activity or is it changing for each execution?
Also can you please confirm enough delay is provided in the workflow.

its changing and happens randomly at any activity.

I have added enough delay at each step .

Tried debug , getting issue there as well

Issue is fine but is it still random or ?

yes its random

What’s your terminal platform provider please ?

Hi @shraddha_joshi

Any chance you could provide some steps to reliably reproduce the issue? :slight_smile: