Teams/Slack Virtual Agent app is not responding due to BaseProtocolAdapter error


Description

Teams virtual agent app is not responding:

It was working before and this issue happens only for one user. User has tried using commands restart and bye in teams and slack and receives no response.


Cause

This issue is caused by Client Adapter of the affect user.

This issue is noticed when the 'sys_cs_client_adapter' record has been altered manually via the UI or Script. Making changes to 'sys_cs_client_adapter' record is not recommend.

Some error logs can be found in the localhost logs.

txid=131f49d0db2d SEVERE *** ERROR *** [Context] [BaseProtocolAdapter] com.glide.cs.qlue.module.clientproxy.BaseProtocolAdapter.createChatMessage(BaseProtocolAdapter.java:1119)
com.glide.cs.qlue.module.clientproxy.BaseProtocolAdapter.clientToProtocol(BaseProtocolAdapter.java:708)
com.glide.cs.qlue.module.clientproxy.BaseProtocolAdapter.receiveExternalMsg(BaseProtocolAdapter.java:809)
com.glide.cs.qlue.module.clientproxy.BaseProtocolAdapter.processExternalMsg(BaseProtocolAdapter.java:841)
com.glide.cs.qlue.module.clientproxy.BaseProtocolAdapterMgr.handleIncomingMessage(BaseProtocolAdapterMgr.java:86)
com.glide.cs.qlue.module.worker.AdapterMessageProcessor.process(AdapterMessageProcessor.java:25)
com.glide.cs.qlue.module.worker.Processor.lambda$process$0(Processor.java:102)
com.glide.worker.TransactionalWorkerThread.executeInTransaction(TransactionalWorkerThread.java:35)
com.glide.cs.qlue.module.worker.Worker$TransactionExecutor.execute(Worker.java:201)
com.glide.cs.qlue.module.worker.Processor.process(Processor.java:102)
com.glide.cs.qlue.module.worker.Processor.process(Processor.java:53)
com.glide.cs.qlue.module.worker.Worker.run(Worker.java:114)

Resolution

1. Log in as admin.
2. Go to "sys_cs_client_adapter.list" and find the record associated to the affected user.
3. Delete this record.
4. Run "gs.cacheFlush()" in the background script to clear the cache of the instance.

Why deleting the sys_cs_client_adapter record works?
There was discrepancy between two table records 'sys_cs_client_adapter' and 'sys_cs_conversation', due to which the conversation was failing. When we remove the sys_cs_client_adapter record, there is no active conversation and a new record for sys_cs_conversation and sys_cs_client_adapter are created, which are in sync now.