5

I'm trying to publish an Azure function using the Azure Function Core Tools CLI.

func azure functionapp publish "<FUNCTION APP NAME>"

The process completes the build and deploy quickly but then takes 2-3 minutes 'Syncing triggers...' before failing.

This is the result:

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:02.85


Getting site publishing info...
Creating archive for current directory...
Uploading 4.25 MB [###############################################################################]
Upload completed successfully.
Deployment completed successfully.
Syncing triggers...
Syncing triggers...
Syncing triggers...
Syncing triggers...
Syncing triggers...
Syncing triggers...
Error calling sync triggers (BadRequest). Request ID = '<REQUEST ID GUID>'.
func --version

3.0.3904

The function is deployed to Azure (checked in the portal) but the Get Function URL button is disabled.

Any help with this gratefully received.

John
  • 1,043
  • 15
  • 20

6 Answers6

3

The AzureWebJobsStorage setting in local.settings.json was still configured to UseDevelopmentStorage=true.

I assume this overwrote the value in Azure when I'd previously published local settings using the -i -y switches.

The publish worked once I updated the value to the Azure Storage connection string and pushed this setting:

DefaultEndpointsProtocol=https;AccountName=<ACCOUNT NAME>;AccountKey=<ACCOUNT KEY>;EndpointSuffix=core.windows.net

John
  • 1,043
  • 15
  • 20
0

Go to Configuration on the portal, go to Function runtime settings, make sure it's the right runtime version... in your case it's ~3.

dhany1024
  • 133
  • 2
  • 9
0

I found that I was missing perms to the keyvault. I went to Kudu and there was a crash dump log file that showed that it was bombing on the specific app id not having azure keyvault get perms.

0

I had an invalid storage key configured with my account (WEBSITE_CONTENTAZUREFILECONNECTIONSTRING)

Oliver Bock
  • 4,829
  • 5
  • 38
  • 62
0

The cause of my Sync Triggers problem was because the Function storage account was on a vnet and was blocking the deployment. Solution was to open the storage account up i.e. make it public. It appears Sync Triggers updates the packagename.txt in the file share and without access it can't do this and fails.

0

For me, I had to configure the company proxy on the Azure Function level. In the Azure Portal, go the Function App. Under settings > Configuration > + New application setting. I added my company's proxy environment variables.