-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Unable to contact server. StatusCode: 1006, undefined Reason #292
Comments
@therowf - please edit the message remove your subscription key! |
@wolfma61 It was only to see if the subscription key was correct. There I have got 2 keys. Like key1 and key2. Could you let me know which one should use? Although it is a test account and I will delete it after work. |
Is a bug, because in the error detail: 'Unable to contact server. StatusCode: 1006, undefined Reason: ', instead of 'undefined' should be the requested URL. |
I'm experiencing the same issue, but not on every call to speech recognition service. It seems that this error message is triggered 120 seconds after trying to start a session with the recognize stram, as it would be a timeout from the server or the client. @therowf Did you manage to solve this problem, or at least to understand the root cause? |
Has anybody come to a resolution on this? I am having the same issue. My subscription key and region are correct but still get the "Unable to contact server" message. Thanks. |
Can you turn the logging up and run the sample again? To turn the logging up, inject this code into the beginning of the JS file node will run:
This will send more messages to the console. Please redact your key from the connection message with the URL in it. |
undefined | undefined | privName: RecognitionTriggeredEvent | privEventId: 0A493DE014A94C09800867C8874F6469 | privEventTime: 2019-10-02T16:47:35.402Z | privEventType: 1 | privMetadata: {} | privRequestId: F9F6E95C155D4956A1D675A35A1CD140 | privSessionId: | privAudioSourceId: 9F2483B4D6F544E48BE8394449A36238 | privAudioNodeId: 5A725224F7574D4DAAE357B0F7117283 Error: 'Unhandled callback error: Error: 'Cannot reject a completed promise'. InnerError: 'Unhandled callback error: Error: 'Cannot reject a completed promise''' |
Please don't post subscription keys. I would suggest to edit the message to remove the key and regenerate your key from the speech resource in the Azure portal. |
Thanks, that log was helpful. Are you buy chance using the IntentRecognizer with a Speech Recognition key? IntentRecognition needs keys from Language Understanding and not Speech. We're working to simplify that. |
The IntentRecognizer takes a SpeechConfig and an AudioConfig. The speech config is initiated with the Speech subscription key. Below is the relevant code. Where do I set the IntentRecognizer key with a LUIS key? //var intentConfig = sdk.SpeechConfig.fromSubscription(settings.luSubscriptionKey, settings.luServiceRegion);
|
You use the LUIS key instead of the Speech key. |
When I do that I get "unable to contact server". Thanks for the help by the way. undefined | undefined | privName: RecognitionTriggeredEvent | privEventId: 25A92A4602AB4C51ABC83A0B14A29D6E | privEventTime: 2019-10-02T19:08:33.439Z | privEventType: 1 | privMetadata: {} | privRequestId: 837751FF76054BEB909557AAB2F91BD8 | privSessionId: | privAudioSourceId: AE851DFA346746BC8D7B9854CB156200 | privAudioNodeId: 35F86F321EB34C928EBADB3B6CA0D314 Error: 'Unhandled callback error: Error: 'Cannot reject a completed promise'. InnerError: 'Unhandled callback error: Error: 'Cannot reject a completed promise''' |
Just to be sure... It's a LUIS EndPoint key and not an authoring key? The first part of this HowTo goes into the setup and key extraction steps: Glad to help, sorry this is so confusing and complicated. |
I was using the Starter key. Creating a LUIS resource and assigning my app to the resource solved the issue. Thank you very much for the assist! |
Maybe subKey was wrong |
Closing the issue as resolved. |
@aditya-protonn I see you already opened an issue for this in the JS SDK repo. We will follow up there. |
I am facing the same error when trying to run the speech-to-text azure cognitive service sample. The reason for the result remains undefined though I regenerated the subscription key. Below is the error that appears in console @therowf,@aditya-protonn,@Slinjez is your issue resolved? |
My issue was resolved by waiting a second between requests 🤔 I think we are hitting the 20 request/minute limit in the free plan |
I encountered this message with expired tokens. I used a next.js |
I just copied and pasted the node js code and replace the filename, key, and region but it throws the following error:
E:\Upwork\stt\stt-new\controllers>node microsoft.js
Now recognizing from: m1561477818826.wav
SpeechRecognitionResult {
privResultId: '1530E7597EE7496E91747B86931F79F9',
privReason: 1,
privText: undefined,
privDuration: undefined,
privOffset: undefined,
privErrorDetails:
'Unable to contact server. StatusCode: 1006, undefined Reason: ',
privJson: undefined,
privProperties:
PropertyCollection {
privKeys: [ 'CancellationErrorCode' ],
privValues: [ 'ConnectionFailure' ] } }
Trace: err - Runtime error: Unable to contact server. StatusCode: 1006, undefined Reason:
at E:\Upwork\stt\stt-new\controllers\microsoft.js:56:13
at E:\Upwork\stt\stt-new\node_modules\microsoft-cognitiveservices-speech-sdk\distrib\lib\src\sdk\SpeechRecognizer.js:157:21
at E:\Upwork\stt\stt-new\node_modules\microsoft-cognitiveservices-speech-sdk\distrib\lib\src\sdk\Recognizer.js:129:17
at Sink.executeErrorCallback (E:\Upwork\stt\stt-new\node_modules\microsoft-cognitiveservices-speech-sdk\distrib\lib\src\common\Promise.js:351:21)
at Sink.reject (E:\Upwork\stt\stt-new\node_modules\microsoft-cognitiveservices-speech-sdk\distrib\lib\src\common\Promise.js:318:23)
at Deferred.reject (E:\Upwork\stt\stt-new\node_modules\microsoft-cognitiveservices-speech-sdk\distrib\lib\src\common\Promise.js:281:28)
at E:\Upwork\stt\stt-new\node_modules\microsoft-cognitiveservices-speech-sdk\distrib\lib\src\common\Promise.js:193:46
at Sink.executeErrorCallback (E:\Upwork\stt\stt-new\node_modules\microsoft-cognitiveservices-speech-sdk\distrib\lib\src\common\Promise.js:351:21)
at Sink.reject (E:\Upwork\stt\stt-new\node_modules\microsoft-cognitiveservices-speech-sdk\distrib\lib\src\common\Promise.js:318:23)
at Deferred.reject (E:\Upwork\stt\stt-new\node_modules\microsoft-cognitiveservices-speech-sdk\distrib\lib\src\common\Promise.js:281:28)
E:\Upwork\stt\stt-new\node_modules\microsoft-cognitiveservices-speech-sdk\distrib\lib\src\common\Promise.js:354
throw new Error("'Unhandled callback error: " + e + ". InnerError: " + error + "'");
^
Error: 'Unhandled callback error: Error: 'Cannot reject a completed promise'. InnerError: 'Unhandled callback error: Error: 'Cannot reject a completed promise'''
at Sink.executeErrorCallback (E:\Upwork\stt\stt-new\node_modules\microsoft-cognitiveservices-speech-sdk\distrib\lib\src\common\Promise.js:354:27)
at Sink.executeSuccessCallback (E:\Upwork\stt\stt-new\node_modules\microsoft-cognitiveservices-speech-sdk\distrib\lib\src\common\Promise.js:345:23)
at Sink.resolve (E:\Upwork\stt\stt-new\node_modules\microsoft-cognitiveservices-speech-sdk\distrib\lib\src\common\Promise.js:306:23)
at Deferred.resolve (E:\Upwork\stt\stt-new\node_modules\microsoft-cognitiveservices-speech-sdk\distrib\lib\src\common\Promise.js:277:28)
at WebSocket._this.privWebsocketClient.onclose (E:\Upwork\stt\stt-new\node_modules\microsoft-cognitiveservices-speech-sdk\distrib\lib\src\common.browser\WebsocketMessageAdapter.js:107:59)
at WebSocket.onClose (E:\Upwork\stt\stt-new\node_modules\microsoft-cognitiveservices-speech-sdk\node_modules\ws\lib\event-target.js:124:16)
at WebSocket.emit (events.js:182:13)
at WebSocket.emitClose (E:\Upwork\stt\stt-new\node_modules\microsoft-cognitiveservices-speech-sdk\node_modules\ws\lib\websocket.js:182:12)
at ClientRequest.req.on (E:\Upwork\stt\stt-new\node_modules\microsoft-cognitiveservices-speech-sdk\node_modules\ws\lib\websocket.js:569:15)
at ClientRequest.emit (events.js:182:13)
Here is my code
The text was updated successfully, but these errors were encountered: