Azure functionapp publish Failing on 'Syncing triggers...'
Asked Answered
V

10

10

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.

Vigilant answered 3/12, 2021 at 10:14 Comment(0)
V
4

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

Vigilant answered 3/12, 2021 at 10:49 Comment(0)
D
1

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.

Doreendorelia answered 3/5, 2023 at 17:54 Comment(0)
M
1

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

Milne answered 16/5, 2023 at 22:37 Comment(1)
Error on zip deploy: The attempt to publish the ZIP file through mysite.azurewebsites.net/api/zipdeploy failed with HTTP status code InternalServerError. This was my issue, the key had been rotated.Gd
L
1

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.

Lazos answered 25/7, 2023 at 13:40 Comment(1)
90 of our problems are forgetting to create the private endpoint and it never gets easy to find, the messages are always vagueDucal
J
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.

Jaejaeger answered 18/8, 2022 at 12:3 Comment(0)
D
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.

Donitadonjon answered 10/8, 2023 at 18:29 Comment(0)
D
0

In our case, with .NET 6, Azure Function v4, Microsoft Identity, the problem was that we had a Function with a reference to the WebApp, used to access the DB Identity context (because we had the necessity to retrieve users when the function was running). Locally it worked perfectly, but after this change the release process was always returning:

Syncing triggers for function app
##[error]Error: Failed to sync triggers for function app 'func-name-dev'. Error: BadRequest - Encountered an error (InternalServerError) from host runtime. (CODE: 400)

After spending a lot of time looking for a solution, we decided to remove the WebApp reference from the Function, and we created a library with a separated scaffolding (DB first). The release process started working again.

Durbar answered 26/9, 2023 at 13:0 Comment(0)
A
0

I just had a similar issue with a client of mine. It turned out they renamed the csproj and sln files with different names, and when we changed them to match it worked. Also, had to make sure the csproj filename referenced in the sln file is correct.

Artiste answered 27/3, 2024 at 18:7 Comment(0)
S
0

I met this issue due to my azure function being turned off. Started it in the azure portal and the error was solved. Hope this helps!

Shantay answered 24/4, 2024 at 8:17 Comment(0)
K
0

Please check on Service Plan, in our case "Web Apps Function Triggers" issue was due to service plan. Please use - "Elastic Premium" service plan and ensure below network setting-

Network -> Inbound traffic configuration -> Inbound addresses : Dynamic

Detail Error-

Error Code: Bad Request

Message: Encountered an error (InternalServerError) from host runtime

Katykatya answered 8/9, 2024 at 4:59 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.