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 ?

Thanks
#nK

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 ?

Thanks
#nK

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:

Hi, I am having the same issue. Randomly.

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)

Only way around this was to use a global handler and keep retrying.

Hi,

There are two reasons.

If it is failing at any random activity of Mainframe, then increase timeout from 300 MS to 1000MSat each activity .

If Mainframe is disabled at particular index and BOT is trying to send keys at that coordinates. then It is throwing this error: Keyboard Locked. I have handle this exception but, the problem is after handle it in try catch, in other terminal activity it is throwing Timeout error. This looks like bug with UiPath emulator Direct Connect. Because it works fine with other third party emulator.