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

Full sample issues running locally #5395

Closed
MRJordanGracia opened this issue Dec 20, 2024 · 1 comment
Closed

Full sample issues running locally #5395

MRJordanGracia opened this issue Dec 20, 2024 · 1 comment
Assignees
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-reported Required for internal Azure reporting. Do not delete. question Further information is requested. Stack Overflow candidate

Comments

@MRJordanGracia
Copy link

I have a question

Hi, I'm following the tutorial on this page https://github.com/microsoft/BotFramework-WebChat/blob/main/samples/01.getting-started/a.full-bundle/README.md to run locally the the sample, but, when I try using the url directly or MockBot, all the time I have an error in this call
https://hawo-mockbot4-token-app.blueriver-ce85e8f0.westus.azurecontainerapps.io/api/token/directline and In the console's browser I see this errors:

a.full-bundle/:1 Access to fetch at 'https://hawo-mockbot4-token-app.blueriver-ce85e8f0.westus.azurecontainerapps.io/api/token/directline' from origin 'https://microsoft.github.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
a.full-bundle/:36

POST https://hawo-mockbot4-token-app.blueriver-ce85e8f0.westus.azurecontainerapps.io/api/token/directline net::ERR_FAILED 500 (Internal Server Error)
(anonymous) @ a.full-bundle/:36
(anonymous) @ a.full-bundle/:50

a.full-bundle/:50 TypeError: Failed to fetch
at a.full-bundle/:36:27
at a.full-bundle/:50:9

So, what I'm missing that the sample is not woking for me?
Regards.

@MRJordanGracia MRJordanGracia added Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-reported Required for internal Azure reporting. Do not delete. question Further information is requested. Stack Overflow candidate labels Dec 20, 2024
@stevkan stevkan self-assigned this Dec 20, 2024
@stevkan
Copy link
Collaborator

stevkan commented Dec 20, 2024

@MRJordanGracia - The reason you are getting the error is because your site is not authorized to access the token endpoint used in this sample (https://hawo-mockbot4-token-app.blueriver-ce85e8f0.westus.azurecontainerapps.io/api/token/directline). Hence, the CORS message. You need to create your own token server. This Stack Overflow answer demonstrates how you can easily do this.

I'm closing this as resolved. Please note the below message for future reference.


The Microsoft Bot Framework team prefers that how to questions be submitted on Stack Overflow. The official Bot Framework-WebChat GitHub repo is the preferred platform for information on submitting bug fixes and feature requests.

@stevkan stevkan closed this as completed Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-reported Required for internal Azure reporting. Do not delete. question Further information is requested. Stack Overflow candidate
Projects
None yet
Development

No branches or pull requests

2 participants