Botframework-solutions: deploy script errs out with "The specified app service plan was not found"

Created on 27 Nov 2019  ·  21Comments  ·  Source: microsoft/botframework-solutions

What project is affected?

Virtual Assistant Template

What language is this in?

C#

What happens?

deploy.ps1 fails every time with the following json regardless of the input parameters

{ "error": { "additionalInfo": null, "code": "InvalidTemplateDeployment", "details": [ { "additionalInfo": null, "code": "ValidationForResourceFailed", "details": [ { "additionalInfo": null, "code": "ServerFarmNotFound", "details": null, "message": "The specified app service plan was not found.", "target": null } ], "message": "Validation failed for a resource. Check 'Error.Details[0]' for more information.", "target": null } ], "message": "The template deployment 'deployment_dry_run' is not valid according to the validation procedure. The tracking id is 'af4be6f7-cdd6-448d-9867-8a4bd0ac952c'. See inner errors for details.", "target": null }, "properties": null }

What are the steps to reproduce this issue?

Run deploy.ps1 in powershell 6.2.3 and enter the params as prompted

What were you expecting to happen?

Services to be deployed.

Can you share any logs, error output, etc.?

Included.

Any screenshots or additional context?

Bug

Most helpful comment

Ok, the team has gotten back on the issue.

Try changing this line to this:

"serverFarmId": "[concat('/subscriptions/', Subscription().SubscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', parameters('appServicePlanName'))]",

Let me know if it resolves the issue.

All 21 comments

pwsh output:

PS /Volumes/Data/Projects/Wendys/Bot/VirtualAssistantSample> ./Deployment/Scripts/deploy.ps1
Bot Name (used as default name for resource group and deployed resources): robtestbot98776r
Azure resource group region: westus
Password for MSA app registration (must be at least 16 characters long, contain at least 1 special character, and contain at least 1 numeric character): RandoPwd......3!24jgjd
LUIS Authoring Region (westus, westeurope, or australiaeast): westus
LUIS Authoring Key (found at https://luis.ai/user/settings): ebfff00807a54....e5ea246974
Creating resource group ...
Validating Azure deployment ...
Template is not valid with provided parameters. Review the log for more information.
Error: The template deployment 'deployment_dry_run' is not valid according to the validation procedure. The tracking id is '0e9e5f83-2b8a-4442-a5c5-080cccb6fab6'. See inner errors for details.
Log: /Volumes/Data/Projects/Wendys/Bot/VirtualAssistantSample/Deployment/Scripts/../deploy_log.txt
To delete this resource group, run 'az group delete -g robtestbot98776r --no-wait'
PS /Volumes/Data/Projects/Wendys/Bot/VirtualAssistantSample>

I tried a manual deployment using ARM and it errs out w/ the same error message.

Hi @rob-derosa, this looks like an issue with the QnA Maker service in Azure. I have reached out to the team and will update this issue as soon as I hear back.

In the meantime, you might need to removed the QnA services from the arm template in order to get the deployment working.

Where does the arm template live? I couldn't find one in the template.

Its Deployment\Resources\template.json

Gotcha. Updated to remove QnA references and deployment worked. Thanks for the workaround.

Update: This appears to only be affecting westus, so changing to another region is another workaround.

same error on westeurope @lauren-mills

@tamerin-tech - I was just able to deploy to westeurope using the arm template. Can you send any logs across?

Ok, the team has gotten back on the issue.

Try changing this line to this:

"serverFarmId": "[concat('/subscriptions/', Subscription().SubscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', parameters('appServicePlanName'))]",

Let me know if it resolves the issue.

Hi @lauren-mills! We successfully deployed a Virtual Assistant with your suggestion.

In the case of the TypeScript Virtual Assistant is the following line.

image

Should we update the deployment scripts for the TypeScript solutions or just wait to confirm these changes?

I'm working on some other updates, so I'll take care of it at the same time! Thanks

Guys, I hit this same issue today in one of my subscription and with the change @lauren-mills said it's working but.....yesterday I used the very same code (which I'm using for more than a year) in another subscription (and region) and it worked.
¿how is this possible?
¿how you can make this kind of breaking changes in an "interface" suddenly?

It's pretty difficult keep all the stuff automated with these issues

There were some regional operational issues with QnAMaker which were then addressed so should be resolved. We also updated scripts

This still happens. In some regions seems to work the "old way". Which one is "the good one"?

Ok, the team has gotten back on the issue.

Try changing this line to this:

"serverFarmId": "[concat('/subscriptions/', Subscription().SubscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', parameters('appServicePlanName'))]",

Let me know if it resolves the issue.

This helped me to resolve the issue. I will also take the latest template/script as it seems fixed in it.

I've just run into this issue today and was chasing my tail all morning as i'd made some other changes to my ARM template on Friday and I thought it was related to that. Thankfully @lauren-mills suggestion solved it for now.

I just ran in to this issue my self.
I needed to reduce the path of server farm reference before the AppServicePlanName
expected value is "resourceId('Microsoft.Web/serverfarms"

web app section that is working now fine:
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('AppServicePlanName'))]",

Hope it helps someone

I had this issue today and the reason was a mismatch in the "location" - make sure you are intelligent and are using the same location across all your resources... not like me :)

"[concat('/subscriptions/', Subscription().SubscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', parameters('appServicePlanName'))]",

This reply by lauren-mills saved my day. Just that parameters('appServicePlanName') may have to be replaced with variables('') if the name is retrieved from variables, not from parameters.

Was this page helpful?
0 / 5 - 0 ratings