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

Error when picking Create new local app setting from local.settings.json when creating blob trigger (Error getSubscriptionPromptStep) #3191

Closed
eamonoreilly opened this issue May 25, 2022 · 6 comments · Fixed by #3196
Labels

Comments

@eamonoreilly
Copy link

Repro steps:

  1. Create new Function from the workspace
  2. Create new project when prompted
  3. Select JavaScript (happens on any language)
  4. Select Azure Blob Storage trigger
  5. Select "BlobTrigger1" as function name
  6. On "Select setting from "local.settings.json" ", choose +Create new local app setting

Expected:
New value created and written to local.settings.json upon creation

Actual:
Error appears with "Cannot read properties of undefined (reading 'getSubscriptionPromptStep')

@alexweininger
Copy link
Member

Thanks for reporting the issue, I'm able to reproduce this.

Notes:

Issue is with this line

const subscriptionPromptStep: AzureWizardPromptStep<ISubscriptionActionContext> | undefined = await ext.azureAccountTreeItem.getSubscriptionPromptStep(context);

On "Select setting from "local.settings.json" ", choose +Create new local app setting

Doesn't reproduce if you pick an existing setting on this step.

@ivctr
Copy link

ivctr commented May 26, 2022

@alexweininger thank you very much. Please how do one pick an existing setting on this step?
I am having the same issue

@ivctr
Copy link

ivctr commented May 26, 2022

Repro steps:

  1. Create new Function from the workspace
  2. Create new project when prompted
  3. Select JavaScript (happens on any language)
  4. Select Azure Blob Storage trigger
  5. Select "BlobTrigger1" as function name
  6. On "Select setting from "local.settings.json" ", choose +Create new local app setting

Expected: New value created and written to local.settings.json upon creation

Actual: Error appears with "Cannot read properties of undefined (reading 'getSubscriptionPromptStep')

Please have you found a fix around this?

@dwoldo
Copy link

dwoldo commented May 26, 2022

I downgraded the Azure Function extension to v1.6.2 as a work-around.

@alexweininger
Copy link
Member

Until we release a fix for this issue, as dwoldo mentioned above, a valid workaround is to install the previous version of the extension.

To do this, go to the Azure Functions page in the Extensions explorer and using the dropdown on the "Uninstall" button, select "Install another version..."

Screen Shot 2022-05-26 at 10 16 02 AM

image

image

@alexweininger
Copy link
Member

@microsoft microsoft locked and limited conversation to collaborators Jul 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants