Azure Function Publish Fails to Specific Subscription From Visual Studio
- Dominant language
- PowerShell
- Stars
- 1.1k
- Forks
- 215
- Avg merge
- 4h 2m
- Merged PRs (30d)
- 1
Description
I have a working published function, that has been published multiple times for the past 3 months from VS, but now when I try to now publish in VS2019 or VS2017 it **fails**. Publishing into a new function (in the same subscription) **fails** too; *but the new function placeholder app info is visible in Azure/resource group*.
**But** when I publish it to a *different or new subscription* **it works**.
Update: It seems I can always publish to a new function placeholder, but when I try to re-publish, it fails on the second attempt.
----
- I changed the environment variable `WEBSITE_RUN_FROM_PACKAGE` from 1 to zero; it **fails**.
- I did `Reset publish profile` and `Get publish profile`; it **fails**
- Original files deleted but full publish **fails**
- Again publishing the same files to a different subscription **works**.
- Issue written up (with pictures) on Stack Overflow : [Azure Function Publish Fails to Specific Subscription From Visual Studio](https://stackoverflow.com/questions/57836254/azure-function-publish-fails-to-specific-subscription-from-visual-studio)
----
**Diagnostic log file reported by Visual Studio**
> System.AggregateException: One or more errors occurred. ---> System.Exception: Publishing failed. --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at Microsoft.Publish.Framework.Model.DefaultPublishSteps.<>c__DisplayClass26_0.b__2() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Publish.Framework.Model.DefaultPublishSteps.d__23.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Publish.Framework.ViewModel.ProfileSelectorViewModel.d__202.MoveNext() ---> (Inner Exception #0) System.Exception: Publishing failed.<---
> System.Exception: Publishing failed.
----
I went to the CLI to do the same publish operation and it just hangs and then returns the last two lines:
```
az functionapp deployment source config-zip -g $resourceGroup -n $functionAppName --src $fullZip
Getting scm site credentials for zip deployment
Starting zip deployment. This operation can take a while to complete …
Configuring default logging for the app, if not already enabled
Operation returned an invalid status code 'Bad Request'
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.