question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sign out not working with direct line speech adapters

See original GitHub issue

Version

4.11.0 CDN

Describe the bug

Our bot uses oauth cards to sign in and out our users. When we use just the direct line i.e:

 <script>
        (async function () {
           const res = await fetch('@settings.TokenURL', { method: 'POST' });
           const { token } = await res.json();

            window.WebChat.renderWebChat(
                {
                   
                    directLine: window.WebChat.createDirectLine({ token })
                },
                document.getElementById('webchat')
            );

            document.querySelector('#webchat > *').focus();
        })().catch(err => console.error(err));

    </script>

… every thing is fine … but when we use direct line speech we get an error

<script>
        (async function () {

           const adapters = await window.WebChat.createDirectLineSpeechAdapters({
                    fetchCredentials: {
                    region: 'westus2',
                    subscriptionKey: '<Our Cognitive Service Speech Key>'
               }
            });

            window.WebChat.renderWebChat(
                {
                    ...adapters
                
                },
                document.getElementById('webchat')
            );

            document.querySelector('#webchat > *').focus();
        })().catch(err => console.error(err));

    </script>

The error we get is as follows:

<img width="1917" alt="DirectLineSpeechError" src="https://user-images.githubusercontent.com/31521018/105133034-4ef89000-5ac2-11eb-910b-f323666b8530.png">

As you can see in addition to getting errors for : https://api.botframework.com/api/usertoken/GetToken?userId=<Guid>%7C0000&connectionName=BotOAuthConnection2&channelId=directlinespeech

We get errors for making this calls as well: https://api.botframework.com/api/usertoken/SignOut?userId=<Guid>%7C0000&connectionName=BotOAuthConnection2&channelId=directlinespeech

Steps to reproduce

  1. Create a bot with login and logout capabilities
  2. Implement direct line speech capability
  3. Try to logout

Expected behavior

We expect it the sign out behavior to be exactly the same as when we use just the direct line without the speech.

Additional context

Also with direct line speech we are get “Magic Numbers” when trying to login. We also use Azure AD2 B2C for login.

[Bug]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Zerrythcommented, Feb 18, 2021

Chiming in here again – I have still not received any responses from the people I’ve reached out to, trying to confirm whether or not Direct Line Speech actually supports OAuthPrompt.

Additionally, without confirmation from the Speech side, this seems to be more of service issue with Direct Line Speech rather than an issue with Web Chat or the Bot Framework SDK, because ultimately if DLS doesn’t support OAuthPrompt, then it wouldn’t work in Web Chat or any other channel (like Teams) for example.

Update: also here’s a link to my personal repo, where I did investigating with DLS + another channel (not WC). As you can see, the other channels don’t seem to support OAuthPrompt with DLS (however they do with “normal” DL)

1reaction
ObsidianDeltacommented, Jan 20, 2021

@Zerryth We have built the bot in C#.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use Direct Line Speech in your bot in Bot Framework SDK
Use Direct Line Speech with bots. See how bots can use a streaming capability based on WebSockets to exchange messages with this channel....
Read more >
WebChat - Direct Line Speech adapter error: WebSocket ...
I have a Bot service running on Azure.
Read more >
Dragon Support and Troubleshooting Tutorials
A source of speech recognition software, high quality microphones, and Speech Recognition Troubleshooting Tutorials.
Read more >
Conversational AI platform overview and comparison: Alan AI ...
It is powered by the Bot Framework and its Direct Line Speech channel, which is optimized for voice-in, voice-out interaction with bots.
Read more >
Known issues - Microsoft Open Source
The information in this documentation is not guaranteed to work for Bot Framework SDK versions past 4.9.1. Known issues. HTTP 401 Error when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found