I have created my first bot application, but it's giving an error while running in the Bot Framework Emulator. it shows status of message I sent like "Couldn't send". Please suggest me what could be the reason.
-
2Please, include your code in the question so we can help you. – sGambolati Apr 03 '17 at 14:31
-
@sGambolati Thank you – Vaijinath Harbak Apr 03 '17 at 14:53
-
I am getting the same issue, but my URL is correct. Nothing is showing in the Inspector window or the Log, it just says "couldn't send" below my message. My bot project is the default one visual studio Bot Project Type that should return the number of characters in my message, I have not made any changes. – Dave Aug 21 '18 at 12:27
-
6When using Windows 10 i had to run emulator (4.2.1) as an Administrator. – rism Jan 29 '19 at 09:56
-
1@rism 's comment solved the issue for me. Should have been given as an answer. – Frank im Wald Feb 08 '19 at 14:10
7 Answers
The url of your bot in the emulator is wrong. It should be http://localhost:3979/api/messages

- 14,767
- 2
- 38
- 43
For those trying to run the mac version of release 4.2.1, download the .zip file. The .dmg version is not working for some reason.

- 750
- 1
- 7
- 9
I also had the same result, running V4 PREVIEW 40025 of the emulator.
The log window was blank, and I saw "couldn't send" (no retry)
I downloaded 3.5.6 and ran it, Windows asked to confirm it was allowed to communciate through the firewall, said yes
Pointed the older emulator at the endpoint (my sample was running on http://localhost:3979/api/messages - web page visible in Edge at the root of this url so I knew that part was ok) and it loaded, did version checks etc, (so log window not blank)
Every message still says "couldn't send" but now says "retry". Putting a breakpoint on the first line of
public async Task<HttpResponseMessage> Post([FromBody]Activity activity, CancellationToken cancellationToken)
{
Shows the request was being sent to the bot, but it only gets to
if(Middleware.RejectMessageBasedOnTenant(activity, activity.GetTenantId())
Before saying "couldn't send" - I haven't followed the instructions ("Set the OFFICE_365_TENANT_FILTER key in web.config file with Tenant Information") yet, but wanted to post this to give a set of steps you can try taking..
Oh, and the V4 emulator also now works as expected/as above..
Check your firewall, restart the web site and the emulator.. Check that the emulator succeeds in comms with the web server, and that you see "Hello I'm your new bot" in the chat window of the emulator

- 72,509
- 5
- 49
- 80
To help those who had the URL right, but still got the "Couldn't send" message.
I was running version 4.0.15 of the emulator and I was getting no response back whatsoever. Eventually I found that installing an older version of the emulator, (3.5.2) worked for me - if at first it doesn't work, just check that the port is correct as it defaults to port 3978.
Hope this helps!

- 351
- 3
- 12
I had this issue for the emulator V4.2.1. Just we need to allow the app in the firewall and it will work fine. (Provided if you have the url correct and then you are facing the 'couldn't sent' issue.
Check this link. : https://pureinfotech.com/allow-apps-firewall-windows-10/

- 106
- 1
- 4
-
I used this instructions, I already had the Bot Framework Emulator in the allow list but I was missing the Private check box. – Juan Feb 13 '19 at 19:55
I had a similar issue - but no logs were showing in the window.
I tried un-installing the Bot Framework Emulator, then re-installed and everything just worked. ♂️

- 139
- 1
- 9