azure-functions-host: Common errors when upgrading to 2.0.12050 (or newer)
This relates to this announcement: https://github.com/Azure/app-service-announcements/issues/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:
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:
- Go to a particular function in the portal and attempt to run it and check the log stream at the bottom of the screen.
- 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)
- 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.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 4
- Comments: 45 (13 by maintainers)
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.
How do I get this Function Runtime Version to update?
I was able to upgrade successfully but I started seeing these dependency errors for the logs. I tried turning log storage on/off and changing containers with no luck. My functions are working fine, but thought I’d mention this.
After updating to new version on local, update all the nugets, when run getting this one. I m using custom IExtensionConfigProvider to inject interaces on Intialize.
[31-08-2018 14:13:26] Function ‘ApiAppService.RunGetAppServices’ failed indexing and will be disabled. [31-08-2018 14:13:26] Error indexing method ‘ApiAppService.RunAppServiceDomain’ [31-08-2018 14:13:26] Microsoft.Azure.WebJobs.Host: Error indexing method ‘ApiAppService.RunAppServiceDomain’. Microsoft.Azure.WebJobs.Host: Cannot bind parameter ‘faaslogger’ to type ILogger. Make sure the parameter Type is supported by the binding. If you’re using binding extensions (e.g. ServiceBus, Timers, etc.) make sure you’ve called the registration method for the extension(s) in your startup code (e.g. config.UseServiceBus(), config.UseTimers(), etc.).
@ltouro - what version of node are you using? (note that if your are specifying node version in azure using WEBSITE_NODE_DEFAULT_VERSION, only a few versions are supported. i would recommend trying 8.11.1 or 10.6.0).
@IGx89 – can you share your site name with me so I can investigate on our side? See here to share privately: https://github.com/Azure/azure-functions-host/wiki/Sharing-Your-Function-App-name-privately. Although if you’re not even able to run a function, maybe that’s tough. Any older logs you have would work as well – I should be able to look up any function invocation guid.
If you need to, you can email me your site name directly. My mail address is in my github profile.
@IGx89 What worked for me was first stopping the Function in the Portal, then deploying, and then restarting the Function in the portal