Skip to content
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

Error code: 1002. Error details: The server returned status code '401' when status code '101' was expected #553

Open
Fatichti opened this issue Apr 12, 2021 · 5 comments

Comments

@Fatichti
Copy link

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

The issue

I have done everything that was indicated here, everything works, on the Bot emulator works perfectly and I have the "Your bot is ready" page.
However, when I want to connect with Windows Voice Assistant Client, I get an error message

Any log messages given by the failure

Error (ConnectionFailure) : Connection was closed by the remote host. Error code: 1002. Error details: The server returned status code '401' when status code '101' was expected

Expected/desired behavior

A Hello and welcome message

OS and Version?

Windows 10

Mention any other details that might be useful

I checked the "Enable Streaming Endpoint" box and toggled "Web sockets" to On
I restarted the cognitive services, without success.
All my resources are in USA West except 1 which is in global, but that's normal.
I tested with PowerShell as shown here, to see if the keys were invalid but I don't get an error, I get a response with lots of characters (about a hundred).
I put the language en-FR then the default one, but without succes

@Fatichti Fatichti changed the title rror code: 1002. Error details: The server returned status code '401' when status code '101' was expected Error code: 1002. Error details: The server returned status code '401' when status code '101' was expected Apr 12, 2021
@trrwilson
Copy link
Member

Thanks for getting in touch!

A "401" auth-style failure like this generally indicates that there was trouble connecting to your bot from the Direct Line Speech service -- confusingly enough, this is error message from one service telling you it couldn't handshake with another server!

Can you please check the following:

  • In the Azure Portal, if you navigate to your "Bot Channels Registration" resource and check "Channels" (left navbar), is the Direct Line Speech channel registered, does it report any errors, and/or is it associated with the expected speech resource when you click on "edit?"
  • To that point, make sure the resource the DLS channel registration is pointing to is the same one you're using for your subscription key in the client -- there are enough of these things that it's easy to mix them up!
  • If you navigate to the App Service resource for your bot and check "Settings >> Configuration" on the left, then navigate to "general settings" (top tabs), is "Web sockets" (roughly middle of the page) radio-buttoned to "on?"

Those are the most common gotchas. If all of that looks good and it's still being stubborn, please grab a log (by populating the "log file path" options in the Windows Voice Assistant Client or by following these steps for your own app) and share it with us here -- we can use the request IDs to look up more detail on the service side.

Thanks!

@Fatichti
Copy link
Author

Hello,

Thank you for taking the time to reply.
I checked all the steps, everything is good.
I have shared the log file.
log_WVAC.txt

@albanoandrea
Copy link

Did you tested the bot in web chat following this?
We had a similar issue and we fixed it when doing that procedure.

@socullen
Copy link

socullen commented Jul 7, 2022

I am facing the same issue. On top of this I am unable to test the bot in web chat. The instructions shown in the tutorial seem to not work.

@aditya-azad
Copy link

aditya-azad commented Jan 13, 2023

I am having the same issue. Also for the web chat, I am unable to access the password manager (It says: Insufficient privileges to complete the operation, but I am the admin). I followed the tutorial that @albanoandrea has suggested from start to finish but it does not work. logs.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants