Botframework-webchat: WebSocket handshake/connection faild to cognitiveservices in webchat-es5.js

Created on 20 Mar 2019  路  10Comments  路  Source: microsoft/BotFramework-WebChat

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)

front-burner

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.

All 10 comments

@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:
step 1
step 2

@NoDirective
image
image

55044210-c1da8080-507c-11e9-9a93-504401f8534b
55044225-d7e84100-507c-11e9-8e6c-9b63fa348c5b

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

1Copenut picture 1Copenut  路  3Comments

compulim picture compulim  路  3Comments

AndreMantas picture AndreMantas  路  4Comments

adriantan08 picture adriantan08  路  3Comments

prashanthsridhar picture prashanthsridhar  路  3Comments