Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: AzureRmWebAppDeploymentV4 MSAL issue, self-hosted w/proxy, Node 16 compat issue? #19231

Closed
2 of 4 tasks
cbuben-hal opened this issue Nov 6, 2023 · 3 comments
Closed
2 of 4 tasks

Comments

@cbuben-hal
Copy link

Task name

AzureRmWebAppDeployment@4

Task version

4.230.8

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

N/A

Operation system

Ubuntu 20.04

Task log

See relevant log output section.

Relevant log output

##[debug]Using node path: /agent/externals/node16/bin/node
...
Got service connection details for Azure App Service:'REDACTED'
##[debug]MSAL - getMSALToken called. force=undefined
##[debug]agent.proxyurl=REDACTED
##[debug]agent.proxyurl=REDACTED
##[debug]agent.proxybypasslist=undefined
##[debug]MSAL - Proxy will be used.
##[debug]agent.proxyusername=undefined
##[debug]agent.proxypassword=undefined
##[debug]MSAL - Proxy setup with no-auth is: REDACTED
##[debug]MSAL - ServicePrincipal - clientSecret is used.
##[debug][Mon, 06 Nov 2023 14:44:30 GMT] : @azure/[email protected] : Info - acquireTokenByClientCredential called
##[error][Mon, 06 Nov 2023 14:44:30 GMT] : @azure/[email protected] : Error - A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.
Error: TypeError
Error Description: Protocol "https:" not supported. Expected "http:"
##[debug]Processed: ##vso[task.issue type=error;][Mon, 06 Nov 2023 14:44:30 GMT] : @azure/[email protected] : Error - A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.
Error: TypeError
Error Description: Protocol "https:" not supported. Expected "http:"

Aditional info

The issue started with 4.230.1.  Between v229 and v230, e8bab02f32aaa6e0d6631c3701537ea923c92883 (AzureRmWebAppDeployment@4 4.230.1) updated AzureRmWebAppDeploymentV4 to use Node 16.

The issue here looks to be the same as reported for other tasks which experienced MSAL issues after being updated to use Node 16 when proxy is in use, i.e. https://github.com/microsoft/azure-pipelines-tasks/issues/18607 (Kubernetes@1 1.223.0).

Workaround put in place by setting `AGENT_USE_NODE10=true` in custom script extension (as an addition to existing proxy configuration).  After the workaround, task debug logs note that `/agent/externals/node10/bin/node` is used, and the MSAL issues do not occur.  Incidentally, tried excluding `login.microsoftonline.com` and `graph.microsoft.com` via NO_PROXY (preferable), but this did not resolve the issue.
@cbuben-hal
Copy link
Author

Appears to be a dupe of #19229, apologies.

@v-mohithgc
Copy link
Contributor

Hi, task version has been reverted and it should be able to resolve this issue, can anyone please check and confirm back?

Thanks

@cbuben-hal
Copy link
Author

Hi, task version has been reverted and it should be able to resolve this issue, can anyone please check and confirm back?

Thanks

We have reverted our workaround in our dev account, and the deploy step now works successfully, i.e. as it did originally before this regression. Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants