Terminal Session : There was an error connecting to terminal. Error code: Error

Why is this problem?


What emulator are you using to connect to the terminal? And what is the terminal - TN3270 or TN5450?
In the below link, please check if the emulator you are using is in the list of supported providers.


1 Like

It is AS400

Getting the same error. Anyone aware of any possible fix?


Is there any fix for this issue?
I’m also getting this error when configure the connection.

I do check, my emulator is supported. I’m using TN5250.



I had the same issue. Please check AppLocker logs in Event Viewver.
I had to create an additional rule for UiPath to run. UiPath hides .exe and .dll on user temp directory.

Kind regards,

Hi Alex @fahuet can you please explain me which additional rule did you create? I can´t see any event in the event viewer.



Hi Martin,

If you can’t see any event in event viewer, please call your Windows administrator because event viewer lists can be blocked by GPO.

I have a local admin account, so I can check what happens on my computer.

Kind regards,

Hi @zhulong644,
Reproduce the same error again.
Go to the Task Manager-> Processes->
Stop the process named: UiPath.Terminal.Host

Logout from the terminal application manually, if opened and click on disconnect.
Try connecting again.


Please try this solution.

For AS400, its recommended to use IBM EHHLAPI method. Try that.

am trying that method and gave the dll argument averything perfectly but still the work flow opens the terminal using hte paramters i gave by using “open window” activity but this terminal session is not connecting to that existing/just opened termninal…

when i give something inside the “do” block of the terminal session , say one mesage box, its coming. so that should mean that terminal session is connected to an existing session , in that case how can ise the set filed nad get field activities. i mean
once the existing windows is attached atutomatically ui path should take the session rite ? and all these activities like set feild get feild should mean something in the “existing session” but in my case its like a separate window!! seems ui path is not connected to it. but am not getting any error either!!!

1 Like

finally i connected like this, i was able to establish
even the session in the dedsign mode. when i ran the same work flow it threw this error… any ideas ??
type: used : ui path internal

Hi @karges,
Please try this:

Basically this type of error comes when the terminal is closed unexpectedly. You should have only one terminal session activity through out the workflow.

as you can see no existing process is there of the type ui path.terminal.activities
“ui parth terminal” type of connection is working fine when i drag and drop and give the ip adress. i can see even the terminal
but when i run that its not coming. its throwing rhr exception as i said.

Use UiPath Internal option in Terminal Session. In Address field type the Server IP. It will work.

@karges, Hope you are doing well.
I need these following details:

  1. Which method you are using to connect.
  2. I cant see the AS400 application opened in the screenshot.
  3. If you are using EHLLAPI method, you have to open the terminal application manually or using Uipathin order to communicate from Uipath.
  4. You have to use UI Automation to launch the terminal application, may be by creating a shortcut and try to launch. Fill the credentials in the first small popup. then you can communicate.

Suggestion: Try to open the application and run the artifact/workflow.


1 Like

I am facing same issue with IBM PCom. any idea why its happening.