Closed Progressive-Programmer closed 8 months ago
Thank you for contacting us! Any issue or feedback from you is quite important to us. We will do our best to fully respond to your issue as soon as possible. Sometimes additional investigations may be needed, we will usually get back to you within 2 days by adding comments to this issue. Please stay tuned.
Could you let me know if you're sure you have correctly deployed and started the Azure App Service or Azure Function backend service?
Please use curl or postman request to the backend service API like below:
curl --location 'https://YOUR_AZURE_DOMAIN.azurewebsites.net/api/messages' \
--header 'Content-Type: application/json' \
--data '{}'
If the response is 500 not 4xx, then the App Service is worked. If not, please check the deployment logs at the Azure portal - App Service - Deployment Center - logs - commit ID.
If the backend service is working but you can't get response from the bot service, please try to delete the existing cloud resource and rerun the provision process again.
Deleted these three services and used Teams Toolkit to deploy again
Deployment logs commit ID- 2205c9029a.
After the deployment tested the curl link: curl --location 'https://appdev46d1a7bot.azurewebsites.net/api/messages' \ --header 'Content-Type: application/json' \ --data '{}'
The curl request is responding 500
BOT ID : e71de7ff-96b0-4a22-bae6-1c0766f1abe0 Error log from bot channels
@ Progressive-Programmer Your deployment and App Service are running well.
You can add more request handlers like /hello to echo hello world into your index.js or index.ts like below, it will skip the user authentication process to avoid this 500 error and curl the https://[YOUR_DOMAIN]/hello
and check the output to verify the deploy status.
server.get("/hello", async (req, res) => {
res.send("Hello World");
});
And the problem may happen in your Bot Service connecting to App Service or Bot Service connecting to Teams App. For bot service connecting to App Service:
For Teams App connect to Bot Service:
Please tell us which one is not correct in those actions and we can do more investigation.
Sharing my findings: BOT_ID=e71de7ff-96b0-4a22-bae6-1c0766f1abe0
Check your Azure Portal - [Your Bot Service] - Configuration - Microsoft App ID. Make sure it's equal to the BOT_ID in [your project root]/env/.env.[your env name] file. The bot_id matches in both places
Check your Azure Portal - [Your App Servicce] - Settings - Environment variables - App Settings. Make sure the BOT_ID and the BOT_PASSWORD are the same as the content in your[your project root]/env/.env.[your env name] and [your project root]/env/.env.[your env name].user file.
I did not find the exact path you shared here: Within Settings menu on the left I didn't see - Environment variables - App Settings.
For Teams App connect to Bot Service: The bot id is common in both
Check your Azure Portal - [Your App Servicce] - Settings - Environment variables - App Settings. Make sure the BOT_ID and the BOT_PASSWORD are the same as the content in your[your project root]/env/.env.[your env name] and [your project root]/env/.env.[your env name].user file.
I did not find the exact path you shared here: Within Settings menu on the left I didn't see - Environment variables - App Settings.
Most of the snapshot you provided appears to be well-configured. However, the configuration of the Azure App Service is still unclear. That's because I'm using the preview version of the Azure Portal, but you're still in the right place.
Please check the BOT_PASSWARD is correct on this page with your env file of the project.
BOT_ID & BOT_PASSWORD was not there by default after deployment. I just added it now and restarted the App Service. Checked Web Bot - but it did not respond.
Just to confirm when we run debug mode in local a separate bot_id is generated .env.local has a different bot_id than .env.dev
Hi @Progressive-Programmer The bot_password is set in the .env.dev.user file which keeps the secret env value. You can remove the bot in .env.dev and secret_bot_password in .env.dev.user and try to execute provision again.
It seems this project has been upgraded, is that right? Is the project provisioned before upgrade and no provision after upgrade? Also, could you tell me the update/change it has before upgrade?
Just to confirm when we run debug mode in local a separate bot_id is generated .env.local has a different bot_id than .env.dev
@Progressive-Programmer Yes, they are in different environments, and will not share any provision results.
So,
I removed bot_id and bot_password and run provisioned again. the bot did not work.
then I removed the entire resource and the .env variables associated with it and stared fresh with provision and deployment and the bot still did not respond
the bot is responding on local
BOT_ID=293bb708-fbf0-4f6d-a6b9-c734bcea1846 is the new dev bot
"It seems this project has been upgraded, is that right? Is the project provisioned before upgrade and no provision after upgrade?" I am not sure what are you referring to by this, can you pls elaborate
- then I removed the entire resource and the .env variables associated with it and stared fresh with provision and deployment and the bot still did not respond
@Progressive-Programmer Is the health issue still present after you take this action?
Yes the health issue is still there
Yes the health issue is still there
@Progressive-Programmer
Did you remove the BOT_ID and BOT_PASSWORD when you deleted the variables in .env? If the BOT_ID & BOT_PASSWARDS exist they will not be created again.
Please try the following actions:
teamsapp.yml
in the project root.@Progressive-Programmer As the project provision and deployment is successful, please try to use the Launch Remote in debug to check the project.
After launched the teams app in browser (Chrome/Edge), open the developer tools by click F12 in browser. Try to trigger the bot request and watch the network request to check the response.
"It seems this project has been upgraded, is that right? Is the project provisioned before upgrade and no provision after upgrade?" I am not sure what are you referring to by this, can you pls elaborate
I found the key pattern in .env.dev and there is a .backup folder in project. It shows it is a upgraded project from v4.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
Due to lack of details for further investigation, we will archive the issue for now. In case you still have following-up questions on this issue, please always feel free to reopen the issue by clicking ‘reopen issue’ button below the comment box. We will get back to you as soon as possible.
Describe the bug A clear and concise description of what the bug is. Deployed a new bot created from basic bot sample. The bot responds when run in the local. The bot was deployed using Teams Toolkit. The deployed bot is not responding.
To Reproduce Steps to reproduce the behavior:
Expected behavior The deployed bot should respond.
Screenshots Azure logs
VS Code Extension Information (please complete the following information):
CLI Information (please complete the following information):
Additional context This issue was raised with development consultation team originally. It was then suggested by them to raise the issue here as it was their diagnosis that this issue is caused with the new teams toolkit version.