Virtual Agent Web Client on an external web page returns 500 (Internal Server Error) after browser refreshIssue When the end-user refreshes the Virtual Agent Web Client after chatting with a live agent or attempting to connect to a live agent, the Virtual Agent does not load anymore; even though the embedding of the Virtual Agent Web Client onto an external website was successful. The error below is seen in the browser logs: Failed to load resource: the server responded with a status of 500 (Internal Server Error)" The Failed resource is: POST <instance_name>.service-now.com/api/now/v2/cs/session 500 (Internal Server Error) We also see the exception below in the server logs: Context] ConversationId: f58d95c91b833410ca11422ad34bcb4c [SilentHandshake] com.glide.rest.util.NotFoundException: Exception in creating session : com.glide.cs.qlue.module.coma.SessionServiceImpl.getSessionForDevice(SessionServiceImpl.java:57)com.glide.cs.qlue.module.coma.SessionManager.getSessionIdByConsumerAccount(SessionManager.java:172)com.glide.cs.qlue.module.coma.MessageServiceImpl.getSessionId(MessageServiceImpl.java:664)com.glide.cs.qlue.module.coma.MessageServiceImpl.getSessionIdByConsumerAccount(MessageServiceImpl.java:600)com.glide.cs.qlue.module.taco.ConversationImpl.sendErrorMessage(ConversationImpl.java:497)com.glide.cs.qlue.module.taco.ConversationImpl.cancel(ConversationImpl.java:547)com.glide.cs.qlue.module.taco.ConversationImpl.cancel(ConversationImpl.java:535)com.glide.cs.qlue.module.coma.SilentHandshake.process(SilentHandshake.java:164)com.glide.cs.qlue.module.coma.SessionServiceImpl.createSessionV2(SessionServiceImpl.java:44)com.glide.cs.qlue.module.coma.SessionResourceV2.createSession(SessionResourceV2.java:63)sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)java.lang.reflect.Method.invoke(Method.java:498)com.glide.rest.handler.impl.ServiceHandlerImpl.invokeService(ServiceHandlerImpl.java:44)com.glide.rest.processors.RESTAPIProcessor.process(RESTAPIProcessor.java:344)com.glide.processors.AProcessor.runProcessor(AProcessor.java:596)com.glide.processors.AProcessor.processTransaction(AProcessor.java:266)com.glide.processors.ProcessorRegistry.process0(ProcessorRegistry.java:181)com.glide.processors.ProcessorRegistry.process(ProcessorRegistry.java:169)com.glide.ui.GlideServletTransaction.process(GlideServletTransaction.java:44)com.glide.sys.Transaction.run(Transaction.java:2338)java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)java.lang.Thread.run(Thread.java:748): no thrown errorReleaseQuebecCauseIf you're embedding the web client on any page that is not on your ServiceNow instance, the URL must be a custom instance URL. Due to increased browser security, the web client may fail to load if you don't use a custom URL. *To embed the Virtual Agent widget, the instance being embedded has to be on a custom domain, with the same primary domain matching the site it is being embedded on. For instance, if ServiceNow Instance URL is xyz.service-now.com and the URL of the external website where you want to embed the Virtual Agent is www.acme.com/support, then the custom URL associated with the ServiceNow instance should be a sub-domain of the primary acme.com domain such as xyz.acme.com or va.acme.com, etc.ResolutionTo resolve the issue, activate the custom URL plugin and add a custom URL to your instance. Then, you can use that custom URL to embed the Virtual Agent Web Client onto your external website.