I have created a new skype bot and can't send message from bot to user. Old bot works fine, issue with a new bot only.
Error:
The conversationId 29:1LdWKO8GtgmCFPuspsVg8bX8TXV_-x7QHnJln2oYI8fg and bot 2df68b89-7ba6-463a-858a-0eb621b74f8e doesn't match a known conversation
I have same problem!
Hi @ta4 and @nkornushin, is there any chance that you have the hostname "skype.botframework.com" hardcoded in your bot somewhere?
The issue I'm seeing is that your bot has been moved to a different server but is still using the skype.botframework.com hostname.
I have same problem!
Is "skype.botframework.com" old?
Please tell me the new hostname
I am also suffering.
Is the host name changed?
If so, it will be helpful if you tell me your new hostname :)
Hi @dandriscoll. What we should use instead "skype.botframework.com"?
Same problem here. I have a solution that works well on one bot/webapp. Then when I publish it to another bot/webapp it gives this error. Config is updated accordingly.
The hostname is in the ServiceUrl field for any activities you receive. Does that URL contain skype.botframework.com or another hostname?
I use ConnectorClient connector1 = new ConnectorClient(new Uri("https://skype.botframework.com/"));
connector1.Conversations.SendToConversation((Activity)message1);. That is the only instance of "skype.botframework.com I can find. Are you saying it should be changed to something else? Because it works on my old bot but not the new.
You can retrieve the ServiceUrl from activities when they are received. ServiceUrls should not be hardcoded as they may change.
It went well!
Thank you
@dandriscoll It's work now. But where this information we can find in documentation???
@dandriscoll Thank you dandriscoll .
It has solved successfully !
It depends on which SDK you're using. You will not find the hostnames documented.
I use REST API and now I see in documentation "The return value is a ResourceResponse which contains a conversation id which is suitable for use in the message payload and REST API uris." :)
Thank You @dandriscoll
For those of you that solved this, what in your code did you change? Maybe I'm a bit greener then the rest of you because I am still not sure what I need to change and what to change it to.
Still wondering What to change and where. Not sure what a serviceUrl is. Can 1 of the people that managed to solve it please show what they changed and where?
Hi @MrCharli3, I take from your earlier comment that you're coding in C#. If so, are you using the Bot Builder dialog system?
If yes, simply send a response and the SDK handles it for you:
await context.PostAsync(message);
If you are managing inputs and outputs on your own, create the client this way:
var activity = // supplied in call to bot
var reply = activity.CreateReply();
// fill in fields for reply
if (MicrosoftAppCredentials.IsTrustedServiceUrl(activity.ServiceUrl))
{
var client = new ConnectorClient(new Uri(activity.ServiceUrl));
client.Conversations.ReplyToActivity(reply);
}
Closing as we've addressed the issue and described how to store and load ServiceUrls. Please at-mention or open a new issue if you'd like to discuss further.
Most helpful comment
You can retrieve the ServiceUrl from activities when they are received. ServiceUrls should not be hardcoded as they may change.