Home > Mobile >  How to fix "TypeError: Cannot read property 'updateStartupCommandAndRuntimeStack' of
How to fix "TypeError: Cannot read property 'updateStartupCommandAndRuntimeStack' of

Time:04-26

Using Azure DevOps to publish a .NET 6 application to Linux app service:

#Publish it to the Azure App Service

- task: AzureWebApp@1
  inputs:
    appType: webAppLinux
    azureSubscription: $(azureSPNName)
    appName: $(azureAppServiceName)
    package: $(Build.ArtifactStagingDirectory)/**/*.zip
    deploymentMethod: zipDeploy
    runtimeStack: 'DOTNETCORE|6.0'
    startUpCommand: 'dotnet {Project}.dll'

Job log shows successful deployment, but then receives the error:

...
Successfully deployed web package to App Service.
##[error]TypeError: Cannot read property 'updateStartupCommandAndRuntimeStack' of undefined
...

It does look like new changes are applied and available in the application, but I'm not sure where the error is coming from.

Anyone have a solution for this?

enter image description here

Your app service should have configuration settings got updated as below screenshot. When you create the app service,please make sure you have created correct app service type. enter image description here

In addition, you can check "Azure Functions runtime versions overview" for the runtime version on your app.

CodePudding user response:

Looks like someone else had the same issue here: https://developercommunity.visualstudio.com/t/azurewebapp-typeerror-cannot-read-property-updates/1608178

I was using an Azure Resource Manager that was using publish profile based authentication. After I switched it to a service connection to an Azure Resource Manager that uses service principal authentication it is working.

  • Related