OfficeDev / microsoft-teams-apps-stickers

The awesome Stickers app can help your organization enhance messaging in Microsoft Teams!
MIT License
67 stars 42 forks source link

App Service sync fails #43

Open wly-saa opened 4 years ago

wly-saa commented 4 years ago

Hello, I've been having some problems with the app. in the teams client i get an error stating the app is unreachable. after some troubleshooting I figured i would run a sync in case there was a change that wasn't applied but the sync is failing.

In one of the other posts, you recommended double checking the botID in the manifest.json. I double checked and its correct, fiddler showed a call out to the app that returned a 502 error : {"errorCode":1008,"message":"Bot returned unsuccessful status code Forbidden"}

the request header has the correct applicationID in it so i'm assuming its correct: Host: amer.ng.msg.teams.microsoft.com POST /v1/agents/28:clientApplicationID/invoke HTTP/1.1

attached is the deployment failure log from azure and a couple of screenshots.

Any help is appreciated thank you!

failedLog.txt

teamsError azurePortal

rashmi-dixit commented 4 years ago

Was the deployment successful? If so, there would be another row in the deployment center with status as "Success(Active)"

wly-saa commented 4 years ago

you're right, I think it failed and I redeployed it without deleting the resources. It would seem when ever I attempt to deploy the app it fails at the step where it creates Microsoft.Web/sites/sourcecontrols shows a Conflict (checked to make sure the base name was free) for the client app. { "status": "Failed", "error": { "code": "ResourceDeploymentFailure", "message": "The resource operation completed with terminal provisioning state 'Failed'." } }

LindaSchaar commented 4 years ago

We have the same issues, after step 2 deploy to azure we receive deployment failed. Failed: code: ResourceDeploymentFailure

wly-saa commented 4 years ago

i was able to make it work by changing the StickersTemplate Microsoft.NET.Sdk.Functions from 1.0.24 to 1.0.26

LindaSchaar commented 4 years ago

Nice! how did you change it?

wly-saa commented 4 years ago

I downloaded the files here and then change it in visual studio and uploaded it to a new repo and tested it. I want to suggest the change but honestly I'm a noob at this kind of thing and wasn't sure if it would be insulting to suggest it. Which at this point is irrelevant since, they will probably read this comment.

LindaSchaar commented 4 years ago

Ok because after 2 days successfully deploy at Azure when I try to contact de app in a team I see this: image Unable to reach app, please try again. So you say start over again? registration app and deploy to azure?

rashmi-dixit commented 4 years ago

Thank you for reporting this, we have added this to the list of issues to fix. If you do fix it before we get to it, please help the community by raising a pull request with your fix!

kunalkankariya commented 4 years ago

@rashmi-dixit ,

This is the error from the browser network trace. The bot framework's "api/messages/" endpoint is not reachable as well.

{"errorCode":1008,"message":"Bot returned unsuccessful status code NotFound"}

rashmi-dixit commented 4 years ago

Can you please confirm if the deployment was successful?

LindaSchaar commented 4 years ago

I will try the registration and deployment at a later moment. Than I will chat you if the stickers! app install was succesfull in teams

rashmi-dixit commented 4 years ago

If it is already deployed, please check in the app service's deployment center if status is "Success(Active)"

kunalkankariya commented 4 years ago

Deployment Failed for the Azure function

Build FAILED.

"D:\home\site\repository\StickersTemplate\StickersTemplate.csproj" (default target) (1:7) -> (_GenerateFunctionsExtensionsMetadataPostPublish target) -> D:\home.nuget\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.0.1\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(33,5): warning : [D:\home\site\repository\StickersTemplate\StickersTemplate.csproj] D:\home.nuget\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.0.1\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(33,5): warning : Unhandled Exception: System.IO.DirectoryNotFoundException: The path D:\home\site\repository\StickersTemplate\obj\Release\netcoreapp2.1\PubTmp\Out\bin does not exist. Unable to generate Azure Functions extensions metadata file. [D:\home\site\repository\StickersTemplate\StickersTemplate.csproj] D:\home.nuget\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.0.1\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(33,5): warning : at ExtensionsMetadataGenerator.ExtensionsMetadataGenerator.Generate(String sourcePath, String outputPath, Action`1 logger) in D:\src\gh.fabiocav\azure-functions-host\tools\ExtensionsMetadataGenerator\src\ExtensionsMetadataGenerator.Console\ExtensionsMetadataGenerator.cs:line 27 [D:\home\site\repository\StickersTemplate\StickersTemplate.csproj] D:\home.nuget\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.0.1\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(33,5): warning : at ExtensionsMetadataGenerator.Console.Program.Main(String[] args) in D:\src\gh.fabiocav\azure-functions-host\tools\ExtensionsMetadataGenerator\src\ExtensionsMetadataGenerator.Console\Program.cs:line 27 [D:\home\site\repository\StickersTemplate\StickersTemplate.csproj]

"D:\home\site\repository\StickersTemplate\StickersTemplate.csproj" (default target) (1:7) -> (_GenerateFunctionsExtensionsMetadataPostPublish target) -> D:\home.nuget\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.0.1\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(33,5): error : Metadata generation failed. [D:\home\site\repository\StickersTemplate\StickersTemplate.csproj]

LindaSchaar commented 4 years ago

@rashmi-dixit yes azure status succeeded. In teams via app studio, manifest, install app, after installing i receive unable to reach app. So why teams would not recognized the app, when azure says succeeded?

kunalkankariya commented 4 years ago

I concur with @wly-saa . Updating the package version of the Microsoft.NET.Sdk.Function to 1.0.26 does fix this. Thanks @wly-saa . May I ask how did you get to this? The error does specify the issue with extension metadata generator but how did you figure updating the version is a solution? Thanks :)

wly-saa commented 4 years ago

Honestly some google-fu on the logs from the failed deployment of the app service. Saw a suggestion on a forum with the same error and i just gave it a shot and it worked. @LindaSchaar did you check each of the services? I found that the App Service for the actual messaging app (not the config app) failed. you'll see it under deployment center.

While testing I found that the initial deployment failed, and I would hit redeploy and it would succeed but the app service deployment still showed failed in the Deployment Center blade.

kunalkankariya commented 4 years ago

@LindaSchaar you can delete both the app services and redeploy using this git url https://github.com/kunalkankariya/microsoft-teams-stickers-app-master.git

rashmi-dixit commented 4 years ago

@wly-saa, @kunalkankariya - can you please raise a pull request since it seems if you have a fix for the issue?

kunalkankariya commented 4 years ago

@wly-saa - Aren't you able to push your commit?

yeahsmaggy commented 4 years ago

@kunalkankariya does your repo link above https://github.com/kunalkankariya/microsoft-teams-stickers-app-master.git fix the "Unable to reach app. Please try again" issue in Teams? @LindaSchaar did you get it working?

kunalkankariya commented 4 years ago

@yeahsmaggy - I was able to fix issues and get the app up and running. It works in my test tenant. My repo also add animation feature to the stickers.

yeahsmaggy commented 4 years ago

@kunalkankariya so do I need to start from the beginning with the deployment steps but use your repo? How come the OfficeDev team haven't fixed the issue in the official repo?

kunalkankariya commented 4 years ago

@yeahsmaggy - What you need to do is follow all the deployment steps from here and when that's done, go to the Azure Portal and find the config app service. In the deployment center section, change the repo to my repo and you should be good.

I am not sure why the OfficeDev team won't approve the changes proposed.

yeahsmaggy commented 4 years ago

@kunalkankariya I already followed the deployments steps. Then I went to the config app service in the deployment center section and I disconnected the existing one. Then I added a new one with your repo. Any other steps as so far it has no changed the issue I have in Teams "Unable to reach app. Please try again" - perhaps I have some other issue ?

yeahsmaggy commented 4 years ago

@kunalkankariya it is working for me.

kunalkankariya commented 4 years ago

@yeahsmaggy - Glad to know that Andy! Did you face any other issues? I assume it works with my repo. You should also be able to use animated stickers (gifs). Thanks.