Background
When calling BotFrameworkConfig.fromHost('xyz') or BotFrameworkConfig.fromHost(new URL('wss://xyz.convai.speech.azure.us')), the Web Socket connection established contains double-slash and the server is returning 404.
In network trace, the URL it is calling become (note the double-slash after the hostname):
wss://xyz.convai.speech.azure.us//api/v3?connectionid=...
The correct one should be the following, without double-slash.
wss://xyz.convai.speech.azure.us/api/v3?connectionid=...
Technical details
In /src/sdk/BotFrameworkConfig.ts:121, it set SpeechServiceConnection_Host with new URL('wss://xyz.convai.speech.azure.us').toString(). And it become wss://xyz.convai.speech.azure.us/. The trailing slash is added by URL.toString().
When running under Node.js 14, you can also see same behavior:

Then, when src/common.speech/DialogConnectorFactory.ts:70 construct the URL, it become double-slash.
When the code is run, the network trace I captured contains double-slash and the service is returning 404. Without the double-slash, the service operates normally.


Workaround
After calling BotFrameworkConfig.fromHost(), manually set the SpeechServiceConnection_Host property.
Background
When calling
BotFrameworkConfig.fromHost('xyz')orBotFrameworkConfig.fromHost(new URL('wss://xyz.convai.speech.azure.us')), the Web Socket connection established contains double-slash and the server is returning 404.In network trace, the URL it is calling become (note the double-slash after the hostname):
wss://xyz.convai.speech.azure.us//api/v3?connectionid=...The correct one should be the following, without double-slash.
wss://xyz.convai.speech.azure.us/api/v3?connectionid=...Technical details
In
/src/sdk/BotFrameworkConfig.ts:121, it setSpeechServiceConnection_Hostwithnew URL('wss://xyz.convai.speech.azure.us').toString(). And it becomewss://xyz.convai.speech.azure.us/. The trailing slash is added byURL.toString().When running under Node.js 14, you can also see same behavior:
Then, when
src/common.speech/DialogConnectorFactory.ts:70construct the URL, it become double-slash.When the code is run, the network trace I captured contains double-slash and the service is returning 404. Without the double-slash, the service operates normally.
Workaround
After calling
BotFrameworkConfig.fromHost(), manually set theSpeechServiceConnection_Hostproperty.