2

I have cloned my app from GitHub into the Azure shell. When I tried to create and deploy the webapp I am facing few errors. First I tried az webapp up -n newappname and I got the below error

enter image description here

Then I created a web app myself in the portal and just tried deploying it from Azure shell using the command az webapp up -n newappname_createdatportal. I got the below error

enter image description here

Any suggestions here will be much appreciated!

gigatt
  • 105
  • 7
codeX
  • 4,842
  • 2
  • 31
  • 36

2 Answers2

0

It seems it was a bug for old Azure CLI version, run az upgrade --yes and restart your prompt solve the problem for me.

Here are something to notice:

  1. my Azure CLI version: 2.18.0

  2. the command I use:

    az upgrade --yes
    #restart session and run this for authorizing
    az login 
    az webapp up -n webappnamecreated
    

Here is the reproduce screenshot: enter image description here

Here is the successful screenshot: enter image description here

Doris Lv
  • 3,083
  • 1
  • 5
  • 14
  • My CLI is up to date already! Still, error persist! – codeX Jan 22 '21 at 23:00
  • Could you try re-install the Azure CLI to the latest version and run the command I post? It might be wired, but it seems this command is not compatible with your CLI, and the re-install might update something. – Doris Lv Jan 25 '21 at 01:31
  • Btw, `az web app up` cannot use in Powershell on my computer, so I turn to use bash. – Doris Lv Jan 25 '21 at 06:10
0

I tried updating the az command line as other answer suggested but didn't work for me.

Instead of doing az webapp up -n appname, try first creating an appservice plan with application name appname then only after it has been deployed enter the command az webpp up -n appname. This worked for me.

rooni
  • 1,036
  • 3
  • 17
  • 33