3

When I try to deploy an Azure Function to the cloud using... func azure functionapp publish appName --build remote --publish-local-settings

...I receive the following error

Getting site publishing info...
Remote build is a new feature added to function apps.
Your function app appName does not support remote build as it was created before August 1st, 2019.
Please use '--build local' or '--build-native-deps'.
For more information, please visit https://aka.ms/remotebuild

EVEN THOUGH THE APP WAS LITERALLY JUST CREATED IN AZURE PORTAL.

System: - Running VS Code on Ubuntu 18.04

Steps to reproduce:

  • Create a new Function App (and support resources) using az cli
    • Python runtime
    • Consumption plan
    • StandardV2 Storage plan
    • AppInsights
  • Create new Function (scaffolding) using VS Code Azure Functions extension
  • Create __init__.py and configure local.settings.json
  • Open a terminal; cd to Function folder
  • Run func azure functionapp publish appName --build remote --publish-local-settings
  • Fails everytime with the message above

Tried so far: - Substituting --build local. - Looks like it wants to work, but fails with error

There was an error restoring dependencies. ERROR: cannot install cryptography-2.9.2 dependency: binary dependencies without wheels are not supported when building locally. Use the "--build remote" option to build dependencies on the Azure Functions build server, or "--build-native-deps" option to automatically build and configure the dependencies using a Docker container. More information at https://aka.ms/func-python-publish

Not going to try: - --build-local-deps because I don't want a docker instance for my Function App

Please advise. This is painful at this point.

2
  • Just to make sure, which appName did you use when you run the command func azure functionapp publish appName --build remote ? Local function app name or the name of the function app you created on azure portal ? Commented Jun 17, 2020 at 7:50
  • The name of the Function App created in Portal (not local name). Commented Jun 17, 2020 at 17:39

2 Answers 2

3

In my case, I was provisioning an azurerm_linux_function_app with terraform and got this error. The error turned out to be caused by me forgetting to specify the storage_account_access_key setting. The docs even mention

One of storage_account_access_key or storage_uses_managed_identity must be specified when using storage_account_name.

But terraform does not actually check that when applying your configuration, resulting in a cryptic error message much later in the process.

Sign up to request clarification or add additional context in comments.

Comments

0

Here is what was found today:

  • I initially created the Function App Storage Account with...
# Create a Function App Storage Account

az storage account create \
    --name $fa_storage_name \
    --resource-group $rg_name \
    --access-tier Cool \
    --default-action Deny \
    --kind StorageV2 \
    --subscription $az_sub
    --location $az_loc \
    --sku Standard_LRS

Changed this to...

# Create a Function App Storage Account

az storage account create \
    --name $fa_storage_name \
    --resource-group $rg_name \
    --location $az_loc \
    --sku Standard_LRS

...and was able to get past that error. The way I stumbled onto this was using the --buld local flag. It gave me a MUCH MORE ACCURATE error. Something along the lines of Check your storage account dude.

(thank you Marcelo!)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.