serverless-azure-functions icon indicating copy to clipboard operation
serverless-azure-functions copied to clipboard

Error: 'functionApp' cannot be null or undefined -- if the first time of the deployment of the RG has specified an armTemplate

Open marcoslimagon opened this issue 4 years ago • 3 comments

What's happening

When I use armTeplate sometimes the deployment of the functions fails with "functionApp cannot be null or undefines

The armTemplate is deployed succesfully.

Versions

Framework Core: 2.15.0 Plugin: 4.2.0 SDK: 2.3.2 Components: 3.4.3 "serverless-azure-functions": "2.1.0"

Details (Stacktrace)

Serverless: -> ARM deployment complete Serverless: sls-bras-dev-my-app-2-rg Serverless: sls-bras-dev-my-app-2 Serverless: {"error":{"code":"ResourceNotFound","message":"The Resource 'Microsoft.Web/sites/sls-bras-dev-my-app-2' under resource group 'sls-bras-dev-my-app-2-rg' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"}}

Error --------------------------------------------------

Error: 'functionApp' cannot be null or undefined at Function.Guard.null (...sandbox-az-functions/my-app-2/node_modules/serverless-azure-functions/lib/shared/guard.js:27:19) at FunctionAppService. (.../sandbox-az-functions/my-app-2/node_modules/serverless-azure-functions/lib/services/functionAppService.js:272:43)

marcoslimagon avatar Dec 14 '20 14:12 marcoslimagon

If I comment the armTemplate attribute, run sls deploy, then uncomment and run the sls deploy again, it works. It seems that the Microsoft.Web/sites is not generated when the armTemplate is specified

marcoslimagon avatar Dec 14 '20 15:12 marcoslimagon

I'm also seeing this issue.

HobbyProjects avatar Mar 21 '21 07:03 HobbyProjects

Hi is there any workaround about this problem?

kenanhancer avatar May 10 '21 14:05 kenanhancer