Azure-Samples / chat-with-your-data-solution-accelerator

A Solution Accelerator for the RAG pattern running in Azure, using Azure AI Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences. This includes most common requirements and best practices.
https://azure.microsoft.com/products/search
MIT License
640 stars 313 forks source link

Teams Bot isn't working - Failed to parse URL from undefined #379

Closed chkrause closed 3 months ago

chkrause commented 3 months ago

Getting Error: Failed to parse URL from undefined

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)

Minimal steps to reproduce

Follow the instructions for Teams Extension: https://github.com/Azure-Samples/chat-with-your-data-solution-accelerator/blob/main/docs/TEAMS_EXTENSION.md

Any log messages given by the failure

Running with Message Activity. TypeError: Failed to parse URL from undefinedat Object.fetch (node:internal/deps/undici/undici:11118:11)at process.processTicksAndRejections (node:internal/process/task_queues:95:5)at async Array.<anonymous> (C:\home\site\wwwroot\lib\teamsBot.js:35:38) {[cause]: TypeError [ERR_INVALID_URL]: Invalid URLat new NodeError (node:internal/errors:393:5) at URL.onParseError (node:internal/url:565:9)at new URL (node:internal/url:645:5)at new Request (node:internal/deps/undici/undici:9472:25)at Agent.fetch2 (node:internal/deps/undici/undici:10291:25)at Object.fetch (node:internal/deps/undici/undici:11116:28)at fetch (node:internal/process/pre_execution:216:25)at Array.<anonymous> (C:\home\site\wwwroot\lib\teamsBot.js:35:44)at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {input: 'undefined',code: 'ERR_INVALID_URL'}}(node:5528) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time 2024-03-04T16:42:55 No new trace in the past 1 min(s).

chkrause commented 3 months ago

I figured out that there are two environment variables hasn't been configured. One in the function app:

after seting it manually via azure portal the teams extension is working now

ross-p-smith commented 3 months ago

Thank you ever so much @chkrause - if you can put together a small PR - I'll happily approve! Thanks for finding this

chkrause commented 3 months ago

Thank you ever so much @chkrause - if you can put together a small PR - I'll happily approve! Thanks for finding this

one has already been fixed: https://github.com/Azure-Samples/chat-with-your-data-solution-accelerator/pull/344 for the other one I will create an PR

ross-p-smith commented 3 months ago

@chkrause - can we close this one? Thanks for your contribution

chkrause commented 3 months ago

Sure