Open pankajagrawal16 opened 2 years ago
I think it's a typo in your pom.xml
. Instead of <auth><type>azure_cli</type></auth>
use <authType>azure_cli</authType>
I think it's a typo in your
pom.xml
. Instead of<auth><type>azure_cli</type></auth>
use<authType>azure_cli</authType>
Still fails with same error
I think it's a typo in your
pom.xml
. Instead of<auth><type>azure_cli</type></auth>
use<authType>azure_cli</authType>
Still fails with same error
what did you see when you run az version --output json
directly in shell/terminal?
what did you see when you run
az version --output json
directly in shell/terminal?
{
"azure-cli": "2.42.0",
"azure-cli-core": "2.42.0",
"azure-cli-telemetry": "1.0.8",
"extensions": {
"account": "0.2.5",
"interactive": "0.4.5",
"storage-preview": "0.8.3"
}
}
Not sure why but I just tried once again, and this time it seems to work. Super weird. I don't recall doing any kind of changes etc
ok now it fails saying:
Caused by: com.microsoft.azure.toolkit.lib.auth.AzureToolkitAuthenticationException: execute Azure Cli command 'az account list --output json' failed due to error: Process exited with an error: 2 (Exit value: 2).
at com.microsoft.azure.toolkit.lib.auth.cli.AzureCliUtils.executeAzureCli (AzureCliUtils.java:84)
at com.microsoft.azure.toolkit.lib.auth.cli.AzureCliUtils.listSubscriptions (AzureCliUtils.java:59)
at com.microsoft.azure.toolkit.lib.auth.cli.AzureCliAccount.loadSubscriptions (AzureCliAccount.java:55)
at com.microsoft.azure.toolkit.lib.auth.Account.reloadSubscriptions (Account.java:146)
at com.microsoft.azure.toolkit.lib.auth.Account.login (Account.java:96)
at com.microsoft.azure.toolkit.lib.auth.AzureAccount.login (AzureAccount.java:124)
at com.microsoft.azure.maven.AbstractAzureMojo.loginAzure (AbstractAzureMojo.java:365)
at com.microsoft.azure.maven.AbstractAzureMojo.loginAzure (AbstractAzureMojo.java:347)
at com.microsoft.azure.maven.appservice.AbstractAppServiceMojo.initAzureAppServiceClient (AbstractAppServiceMojo.java:150)
at com.microsoft.azure.maven.function.DeployMojo.d
Bit more investigation, it seems to fail only when attempting to deploy via WSL2 terminal . Seems to work when deploying via powershell terminal.
Why would that be?
thanks for your investigation, we didn't set any restrictions on WSL2, we'll investigate what is wrong.
does both az account list --output json
and az version --output json
works well in your WSL2 terminal?
thanks for your investigation, we didn't set any restrictions on WSL2, we'll investigate what is wrong. does both
az account list --output json
andaz version --output json
works well in your WSL2 terminal?
Yes both command works properly when run directly on wsl2 terminal and gives output
Up vote. I also have this problem.
@jleonelion @pankajagrawal16 thanks for your report, this bug should be fixed by this PR: https://github.com/microsoft/azure-maven-plugins/pull/2183. the fix would be included in the next release v1.23.0
Nice @wangmingliang-ms ! 🎉
Plugin name and version
Plugin configuration in your
pom.xml
Expected behavior
should deploy.
Actual behavior
Fails with below error
Steps to reproduce the problem