Hello Francesco Baldi,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you are having TypeError: String.prototype.indexOf called on null or undefined and
MsPortalFx.Base.Diagnostics.Telemetry MsPortalFx.Base.Diagnostics.Telemetry error, while creating a bot from the 'Deploy knowledge base' inside Language Studio.
The error indexOf
errors in JavaScript often occur when trying to call the method on a null
or undefined
object. This can be due to various reasons, including internal bugs or API misconfigurations. Check this link - https://github.com/microsoft/BotFramework-Composer/issues/9663 Also, Telemetry errors can indicate that Azure's logging system is overwhelmed, potentially pointing to a broader issue affecting multiple users, check this link - https://learn.microsoft.com/en-us/troubleshoot/azure/azure-monitor/app-insights/telemetry/opentelemetry-troubleshooting-python and https://github.com/Azure/azure-sdk-for-python/issues/33623
Since this is a client-side error in Azure Portal, the best approach is to confirm whether it is a Microsoft-side issue. The workaround I can suggest are the followings:
Step 1: Before troubleshooting locally, confirm whether this is a known issue by:
Checking Azure Service Health on Azure Status page - https://status.azure.com/status to affirm if there are ongoing incidents for Azure Language Services or Bot Service. If Azure reports issues, wait until Microsoft resolves them before trying again. If not check the Azure Portal Logs for Internal errors look for any incident reports related to Language Studio, QnA Maker, or Bot Service.
Step 2: You will need to confirm that the Language Resource key is valid:
Navigate to Azure Portal > Language Studio > Your Language Resource. Go to Keys and Endpoint and verify:
- The key matches the one used in deployment.
- The resource is active and not deleted or moved.
If the key is invalid, regenerate a new key and retry deployment.
Step 3: Use an incognito browser or private mode or different device. Since the error occurs in the Azure Portal UI, it could be caused by cached scripts or cookies.
Try:
- Opening Azure Portal in an Incognito/Private Browsing Window.
- Using a different browser (Edge, Chrome, Firefox).
- Accessing Azure Portal from a different device (e.g., try from a mobile browser).
If it works in incognito mode, clearing browser cache and cookies may resolve the issue.
Step 4: Since the error is UI-based, debugging the browser console can give insight into what Azure is failing to fetch:
- Open Developer Tools (F12) > Console Tab.
- Look for API calls failing (e.g., 400 Bad Request, 500 Internal Server Error).
- If errors point to a missing or invalid Language Resource ID, update the ID in Azure Portal > Language Resource > Keys & Endpoints.
Step 5: Instead of relying on the UI, you can use Azure CLI or PowerShell to validate the required resources:
# List Language Resources
az cognitiveservices account list --resource-group <YourResourceGroup> --output table
<#
This will confirm if the **Language Resource exists.
Check Subscription Quotas
#>
# If the deployment fails due to quota limits, check available resources
az cognitiveservices account show --name <YourLanguageResourceName> --query "sku"
Step 6: If all else fails, the issue may be an internal Azure bug. Try to escalate Microsoft Azure Support by submit a support ticket via Azure Portal > Help + Support.
I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.