amazon-connect / amazon-connect-chat-interface

Amazon Connect Chat Interface - a browser-based customer chat widget for your website integrating with Amazon Connect ChatJS
https://docs.aws.amazon.com/connect/latest/adminguide/what-is-amazon-connect.html
MIT No Attribution
36 stars 39 forks source link

Cannot read property 'startChatResult' of undefined #29

Closed mosn85 closed 1 year ago

mosn85 commented 3 years ago

Hi,

After passing the parameters of username i am receiving below error in the code:

failed TypeError: Cannot read property 'startChatResult' of undefined at new e (amazon-connect-chat-interface.js:37680) at new e (amazon-connect-chat-interface.js:37783) at t.value (amazon-connect-chat-interface.js:38660) at t. (amazon-connect-chat-interface.js:38630) at E (amazon-connect-chat-interface.js:16373) at Generator._invoke (amazon-connect-chat-interface.js:16355) at Generator.e. [as next] (amazon-connect-chat-interface.js:16392) at Dt (amazon-connect-chat-interface.js:35171) at a (amazon-connect-chat-interface.js:35187)

Please can you provide some help here.

Thanks -Mohsin

swiszm-amazon commented 3 years ago

This seems to be an issue with the chat details returned by your chat initiator endpoint.

https://github.com/amazon-connect/amazon-connect-chat-interface/blob/e6b361514394ec3d69157555e4ebb8be58cd00df/src/components/Chat/ChatSession.js#L29

Can you provide more details on the endpoint you are using to initiate chats? Was an Api Gateway endpoint generated using our CloudFormation templates linked here? https://github.com/amazon-connect/amazon-connect-chat-interface/tree/master/local-testing