Closed
Description
Trying to run the Basic AI Bot template.
After creating the project, when I try to "Prepare Dependencies"
Error
Preparing Teams app dependencies failed. Check the Teams Toolkit Output window for more information.
Executing provision
Lifecycle stage: provision(8 step(s) in total). The following actions will be executed:
(1/8) Action teamsApp/create: create Teams app.
(2/8) Action aadApp/create: Create a Microsoft Entra app to authenticate users
(3/8) Action file/createOrUpdateJsonFile: Create or update JSON file.
(4/8) Action botFramework/create: creates or updates the bot registration on dev.botframework.com
(5/8) Action teamsApp/validateManifest: validate Teams app.
(6/8) Action teamsApp/zipAppPackage: build Teams app package.
(7/8) Action teamsApp/validateAppPackage: validate Teams app.
(8/8) Action teamsApp/update: update Teams app.
Executing lifecycle provision
Executing action teamsApp/create in lifecycle provision
Teams app 2f70d93f-9dde-452d-999f-8c6c44e977dc created successfully
Action teamsApp/create in lifecycle provision succeeded with output {"TEAMS_APP_ID":"XXXXXX","TEAMS_APP_TENANT_ID":"XXXXX"}
Executing action aadApp/create in lifecycle provision
Executing action aadApp/create
Environment variable BOT_ID does not exist, creating a new Microsoft Entra app...
Created Microsoft Entra application with object id XXXX
Environment variable SECRET_BOT_PASSWORD does not exist, generating client secret for Microsoft Entra app...
Generated client secret for Microsoft Entra application with object id XXXXX
Action aadApp/create executed successfully
Action aadApp/create in lifecycle provision succeeded with output {"BOT_ID":"****","BOT_OBJECT_ID":"*****","SECRET_BOT_PASSWORD":"******"}
Executing action file/createOrUpdateJsonFile in lifecycle provision
Action file/createOrUpdateJsonFile in lifecycle provision succeeded with output {}
Executing action botFramework/create in lifecycle provision
Unresolved placeholders(BOT_ENDPOINT) found for Action botFramework/create in lifecycle provision
Failed to Execute lifecycle provision because there are unresolved placeholders ["BOT_ENDPOINT"] for action: botFramework/create. Env output: {"TEAMS_APP_ID":"****","TEAMS_APP_TENANT_ID":"XXXXXX","BOT_ID":"XXXX","BOT_OBJECT_ID":"XXXX","SECRET_BOT_PASSWORD":"******"}
Execution summary:
Summary:
(×) Error: Lifecycle stage provision failed.
(√) Done: teamsApp/create was executed successfully.
(√) Done: Teams app 2f70d93f-9dde-452d-999f-8c6c44e977dc created successfully
(√) Done: aadApp/create was executed successfully.
(√) Done: Created Microsoft Entra application with object id XXX
(√) Done: Generated client secret for Microsoft Entra application with object idXXXXX
(√) Done: file/createOrUpdateJsonFile was executed successfully.
(√) Done: Json file has been successfully generated to ../MyAIBot/appsettings.Development.json.
(×) Error: botFramework/create failed.
(×) Error: Unresolved placeholders: BOT_ENDPOINT
(!) Warning: teamsApp/validateManifest was not executed.
(!) Warning: teamsApp/zipAppPackage was not executed.
(!) Warning: teamsApp/validateAppPackage was not executed.
(!) Warning: teamsApp/update was not executed.
{
"errorType": "UserError",
"source": "botFrameworkCreate",
"name": "MissingEnvironmentVariablesError",
"message": "Missing environment variables 'BOT_ENDPOINT' for file: D:\\source\\ttk_apps\\MyAIBot\\TeamsApp\\teamsapp.local.yml. Please edit the .env file 'D:\\source\\ttk_apps\\MyAIBot\\TeamsApp\\env\\.env.local' or 'D:\\source\\ttk_apps\\MyAIBot\\TeamsApp\\env\\.env.local.user', or adjust system environment variables. For new Teams Toolkit projects, make sure you've run provision or debug to set these variables correctly.",
"stack": "MissingEnvironmentVariablesError: Missing environment variables 'BOT_ENDPOINT' for file: D:\\source\\ttk_apps\\MyAIBot\\TeamsApp\\teamsapp.local.yml. Please edit the .env file 'D:\\source\\ttk_apps\\MyAIBot\\TeamsApp\\env\\.env.local' or 'D:\\source\\ttk_apps\\MyAIBot\\TeamsApp\\env\\.env.local.user', or adjust system environment variables. For new Teams Toolkit projects, make sure you've run provision or debug to set these variables correctly.\n at Coordinator.convertExecuteResult (C:\\snaps...
"innerError": null,
"userData": null,
"timestamp": "2025-02-26T15:14:22.796Z",
"displayMessage": "Missing environment variables 'BOT_ENDPOINT' for file: D:\\source\\ttk_apps\\MyAIBot\\TeamsApp\\teamsapp.local.yml. Please edit the .env file 'D:\\source\\ttk_apps\\MyAIBot\\TeamsApp\\env\\.env.local' or 'D:\\source\\ttk_apps\\MyAIBot\\TeamsApp\\env\\.env.local.user', or adjust system environment variables. For new Teams Toolkit projects, make sure you've run provision or debug to set these variables correctly.",
"helpLink": "https://aka.ms/teamsfx-v5.0-guide#environments",
"issueLink": null
}