-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing channelData on (GET .../activities) results, and Setting it to createStore({activities},...) Throws error #4973
Comments
I have an automatic message that displays a card. That works always, i can restart the chat 50 times and there will be 50 cards, but arround the 20th message, if i write something. the next time i reload the chat it throws the error. I got the last 4 messages where the message written by me is:
and it says:
If the third activitie is deleted it works correctly, it is the message written by me. I can't see the error because the code for webchat is minified |
UPDATE After looking which messages throw an error I started looking for which key throws the error also.
In this case if in localTimestamp I remove the +01:00 and set it to +00:00 it works, i can delete the entire line and it works too. |
@RamonDonadeu - Thank you for your patience. So, the first thing you should understand is that Web Chat uses a message type called The activities that are passed into the Web Chat store need to conform to the
Regarding the Alternatively, you can keep it and adjust the logic used for the activity status by updating and passing into Web Chat the Here is an example of an activity that would be included in the {
type: 'message',
id: 'Gii1iZbkiIOJHMv15obBic-fr|0000000',
serviceUrl: 'https://directline.botframework.com/',
channelId: 'directline',
from: {
id: 'YOUR_USER_ID',
name: 'sergiy-test',
role: 'user'
},
conversation: {
id: 'Gii1iZbkiIOJHMv15obBic-fr'
},
textFormat: 'plain',
locale: 'es',
text: 'hola',
attachments: [],
entities: [
{
type: 'ClientCapabilities',
requiresBotState: true,
supportsListening: true,
supportsTts: true
}
],
channelData: {
"webchat:fallback-text": ""
}
} Also, please note, there may be other properties that will need to be added, changed, or removed depending on the activities being passed in as conversation history. The changes I mentioned above are only specific to the Give these changes a go and let me know how it works for you. Regarding the '50 messages' issue you mentioned, try the above and let me know if it had an affect one way or the other. If it resolves it, great. If not, I would ask you to open that as a new issue in this repo. |
@stevkan thanks for your response. First of all, I made it work doing only this:
Anyway, I added the updates you told me:
Regarding
And the webchat won't load any message. As I said before, i managed to make it work, so you can close this issue. Thanks! |
Is it an issue related to Adaptive Cards?
No
Is this an accessibility issue?
No
What version of Web Chat are you using?
Unrelated
Which distribution are you using Web Chat from?
Unrelated
Which hosting environment does this issue primarily affect?
Web apps
Which browsers and platforms do the issue happened?
Browser: Chrome (latest)
Which area does this issue affect?
Chat history
What is the public URL for the website?
No response
Please describe the bug
I'm trying to implement the webchat into a vue project. I'm storing conversation Id in cookies and when loading the page I retrieve the Id, and call
https://directline.botframework.com/v3/directline/conversations/{conversationId}/activities
to retrieve the sent messages in the past.
Then i'm setting them into
So they can be viewed by the user, but it throws an error. ( Specified in 'Do you see any errors in console log?' )
I compared the activities object with the activities stored in the store if no activities ara passed and it's missing:
on each message.
Do you see any errors in console log?
How to reproduce the issue?
1.- Create a new conversation
2.- Write some messages
3.- Get the conversationId
4.- Call 'https://directline.botframework.com/v3/directline/conversations/' + conversationId + '/activities
5.- Get activities and set them into createStore
6.- Reload the page so it creates a webchat with set activities and it throws an error ( at least for me )
What do you expect?
The recieved activities to be rendered in the webchat
What actually happened?
Activities are not displayed due an error
Do you have any screenshots or recordings to repro the issue?
No response
Adaptive Card JSON
No response
Additional context
I'll give you mi activities so you can skip 4 steps to reproduce:
The text was updated successfully, but these errors were encountered: