question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Subscription not found when creating function app with trial account

See original GitHub issue

Does this occur consistently? Repro steps:

Action: azureFunctions.createFunctionApp Error type: SubscriptionNotFound Error Message: Subscription redacted:id was not found.

Version: 1.7.4 OS: win32 OS Release: 10.0.22000 Product: Visual Studio Code Product Version: 1.69.2 Language: en

Call Stack
handleErrorResponse extension.bundle.js:2:1823131
deserializeResponseBody extension.bundle.js:2:1823862

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
minaeleecommented, Sep 12, 2022

I’ve tested this and found it reproducible. With a previously existing account, I could create a function app through VS Code with no problems. I created a new Azure account, signed out in VS Code from the old one, signed in with the new. Then, no matter what region I chose, I got the Subscription … not found error when trying to create a new function app.

The only way I could get past this was to create a new function app through the Azure portal. Even then, there are problems. New function apps created using new Azure accounts do not have the option to add storage accounts to the function app. I don’t know why this is, but perhaps has something to do with the new version of storage accounts that was released recently.

What happens when you try to use the Azure extension to deploy a function to a function app created without any storage is this:

1:43:57 PM AzureFnAppTest2022: Creating placeholder blob for linux consumption function app...
1:43:57 PM AzureFnAppTest2022: Malformed SCM_RUN_FROM_PACKAGE when uploading built content.
1:43:57 PM AzureFnAppTest2022: Generating summary of Oryx build
1:43:57 PM AzureFnAppTest2022: Deployment Log file does not exist in /tmp/oryx-build.log
1:43:57 PM AzureFnAppTest2022: The logfile at /tmp/oryx-build.log is empty. Unable to fetch the summary of build
1:43:57 PM AzureFnAppTest2022: Deployment Failed. deployer = Push-Deployer deploymentPath = Functions App ZipDeploy. Extract zip. Remote build.
1:44:01 PM AzureFnAppTest2022: Deployment failed.

What I did to get past this: Add the storage account manually. You can do this in the Azure portal by going to Storage accounts, and creating one with default options. Then find the Access key for that storage account and copy the connection string. There are two access keys, I used the first one. Then go to the function app’s Configuration panel, and add a new Application Setting with the name of AzureWebJobsStorage and the value of the connection string, then click Save. Make sure to click Save!

After this, deploying a function to that function app from the VS Code Azure extension worked for me.

1reaction
minaeleecommented, Oct 4, 2022

Just wanted to let you know that I tested again. Azure wasn’t happy with me creating so many new accounts, so I had to use the same one I used previously (created after the bug started happening) but deleted all resource groups on it except DefaultResourceGroup-CUS, and the storage account I’d manually created on it, to hopefully mimic a new account. Uninstalled Azure Functions extension and reinstalled. Went through all the steps to create a function app and deploy a function - works perfectly, just as before! Thanks again!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error "Subscription was not found" when trying to create Azure ...
Now that the subscription is not empty, It will be able to identify your subscription id. Additionally, confirm that your Azure free trial...
Read more >
Azure free trial subscription not found in VS Code
When trying to deploy a bootleg web app in VS Code, the application prompts the following notification "No subscriptions were found. Set up...
Read more >
Cannot find Azure subscription - Visual Studio Feedback
In my account profile at my.visualstudio.com, I activated my free 30 Azure trial, specifying an email address, giving a credit card, and getting...
Read more >
Chapter 4. Getting Started with Microsoft Azure Functions
App name. This name will also be used for the URL of the resources you create in the Function App. Subscription. The payment...
Read more >
Build an v4 Azure Function that runs as an isolated process ...
If you don't have one, you can get a Microsoft 365 developer subscription when ... If you follow this tutorial you end up...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found