microsoft / omnichannel-chat-sdk

Headless Chat SDK to build your own chat widget against Dynamics 365 Omnichannel Services.
MIT License
39 stars 40 forks source link

Unable to successfully startChat() #320

Open maurice-baez opened 4 months ago

maurice-baez commented 4 months ago

Hello -

I'm trying to connect to my chat widget via the Omnichannel SDK but running into an issue when starting the chat.

Specs:

maurice-baez commented 4 months ago

@xTEddie Would you be able to assist here?

maurice-baez commented 4 months ago

@xTEddie adding some more context -

-adding .setDebug(true) for more robust logging reveals something interesting -

Screenshot 2024-04-26 at 2 22 45 PM Screenshot 2024-04-26 at 2 24 14 PM

The first image, shows browser logs up to the point where the chat errors out, the second image shows browsers logs indicating a successful session init/getChatToken, which occurs AFTER the chat has failed on the MessagingClientConversationJoinFailure To me, it seems like it makes sense that it would not be able to create a conversation without a chat token/session, but why this timing issue is occurring is not clear. Like I mentioned earlier, I'm using essentially the exact same code as posted on the sandbox site, so why it would work there and not locally within my app doesn't make sense to me. Again, any help would be appreciated.

pavan-kumar-js commented 4 months ago

@maurice-baez Is it only happening locally? I've tried it via a localhost server, haven't tried it by deploying it. Any more insights into that?

maurice-baez commented 4 months ago

@pavan-kumar-js - happening for me both locally and in a deployed environment.

ezeamalukamsiyo commented 2 days ago

@pavan-kumar-js - happening to me also using NODE JS