azure-search-openai-demo
azure-search-openai-demo copied to clipboard
Getting "TypeError: Cannot read properties of undefined (reading 'role')"
Please provide us with the following information:
when I run "azd env set AZURE_USE_AUTHENTICATION true","azd env set AZURE_AUTH_TENANT_ID <YOUR-TENANT-ID>"a nd "azd up" , It didn't create Entra ID App , So manually created the app and configured as in the documentation. After running "azd up" and tried to query, getting the error "TypeError: Cannot read properties of undefined (reading 'role')" and while uploading pdf getting "Error uploading files - contact admin"
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
Any log messages given by the failure
Have all these logs in App Service : 2024-02-08T19:30:33.441385332Z Site's appCommandLine: python3 -m gunicorn main:app This log indicates that App Service was correctly configured with a custom startup command to run the app. [2024-02-08 19:31:11 +0000] [75] [INFO] Starting gunicorn 20.1.0 That's the start of the gunicorn server serving the app. 2024-02-08T19:32:20.726942614Z [2024-02-08 19:32:20 +0000] [77] [INFO] Application startup complete. At this point, the app has started successfully.
Expected/desired behavior
OS and Version?
Windows 10, Linux
azd version?
run
azd version1.9.5
Versions
Mention any other details that might be useful
I have created environment with App services , Search services, Document intelligence to free tier and used OpenAI API key. Enabled login and user upload features. I have set in a way to use free services and use manage files feature. I have attached commands that I have executed.
azd auth login azd env new azd env set AZURE_USE_AUTHENTICATION true azd env set AZURE_ENFORCE_ACCESS_CONTROL true azd env set AZURE_ENABLE_GLOBAL_DOCUMENT_ACCESS true azd env set AZURE_AUTH_TENANT_ID <YOUR-TENANT-ID> azd env set USE_USER_UPLOAD true azd env set AZURE_APP_SERVICE_SKU F1 azd env set AZURE_SEARCH_SERVICE_SKU free azd env set AZURE_DOCUMENTINTELLIGENCE_SKU F0 azd env set OPENAI_HOST openai azd env set OPENAI_API_KEY {Your OpenAI API key} azd up.
When I deployed in Azure Portal it Automatically didn't create APP registrations and shows Type Error in chat and "Error uploading" in + manage upload files.
Thanks! We'll be in touch soon.