Comments (19)
@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.
@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.
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" andnextContactId
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 columnnextContactId
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.
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.
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.
@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 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.
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.
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.
Hi efh. Many thanks for replying. I will have to look at these tomorrow eve (UK time) now!
from amazon-connect-chat-ui-examples.
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.
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.
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!
from amazon-connect-chat-ui-examples.
@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.
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.
@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.
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.
I just wanted to check in here - is there still an issue or has it been resolved?
from amazon-connect-chat-ui-examples.
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)
- Passing in Attributes into request body doesn't work for reactNative example demo app HOT 6
- Do you have documentation for this project? HOT 3
- Update startChatContactAPI - ChatSDK.zip runtime HOT 2
- Update startChatContactAPI - start-chat-contact.zip runtime HOT 2
- Replace default "System_message" and "Bot" Values HOT 4
- Uncaught ReferenceError: enableAttachments is not defined HOT 2
- Why is apiGateway mandatory to run customChatWidget HOT 3
- Prebuilt Form is not working when we submit the form HOT 6
- Get Error code 403 access denied HOT 6
- Unable to change font size HOT 2
- amazon-connect-chat-interface.js uses new Function which throws CSP error HOT 5
- Pull Request #123 close bug. HOT 5
- Security Q - API/WAF HOT 3
- Issues with disconnect after chatSession.endChat HOT 2
- Facing issue while trying to setup AndroidChatExample HOT 2
- Cannot create amazon-connect-interactive-messages-example stack because of the Lambda runtime version HOT 3
- urlPreviewForAsyncChat requires updates HOT 2
- Unable to remove preChat form from customChatWidget HOT 5
- Problem with Custom widget window sizing HOT 1
- Having similar issue to #16 and #85. Must refresh the browser tab to get new widget window. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-connect-chat-ui-examples.