Giter VIP home page Giter VIP logo

Comments (19)

efh365 avatar efh365 commented on July 30, 2024 1

@robmoores this will be difficult for us to help you debug if you have made a number of modifications to the code. Can you try to redeploy the stack in a clean environment and then let us know if you experience the issue there. If you don't, then it is a problem with modifications you have made and we won't be able to help with that.

from amazon-connect-chat-ui-examples.

lukeschmidt-wisc avatar lukeschmidt-wisc commented on July 30, 2024 1

@robmoores what would " You can update your solution to instead mark the chat as completed as a response to the chat ended event" look like
chatSession.onChatDisconnected(function (data) {
data._updateContactStatus("ended");
});

Overall we are getting the same error as Re issue #24 but we think setting it to complete will resolve the issue. We are using amazon-connect-chat-interface.js in our project and implementing the asyncCustomerChat-UX. Thanks for the help and the discussions.

from amazon-connect-chat-ui-examples.

MattDN93 avatar MattDN93 commented on July 30, 2024 1

Another note on this - I've seen endless loads when the StartChatContact API ends up returning ParticipantToken for a chat whose session is no longer active leading to the 403 in the logs. I looked into my deployment and noticed that when this exact behaviour occurs it's when userDisplayHash is the same:

  • you enter "John" as the first name and "matt" as username and init a new chat
  • DDB gets a new item where userDisplayHash is "mattJohn" and nextContactId is "CURRENT_CHAT"
  • End the chat, and quickly start a new one with the same first name "John" and "matt" username
  • This then fetches the stale "mattJohn" chat by userDisplayHash and since the column nextContactId is still CURRENT_CHAT, it errors as the ParticipantToken returned from DDB is no longer valid

In this case, a quick fix is to set nextContactId for that userDisplayHash as something other than CURRENT_CHAT and the solution will init a new chat session.

from amazon-connect-chat-ui-examples.

efh365 avatar efh365 commented on July 30, 2024

Can you please add any debugging information? does it happen for every chat or only chats when you use the same name? did you launch your stack with uuids instead of arns? any errors in the logs?

from amazon-connect-chat-ui-examples.

robmoores avatar robmoores commented on July 30, 2024

I don't know of it's any help but I have also experienced this on several occasions - the spinner just keeps spinning! It happens when I edit the index.html file Save As a new version, upload it to S3 and change the reference on Cloudformation. I've assumed it's because I've hacked away at the code and done something wrong but think this unlikely as e.g. it happened when I put an extra line in in below the h1 .... Opened in incognito window etc ... Happy to test etc under guidance ...

from amazon-connect-chat-ui-examples.

khastation avatar khastation commented on July 30, 2024

@robmoores can you help provide with your browser console logs so that we could try to analyze the issue?

from amazon-connect-chat-ui-examples.

robmoores avatar robmoores commented on July 30, 2024

@robmoores can you help provide with your browser console logs so that we could try to analyze the issue?

Thanks and yes I can. Can you please be very specific about exactly what logs you want? I'm learning fast but detailed direction will help :-) Thanks

from amazon-connect-chat-ui-examples.

robmoores avatar robmoores commented on July 30, 2024

Hi efh365. Thank you for replying. I have this issue whether I have modified the index.html or not. I can do a new install again and upload the browser logs - but as above I would need detailed guidance on how to find and send these logs :-)

from amazon-connect-chat-ui-examples.

efh365 avatar efh365 commented on July 30, 2024

can you look at these two closed issues to see if they fix your problem and then let me know the results from those debugging steps?
#20
#29

from amazon-connect-chat-ui-examples.

robmoores avatar robmoores commented on July 30, 2024

Hi efh. Many thanks for replying. I will have to look at these tomorrow eve (UK time) now!

from amazon-connect-chat-ui-examples.

robmoores avatar robmoores commented on July 30, 2024

UPDATE: the log file write access seems to be controlled by the S3 Log Delivery Group access, so I assume that these files are simply a confirmation that something was written or attempted to be written to S3. We eventually set the S3 Log Delivery Group access to Read so no log files can be written. I don't see that they serve any purpose apart from debugging - but keen to learn more!

Hi. Apologies for slow reply - we have been trying to investigate this for many days !
I have looked at #20 and #29 and I dont think they are related to the issue we are having. (PLEASE SEE NEXT COMMENT)
Sometimes the UI works fine - then it goes crazy and adds thousands of entries into the /logs file and at the same time the wheel is spinning endlessly ...!
I have found this in the Cloudwatch logs(my xxxxxx added):
AccessDeniedException: User:
arn:aws:sts::1xxxxxxxxxxx3:assumed-role/amazon-connect-b56d2ae769-InitiateChatLambdaExecut-EW9Q3LTWARNW/amazon-connect-b56d2ae769e4-web-InitiateChatLambda-KIZZT9MM8B3S
is not authorized to perform: connect:StartChatContact on resource:
arn:aws:connect:us-east-1:1xxxxxxxxxxx3:instance/d2a484f2-1760-4363-8a3c-e6a2ee802176/contact-flow/808685f0-8456-4578-babe-7c6080c652ca

I wondered if this access issue causes the endess log wrotes - but maybe they are not related. I cannot see where these log files are written .

from amazon-connect-chat-ui-examples.

robmoores avatar robmoores commented on July 30, 2024

Re issue #20: the first case you mention could be part of the issue:
Can you please let me know how we can identify the chat ended event ?
In the index.html I can see chatSession.onChatDisconnected - is this what I can use or is this when the Agent disconnects ?
Thanks

You end a chat and then try to start a new one within a few seconds.
This happens because the DDB marks a chat as active until the chat transcript is dumped in S3. This takes about 30 seconds to happen so there is a delay in when the chat is marked as complete. You can update your solution to instead mark the chat as completed as a response to the chat ended event

from amazon-connect-chat-ui-examples.

lukeschmidt-wisc avatar lukeschmidt-wisc commented on July 30, 2024

chatSession.onChatDisconnected(function (data) {
data._updateContactStatus("ended");
});

.data._updateContactStatus is not a function is what we are getting when we use the snippet above. what object do we need to access the updateContactStatus and then change the object. Thanks for the help!
image

from amazon-connect-chat-ui-examples.

robmoores avatar robmoores commented on July 30, 2024

@lukeschmidt-wisc I think that the advice given in use case 1 in issue #20 is to update DDB. So I think when you get to here in the index.html:
chatSession.onChatDisconnected(function (data) {
resetForm(); <--- as well as reset the form, call a Lambda to update the row in DDB to mark it as closed
});

Thoughts ?

from amazon-connect-chat-ui-examples.

lukeschmidt-wisc avatar lukeschmidt-wisc commented on July 30, 2024

We are attempting to keep the lambda functions to a minimum with our project and would rather use javascript. When you say "call a Lambda to update the row in DDB to mark it as closed" are you referring to the table created by the cloudformationtemplate named like: asyncCustomerChat-UX-chatContactDataTable....? If so what column would be marked with the value closed?

from amazon-connect-chat-ui-examples.

robmoores avatar robmoores commented on July 30, 2024

@lukeschmidt-wisc You can wrap the javascript code in a lambda function, then you can trigger it from the API Gateway as the other two Lambdas are already. My understanding from reading the code is that is you put any value other than "NONE" in the S3Key it will effectively treat it as closed. BUT ... I am still a novice so please consider that and do your testing :-)

from amazon-connect-chat-ui-examples.

mukundparmar avatar mukundparmar commented on July 30, 2024

is this working for anybody, I am stuck at the same issue.

chatSession.onChatDisconnected(function (data) {
data._updateContactStatus("ended");
});

Above code didn't work for me in fact after updating that and also removed resetForm() and now it's not even reloading the page second time.

from amazon-connect-chat-ui-examples.

efh365 avatar efh365 commented on July 30, 2024

I just wanted to check in here - is there still an issue or has it been resolved?

from amazon-connect-chat-ui-examples.

robmoores avatar robmoores commented on July 30, 2024

Hi @efh365 . As per comment on Nov 23rd we decided to take the easy way out and not write to the log - that resolves the issue. I'vve not reconsidered it for a whilebut happy to do some testing under guidance :-)

from amazon-connect-chat-ui-examples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.