Error occurs during processing with UiPath.Terminal.Activities

Thank you for your time.

The processing that uses Terminal Activities is managed as a library, and the library is placed in the Process.xaml of REFramework.
Occasionally, the processing stops halfway through, and a System.NullReferenceException occurs.
I thought that an error might occur because I am using TerminalSession in a patchwork manner, but it also occurs in the middle of the TerminalSession scope.
If there is a way to avoid this problem, please let me know.
(Even if I implement a retry scope, it is meaningless.)

Environment

UiPath Studio 23.04
UiPath.Terminal.Activities Ver2.7.0
Provider: EHLLAPI With IBM i Access Client Solutions
EHLL dll: C:\Program Files (x86)\IBM\EHLLAPI\EHLAPI32.dll
EHLL func: hllapi
EHLL Encoding: shift_jis
EHLL enhanced: No
Basic mode: No
Run in process: No

Project: VB (Windows modern)

Error log

18:44:30.2667 info IpcClient called ConnectionChanged 0 UiPath.Terminal.HostService_14284 59817589.
18:44:30.3262 warn EhllapiWrapper.CallEhllApi(1) returned 9
18:44:30.3262 error EhllBridge.Attach error: SystemError
18:44:30.3262 info TerminalHostAssemblyResolver: got request to resolve UiPath.Terminal.resources, 2.7.0.0
18:44:30.3262 info TerminalHostAssemblyResolver: attempting to locate resource assembly UiPath.Terminal.resources in C:\Users\xxx.nuget\packages\uipath.terminal.activities\2.7.0\host\net6.0-windows7.0\ja-JP\UiPath.Terminal.resources.dll
18:44:30.3515 error System.Exception: Error occurred while attaching to session
at UiPath.Terminal.Generic.EHLLApi.EhllTerminal.InitializeEhll(ConnectionData connectionData)
18:44:30.3515 error    at UiPath.Terminal.Generic.EHLLApi.EhllTerminal.InitializeEhll(ConnectionData connectionData)
18:44:30.3590 warn EhllapiWrapper.CallEhllApi(2) returned 9
18:44:30.3590 error EhllBridge.Detach error: SystemError
18:44:30.3590 warn EhllapiWrapper.CallEhllApi(2) returned 9
18:44:30.3590 error EhllBridge.Detach error: SystemError
|
| Several lines of normal log are displayed
|
18:44:30.7703 error System.Exception: Error occurred while initializing EHLLL library
at UiPath.Terminal.Generic.EHLLApi.EhllTerminal.InitializeEhll(ConnectionData connectionData)
18:44:30.7703 error    at UiPath.Terminal.Generic.EHLLApi.EhllTerminal.InitializeEhll(ConnectionData connectionData)
18:44:30.7703 error EhllBridge.Detach dispatch exception: System.NullReferenceException: Object reference not set to an instance of an object.
at UiPath.Terminal.Helpers.StaThread.Invoke(Delegate method)
at UiPath.Terminal.Generic.EHLLApi.EhllBridge.Detach()
18:44:30.7811 error EhllBridge.Detach dispatch exception: System.NullReferenceException: Object reference not set to an instance of an object.
at UiPath.Terminal.Helpers.StaThread.Invoke(Delegate method)
at UiPath.Terminal.Generic.EHLLApi.EhllBridge.Detach()
18:44:30.7811 error EhllBridge.Release exception: System.NullReferenceException: Object reference not set to an instance of an object.
at UiPath.Terminal.Helpers.StaThread.Shutdown()

@hydaelyn

As per error looks like the session is not being passed to the detach flow

please check the same

or the session is not intialized at all

cheers

Thank you for your reply.

Was my understanding that setting ‘Close Connection’ to True in TerminalSession will fix the issue correct?
The UiPath documentation states that TerminalConnection should not be retained.
https://docs.uipath.com/activities/other/latest/ui-automation/terminal-session#:~:text=Avoid%20using%20the,as%20described%20above.

@hydaelyn

Ideally it should depending on what you are trying to do…but if you set that please check if you are using the connection any where you need to reinitialize or reconnect it

cheers

Thank you for your reply.

I noticed that application exceptions registered in Orchestrator Queue occur almost at regular intervals.
After various considerations, I would like to inform you that the problem has been resolved by restarting the terminal if the Mod result of the TransactionNumber when obtained is 0.

I would like to continue to consider how to solve this problem.

Thank you!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.