Solvedazure functions host Common errors when upgrading to 2.0.12050 (or newer)

This relates to this announcement: Azure/app-service-announcements#129

Check your versions

First, to understand any error you're getting, its important that you establish which version(s) of functions you are running. If you're working completely from within the portal its simple - go to function app settings and look at the runtime version:

image

If you're developing locally, you'll also need to check the functions version that is being used when you test your app locally. You can check that by looking for a line in the output that looks like this:
[8/30/2018 6:12:53 PM] Starting Host (HostId=xxx, InstanceId=xxx, Version=2.0.12050.0)

If your local version doesn't match the version you're deploying to in Azure, you're probably going to have issues.

Check your logs

If you're developing and testing the app locally, the logs are clearly visible in the terminal and easy to check. If you've deployed to Azure and you're having problems, there are a few approaches you can take to get quick feedback on what is going wrong with your function app:

  1. Go to a particular function in the portal and attempt to run it and check the log stream at the bottom of the screen.
  2. Go to the overview tab, and in configured features select Application Insights. This will open a new view. Find Live Metrics Stream in the left hand list, open that and look at the Sample Telemetry - this will show live error logs for the entire function app (not just a single function)
  3. Go to the platform features tab and select Advanced Tools (kudu). Go to debug console -> CMD and then in the file browser browse to Log Files -> Application -> Functions -> Host and look at the log files there.

Common Errors

[Error] Found functions with more than one language. Select a language for your function app by specifying FUNCTIONS_WORKER_RUNTIME AppSetting

You'll need to specify the language for your function app. See the Choose a language for your Function App section of this page.

My http triggers are returning 404 but I have no idea why

Its possible this is happening because you have the same error as the one above (multiple languages), but you're just not seeing it in the log. Try step approach 3 in the "check your logs" section above to confirm.

Microsoft.Azure.WebJobs.Script.HostConfigurationException : The host.json file is missing the required 'version' property.

You'll need to update your host.json file to the new format. See here for more info.

System.TypeLoadException : Could not load type 'Microsoft.Azure.WebJobs.ExecutionContext' from assembly 'Microsoft.Azure.WebJobs.Extensions, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null'.

You need to update your NuGet references, recompile and publish. See the Update your dependencies, extensions and/or code section of this page.

System.TypeLoadException : Could not load type 'Microsoft.Azure.WebJobs.BlobTriggerAttribute' from assembly 'Microsoft.Azure.WebJobs, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null'.

System.TypeLoadException : Could not load type 'Microsoft.Azure.WebJobs.QueueAttribute' from assembly 'Microsoft.Azure.WebJobs, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null'.

System.TypeLoadException : Could not load type 'Microsoft.Azure.WebJobs.TableAttribute' from assembly 'Microsoft.Azure.WebJobs, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null'.

The binding type(s) 'blob, queue' are not registered. Please ensure the type is correct and the binding extension is installed.

You'll get errors like these if you're using Azure Storage based functionality (blob/queue/tables trigger/input/output) and you haven't installed the Microsoft.Azure.WebJobs.Extensions.Storage extension. See the Update your dependencies, extensions and/or code section of this page.

Could not load type 'Microsoft.Azure.WebJobs.Hosting.IWebJobsStartup' from assembly 'Microsoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null'.

You'll see this if you have published an app that has been updated locally to the latest bits, but the app you're deploying to is running a version older than 2.0.12050.0. See the instructions at the top of this page for checking your versions.

Microsoft.Azure.WebJobs.Script.Rpc.LanguageWorkerChannelException : Failed to start language worker for: node. Error: Your Function App is currently set to use Node.js version v6.5.0, but the runtime requires an Active LTS or Current version (ex: 8.11.1 or 10.6.0).

The JavaScript support in functions V2 works on Node 8 and Node 10. See here for more info.

46 Answers

✔️Accepted Answer

I'm seeing the same dependency errors as @davemurphysf along with a few other dependency errors with 409s when attempting to write to https://<function-name>.blob.core.windows.net:443/azure-webjobs-hosts/locks/linkfunctions/host?comp=lease

Both sets of errors are intermittent.

More Issues: