-
Notifications
You must be signed in to change notification settings - Fork 773
Description
Version
Emulator version: 4.15.1
Describe the bug
When connecting to a local bot using the Bot Framework Emulator, the conversation.id includes a |livechat suffix (e.g., b9261fc1-57a1-11f0-8f54-bd61984248b7|livechat), and the serviceUrl is set to http://localhost:60844.
This causes the bot to attempt to POST a response to an unavailable service on port 60844, resulting in the following error:
FetchError: request to http://localhost:60844/v3/conversations/...|livechat/activities/... failed, reason: connect ECONNREFUSED 127.0.0.1:60844
This happens even when there is no explicit fetch to that URL in the bot's code — only standard context.sendActivity() calls via the Bot Framework SDK.
To Reproduce
Steps to reproduce the behavior:
- Open Bot Framework Emulator v4.15.1
- Connect to a bot running locally (e.g.,
http://localhost:3978/api/messages) - Observe the bot's
onTurnErroror middleware logcontext.activity - Notice that
conversation.idcontains|livechatandserviceUrlpoints tohttp://localhost:60844 - Any
sendActivity()results in aFetchErrordue to connection refusal on port60844
Expected behavior
When running in the Emulator, the conversation.id should not include |livechat, and the serviceUrl should point to the bot's actual listening address (e.g., http://localhost:3978). The Emulator should not simulate an unavailable "livechat" channel by default.
Screenshots
Not applicable for this issue (behavior is observed via logs and thrown errors).
Additional context
- This behavior causes the bot to fail on the first message, even when running locally.
- Workarounds include skipping activity handling when
conversation.idincludes|livechat, or manually overriding theserviceUrl, but this is not ideal for local development.
[bug]