webchat-es5.js:79 WebSocket connection to 'wss://westeurope.stt.speech.microsoft.com/speech/recognition/interactive/cognitiveservices/v1?language=en&format=detailed&Authorization=eyJhb...gDo9A-M&X-ConnectionId=C7C387E721614770B0325717B41A6309' failed: Error during WebSocket handshake: Unexpected response code: 400
Open @ webchat-es5.js:79
In few chrome is working but in few chrome browser its failing not sure how to resolve this.
(Edited by @compulim for formatting and removing sensitive content)
@Akkilz could you provide repro steps for this error? Copy-pasting your Web Chat index.html may also help.
Hi,
thanks for your response, be low is the code I am using it. Its throwing err in edge as well.
Error :
SCRIPT12002: WebSocket Error: Network Error 12002, The Operation timed out.
js file used : webchat-ed5.js
var nonIECode = function () {
window.WebChat.createCognitiveServicesSpeechServicesPonyfillFactory({ subscriptionKey: speechSecret, region: region }).then(function (res) {
webSpeechPonyfillFactory = res;
return;
}).then(function () {
window.WebChat.renderWebChat({
directLine: window.WebChat.createDirectLine({
secret: dlSecret
}),
webSpeechPonyfillFactory: webSpeechPonyfillFactory
}, document.getElementById('webchat'));
document.querySelector('#webchat > *').focus();
});
};
Kindly let me if any.
Can you confirm you are using webchat-es5 instead of webchat-ed5?
Could you provide the details on what the 400 error is? You can open the Network tab and get the HTTP response on the error. I think this is a Cognitive Services issue but the error may prove otherwise.
its es5.js, typo issue, i will check the network tab and share you the analysis details.
I have a repro of this issue #1845. I'm going to pin this issue. To anyone else experiencing this, please add the details of the 400 error from your network tab. I will be looking into this today.
@Akkilz Network Header:
@NoDirective




I am connecting with Cognitive Services team and see if they can jump in and help.
Sorry the result message didn't contain enough information to diagnose the failure.
The language specified in all three requests isn't a supported language code.
The language specified needs to be from the support list of languages you can find at https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support.
While the value is case insensitive, the speech service does require the 4 letter language code.
Great. @Akkilz is using en-DE and @NoDirective is using ja (instead of ja-JP).
Mystery solved!
Most helpful comment
Sorry the result message didn't contain enough information to diagnose the failure.
The language specified in all three requests isn't a supported language code.
The language specified needs to be from the support list of languages you can find at https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support.
While the value is case insensitive, the speech service does require the 4 letter language code.