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

Internal error: Expected value to be neither null nor undefined: newSiteName (Source: Azure Functions) #4355

Closed
str1n opened this issue Dec 31, 2024 · 14 comments

Comments

@str1n
Copy link

str1n commented Dec 31, 2024

I have a python azure function that was originally using a python 3.12.5 venv. I could deploy from VSCode to an existing function app (Flex Consumption plan) but was getting an Http Trigger not found error.

As part of troubleshooting, I have replaced the Python venv with a 3.11.0 venv (Delete and Recreate within VSCode) to ensure compatibility with Azure Functions supported versions of python, and since doing that I can no longer deploy the app as I get the following error message:

Internal error: Expected value to be neither null nor undefined: newSiteName

Source: Azure Functions

Deleting and recreating the python 3.12.5 venv does not resolve the issue.

This appears to have been caused by the change of virtual environment, but I cannot find where this parameter is set. Going through the Azure Functions extension settings shows nothing.

Any pointers greatly appreciated!

@alexweininger
Copy link
Member

The fix for this issue is to change the Microsoft Authentication Implementation setting to MSAL Image
This is the default setting in the current insiders version.

@SherekhanFR
Copy link

Same issue here however was working yesterday. workaround is to go via subscription menu, to function and 'Deploy to function app'

Image

@alexweininger
Copy link
Member

@SherekhanFR, did you try this?

The fix for this issue is to change the Microsoft Authentication Implementation setting to MSAL
Image
This is the default setting in the current insiders version.

@alexweininger
Copy link
Member

I have a fix in the works. Hoping to release the full fix today. microsoft/vscode-azureresourcegroups#1000

@opost1
Copy link

opost1 commented Dec 31, 2024

Switch to MSAL worked for me - thank you!

@alexweininger
Copy link
Member

We just released Azure Resources v.0.10.1 which includes the fix for this issue.

@str1n
Copy link
Author

str1n commented Dec 31, 2024

We just released Azure Resources v.0.10.1 which includes the fix for this issue.

Wow, thank you. Will have a look tomorrow 👍

@str1n
Copy link
Author

str1n commented Jan 1, 2025

@SherekhanFR, did you try this?

The fix for this issue is to change the Microsoft Authentication Implementation setting to MSAL
Image
This is the default setting in the current insiders version.

Deployment now working for me following the fix (thank you!), however I cannot find the setting to change to the Microsoft-authentication: Implementation. I'm fairly new to VSCode so still finding my way around...so even though I don't need the workaround. I'm just curious where to find this?

@SherekhanFR
Copy link

@SherekhanFR, did you try this?

The fix for this issue is to change the Microsoft Authentication Implementation setting to MSAL
Image
This is the default setting in the current insiders version.

Deployment now working for me following the fix (thank you!), however I cannot find the setting to change to the Microsoft-authentication: Implementation. I'm fairly new to VSCode so still finding my way around...so even though I don't need the workaround. I'm just curious where to find this?

You can go to Settings (on Mac : Code > Preferences > Settings) and then look for 'Microsoft-authentication' and you will have the configuration.

@SherekhanFR
Copy link

We just released Azure Resources v.0.10.1 which includes the fix for this issue.

Super ! it's fixed and works with and without the change of Microsoft Authentication Implementation. Thank you for your quick work 👍

@str1n
Copy link
Author

str1n commented Jan 2, 2025

@SherekhanFR, did you try this?

The fix for this issue is to change the Microsoft Authentication Implementation setting to MSAL
Image
This is the default setting in the current insiders version.

Deployment now working for me following the fix (thank you!), however I cannot find the setting to change to the Microsoft-authentication: Implementation. I'm fairly new to VSCode so still finding my way around...so even though I don't need the workaround. I'm just curious where to find this?

You can go to Settings (on Mac : Code > Preferences > Settings) and then look for 'Microsoft-authentication' and you will have the configuration.

Thank you, much appreciated!

@str1n str1n closed this as completed Jan 2, 2025
@e14mattc
Copy link

e14mattc commented Jan 2, 2025

I'm hitting the same issue I'm afraid, and that's with the following config in VS Code (for Windows 10);

  • VS Code 1.96.2
  • Azure Functions v1.16.1
  • Azure Resource v0.10.1
  • Microsoft-authentication: msal
  • Function app type: nodeJS
  • Function app core tools: 4.0.6610
  • Function app runtime: 4.1036.1.23224

Deployment from the Azure tab of the VS code activity bar, then Workspace -> Local Project (func app name) -> 'Deploy to Azure' fails.

Deployment from the Azure tab of the VS code activity bar, then Resources-> (find my func app in azure) -> 'Deploy to Function App' works.

@nturinski
Copy link
Member

I'm hitting the same issue I'm afraid, and that's with the following config in VS Code (for Windows 10);

  • VS Code 1.96.2
  • Azure Functions v1.16.1
  • Azure Resource v0.10.1
  • Microsoft-authentication: msal
  • Function app type: nodeJS
  • Function app core tools: 4.0.6610
  • Function app runtime: 4.1036.1.23224

Deployment from the Azure tab of the VS code activity bar, then Workspace -> Local Project (func app name) -> 'Deploy to Azure' fails.

Deployment from the Azure tab of the VS code activity bar, then Resources-> (find my func app in azure) -> 'Deploy to Function App' works.

Is the error the same as OP? Internal error: Expected value to be neither null nor undefined: newSiteName

@e14mattc
Copy link

e14mattc commented Jan 3, 2025

Yes, same error as the OP.

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

No branches or pull requests

6 participants