-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Input message displayed (shortly) above bot message #1954
Comments
Hi @jvanderbiest, one of our users recently discovered that this was due to a computer's time being behind official time. Please see this issue: #1890 |
hi @corinagum, |
@jvanderbiest can you check timezone in your browser machine? I checked the code here, this is where we find the correct place to insert the activity into.
It is being corrected momentarily because after the message is successfully sent, our server will put the server's clock in Could you help us to debug into a few things?
Instead of simply appending to the |
Closing due to inactivity. |
I am experiencing the same problem as @Slayouth when using WebChat (https://cdn.botframework.com/botframework-webchat/latest/webchat.js) and botbuilder 4.4.0. Works as expected in Bot Emulator. I deployed to Azure Web App which has UTC timezone. I configured my local dev machine to run UTC as well. Unfortunately, this is a show stopper. |
Results of debug test:
=> nextTimestamp + ' ' + new Date() => 1559614371923 Tue Jun 04 2019 04:12:08 GMT+0200 shows a little gap of approx. 45s. If user adds new message in less than 45s after bot shows welcome message, user's message is placed on top (which is wrong). however, when user adds new message after 45s after bot shows welcome message, all is fine. |
Any updates on this? |
Assigning to @compulim for investigation |
Yes, very close is subjective. 😂 Looks like the local machine has a clock skew of about 43 seconds, when compare to our servers. So, in order to fix this without asking the user to update their clock, we need to add a "de-clock-skew" logic to Currently we don't have any REST API to measure the clock skew on the client box, one will need to use a public API to estimate the clock skew and compensate for it while inserting the activity. p.s. we can't use |
After talking to the channel team, the other way, is to use the first activity as a base for the clock for both outgoing and incoming activity. The sorting problem we witness here is because the outgoing activity cannot be timestamped using an accurate clock. The client clock has skewed too much (> 2s) compare to the server, thus, the outgoing activity we timestamped is in wrong position. We should try this approach and see how it works:
|
Why not use some incrementing counter instead to ensure correct order? |
On using the previous version's (v3) latest/botchat,js and latest/botchat.css, this issue seems to be absent consistently. Is there any way we can make use of previous botchat.js while availing the current features of webchat.js (v4) (e.g. card components) ? The link for both are pasted here, have a look. |
Can't use counter because we plan to support update activity and resume conversation (loading chat history). These activities will come out-of-order and need to be sorted by time. The steps outlined in my comment above should fix most of the issues. Just need time to implement them. |
Do we have a time line for a fix? Thx |
No current timeline - this issue is currently filed in our Backlog. |
Would love to see if this fit in 4.6, looks like it hit quite some users. |
Using the latest master webchat.js, I have this strange behaviour when I talk to the bot that user message is first displayed above the last bot message, then after a new bot reply it is positioned correctly => inbetween the last bot reply and the previous bot reply. I can reproduce this also on the examples.
See video
https://youtu.be/0tkQ22iFZpQ
The text was updated successfully, but these errors were encountered: