Issue in building chatapp using azure pubsub

Radha Rajendran 61 Reputation points
2022-02-16T20:07:14.297+00:00

Hi,

I have followed below link to build chat app,
https://learn.microsoft.com/en-ca/azure/azure-web-pubsub/tutorial-build-chat?tabs=java

Git code:(exactly same in my local)
https://github.com/Azure/azure-webpubsub/tree/main/samples/java/chatapp

When I run the application getting error saying "WebSocket is already in CLOSING or CLOSED state."

Please help me to resolve the issue.

Thanks,
Radha

Azure Web PubSub
Azure Web PubSub
An Azure service that provides real-time messaging for web applications using WebSockets and the publish-subscribe pattern.
59 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 25,486 Reputation points Microsoft Employee
    2022-02-16T23:41:58.907+00:00

    Hi @Radha Rajendran ,

    It sounds like the client app is being disconnected from the service, but with the information you've provided, can't tell how. What you could do is use the live trace tool for any disconnects or error messages. Using the browser tools may also help you determine when the web socket transitions to closed or closing. If you do see the error messages or can clarify when the web socket becomes closed, feel free to share those details down below.