Skip to content
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

request to http://localhost:3978/api/messages failed, reason: connect ECONNREFUSED 127.0.0.1:3978 #2123

Closed
baghaeifar opened this issue Apr 3, 2020 · 5 comments
Labels
Bot Services equired for internal Azure reporting. Do not delete. Do not change color. Bug Your classic code defect customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete.

Comments

@baghaeifar
Copy link

No description provided.

@tonyanziano tonyanziano added Bug Your classic code defect customer-reported Required for internal Azure reporting. Do not delete. labels Apr 3, 2020
@tonyanziano
Copy link
Contributor

@baghaeifar this usually indicates that your bot is not running.

Please make sure you start your bot before trying to connect to it via the emulator.

Also, it is very hard to diagnose an issue without more information. Please provide more information about your scenario (steps taken to reproduce your issue, what type of bot you are using, etc.) and screenshots if possible.

@mrivera-ms mrivera-ms added Bot Services equired for internal Azure reporting. Do not delete. Do not change color. customer-replied-to Required for internal reporting. Do not delete. labels Apr 3, 2020
@axelsrz
Copy link
Member

axelsrz commented Apr 13, 2020

Closing due to inactivity

@axelsrz axelsrz closed this as completed Apr 13, 2020
@alatas
Copy link

alatas commented May 22, 2020

I have the same problem. When I was starting the project with the IISExpress it seems to use localhost address, but it was starting to listen only on ::1 ipv6 address, not 127.0.0.1 ipv4 address.

When the emulator tries to connect to localhost:3978, emulatore resolves localhost to 127.0.0.1 ipv4 address, and then emulator gets ECONNREFUSED error. Because there is no listening application on 127.0.0.1 port 3978.

I changed the project run configuration from IISExpress to AspNetCore.Hosting. Then everything started to work correctly. Because it listens both ::1 and 127.0.0.1.

@funnysekhar2014
Copy link

funnysekhar2014 commented Nov 14, 2022

I am getting the same error "request to https://localhost:3978/api/messages failed, reason: connect ECONNREFUSED 127.0.0.1:3978". But didnt understand the above solution provide by @alatas.
can someone help me in getting this resolved in step by step.

{
"error": {
"code": "ServiceError",
"message": "request to https://localhost:3978/api/messages failed, reason: connect ECONNREFUSED 127.0.0.1:3978"
}
}
image

Getting this message in CMD when NPM was started:

image

Please let me know if any other info is required

@jiehan1029
Copy link

jiehan1029 commented Jun 26, 2023

Hi @alatas , I think I'm getting the same issue that the emulator is listening on ipv6 http://[::]:51208 while my SDK is trying to send activities to http://localhost:51208. Could you share how you fixed that? I don't know how to changed the project run configuration from IISExpress to AspNetCore.Hosting as your post said

---- update:
actually found the workaround using ngrok v2 as directed here #2389 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bot Services equired for internal Azure reporting. Do not delete. Do not change color. Bug Your classic code defect customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete.
Projects
None yet
Development

No branches or pull requests

7 participants