Skip to content

direct-line-speech sample needs CORS fix #5594

Open

Description

@jairo-codes

Is it an issue related to Adaptive Cards?

No response

Is this an accessibility issue?

No response

What version of Web Chat are you using?

Latest production

Which distribution are you using Web Chat from?

Bundle (webchat.js)

Which hosting environment does this issue primarily affect?

Web apps

Which browsers and platforms do the issue happened?

No response

Which area does this issue affect?

No response

Which theme pack does this issue affect?

I did not test it on other theme packs

What is the public URL for the website?

https://github.com/microsoft/BotFramework-WebChat/blob/main/samples/03.speech/a.direct-line-speech/index.html

Please describe the bug

When running sample for directline to speech get this error:

Access to fetch at 'https://webchat-mockbot-streaming.azurewebsites.net/speechservices/token' from origin 'https://microsoft.github.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Do you see any errors in console log?

yes, this one:

Access to fetch at 'https://webchat-mockbot-streaming.azurewebsites.net/speechservices/token' from origin 'https://microsoft.github.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

and:

POST https://webchat-mockbot-streaming.azurewebsites.net/speechservices/token net::ERR_FAILED 500 (Internal Server Error)

and: 

TypeError: Failed to fetch
    at fetchCredentials (a.direct-line-speech/:42:29)
    at lj (webchat.js:2:3531402)
    at fj (webchat.js:2:3531974)
    at Object.R2 [as createDirectLineSpeechAdapters] (webchat.js:2:3995682)
    at a.direct-line-speech/:57:47
    at a.direct-line-speech/:70:9

How to reproduce the issue?

  1. Just open the sample: https://microsoft.github.io/BotFramework-WebChat/03.speech/a.direct-line-speech/
  2. Open browser devtools

What do you expect?

Working sample

What actually happened?

Blank page, no errors displayed on sample:

Image

Do you have any screenshots or recordings to repro the issue?

No response

Adaptive Card JSON

Additional context

No response

Activity

  1. added
    bugIndicates an unexpected problem or an unintended behavior.
    customer-reportedRequired for internal Azure reporting. Do not delete.
    Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.
    on Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.bugIndicates an unexpected problem or an unintended behavior.customer-reportedRequired for internal Azure reporting. Do not delete.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions