Azure / Azure/azure-functions-core-tools

Ubuntu 'func start' '0 functions loaded'

Open
#3,475 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.5k
Forks
498
Avg merge
5d 4h
Merged PRs (30d)
15

Description

Repro steps:
Download and install Ubuntu 22.04-3 LTS virtual machine
Install Dotnet 7.0 using repo instructions
Install Azure Function Core Tools using repo instructions
"func init" with "--target-framework 7.0"
"func start" brings up "1 functions found" and "0 functions loaded"

```
Azure Functions Core Tools
Core Tools Version: 4.0.5390 Commit hash: N/A (64-bit)
Function Runtime Version: 4.25.3.21264

[2023-10-05T06:18:18.926Z] Found /home/miller/Development/ApiServer/ApiServer/SilvermineNordic.Functions.Azure/SilvermineNordic.Functions.Azure.csproj. Using for user secrets file configuration.
[2023-10-05T06:18:19.344Z] Building host: version spec: , startup suppressed: 'False', configuration suppressed: 'False', startup operation id: 'ebbe1218-698e-4652-b21d-a6eaaa173bca'
[2023-10-05T06:18:19.351Z] Reading host configuration file '/home/miller/Development/ApiServer/ApiServer/SilvermineNordic.Functions.Azure/bin/output/host.json'
[2023-10-05T06:18:19.353Z] Host configuration file read:
[2023-10-05T06:18:19.353Z] {
[2023-10-05T06:18:19.353Z] "version": "2.0",
[2023-10-05T06:18:19.353Z] "extensionBundle": {
[2023-10-05T06:18:19.353Z] "id": "Microsoft.Azure.Functions.ExtensionBundle",
[2023-10-05T06:18:19.353Z] "version": "[4.*, 5.0.0)"
[2023-10-05T06:18:19.353Z] }
[2023-10-05T06:18:19.353Z] }
[2023-10-05T06:18:19.368Z] Looking for extension bundle Microsoft.Azure.Functions.ExtensionBundle at /home/miller/.azure-functions-core-tools/Functions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle
[2023-10-05T06:18:19.369Z] Found a matching extension bundle at /home/miller/.azure-functions-core-tools/Functions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/4.8.0
[2023-10-05T06:18:19.385Z] Loading functions metadata
[2023-10-05T06:18:19.388Z] Reading functions metadata
[2023-10-05T06:18:19.391Z] 0 functions found
[2023-10-05T06:18:19.400Z] 0 functions loaded
[2023-10-05T06:18:19.401Z] Looking for extension bundle Microsoft.Azure.Functions.ExtensionBundle at /home/miller/.azure-functions-core-tools/Functions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle
[2023-10-05T06:18:19.401Z] Found a matching extension bundle at /home/miller/.azure-functions-core-tools/Functions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/4.8.0
[2023-10-05T06:18:19.401Z] Fetching information on versions of extension bundle Microsoft.Azure.Functions.ExtensionBundle available on https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/index.json
[2023-10-05T06:18:19.648Z] Skipping bundle download since it already exists at path /home/miller/.azure-functions-core-tools/Functions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/4.8.0
[2023-10-05T06:18:19.650Z] Loading extension bundle from /home/miller/.azure-functions-core-tools/Functions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/4.8.0/bin
[2023-10-05T06:18:19.650Z] Script Startup resetting load context with base path: '/home/miller/.azure-functions-core-tools/Functions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/4.8.0/bin'.
[2023-10-05T06:18:19.659Z] Reading host configuration file '/home/miller/Development/ApiServer/ApiServer/SilvermineNordic.Functions.Azure/bin/output/host.json'
[2023-10-05T06:18:19.659Z] Host configuration file read:
[2023-10-05T06:18:19.659Z] {
[2023-10-05T06:18:19.659Z] "version": "2.0",
[2023-10-05T06:18:19.659Z] "extensionBundle": {
[2023-10-05T06:18:19.659Z] "id": "Microsoft.Azure.Functions.ExtensionBundle",
[2023-10-05T06:18:19.659Z] "version": "[4.*, 5.0.0)"
[2023-10-05T06:18:19.659Z] }
[2023-10-05T06:18:19.659Z] }
[2023-10-05T06:18:20.116Z] Initializing Warmup Extension.
[2023-10-05T06:18:20.172Z] Initializing Host. OperationId: 'ebbe1218-698e-4652-b21d-a6eaaa173bca'.
[2023-10-05T06:18:20.185Z] Host initialization: ConsecutiveErrors=0, StartupCount=1, OperationId=ebbe1218-698e-4652-b21d-a6eaaa173bca
[2023-10-05T06:18:20.234Z] LoggerFilterOptions
[2023-10-05T06:18:20.234Z] {
[2023-10-05T06:18:20.234Z] "MinLevel": "None",
[2023-10-05T06:18:20.234Z] "Rules": [
[2023-10-05T06:18:20.234Z] {
[2023-10-05T06:18:20.234Z] "ProviderName": null,
[2023-10-05T06:18:20.234Z] "CategoryName": null,
[2023-10-05T06:18:20.234Z] "LogLevel": null,
[2023-10-05T06:18:20.234Z] "Filter": "b__0"
[2023-10-05T06:18:20.234Z] },
[2023-10-05T06:18:20.234Z] {
[2023-10-05T06:18:20.234Z] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
[2023-10-05T06:18:20.234Z] "CategoryName": null,
[2023-10-05T06:18:20.234Z] "LogLevel": "None",
[2023-10-05T06:18:20.235Z] "Filter": null
[2023-10-05T06:18:20.235Z] },
[2023-10-05T06:18:20.235Z] {
[2023-10-05T06:18:20.235Z] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
[2023-10-05T06:18:20.235Z] "CategoryName": null,
[2023-10-05T06:18:20.235Z] "LogLevel": null,
[2023-10-05T06:18:20.235Z] "Filter": "b__0"
[2023-10-05T06:18:20.235Z] },
[2023-10-05T06:18:20.235Z] {
[2023-10-05T06:18:20.235Z] "ProviderName": "Azure.Functions.Cli.Diagnostics.ColoredConsoleLoggerProvider",
[2023-10-05T06:18:20.235Z] "CategoryName": null,
[2023-10-05T06:18:20.235Z] "LogLevel": null,
[2023-10-05T06:18:20.235Z] "Filter": "b__0"
[2023-10-05T06:18:20.235Z] }
[2023-10-05T06:18:20.235Z] ]
[2023-10-05T06:18:20.235Z] }
[2023-10-05T06:18:20.235Z] LoggerFilterOptions
[2023-10-05T06:18:20.235Z] {
[2023-10-05T06:18:20.235Z] "MinLevel": "None",
[2023-10-05T06:18:20.235Z] "Rules": [
[2023-10-05T06:18:20.235Z] {
[2023-10-05T06:18:20.235Z] "ProviderName": null,
[2023-10-05T06:18:20.235Z] "CategoryName": null,
[2023-10-05T06:18:20.235Z] "LogLevel": null,
[2023-10-05T06:18:20.235Z] "Filter": "b__0"
[2023-10-05T06:18:20.235Z] },
[2023-10-05T06:18:20.235Z] {
[2023-10-05T06:18:20.235Z] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
[2023-10-05T06:18:20.235Z] "CategoryName": null,
[2023-10-05T06:18:20.235Z] "LogLevel": "None",
[2023-10-05T06:18:20.235Z] "Filter": null
[2023-10-05T06:18:20.235Z] },
[2023-10-05T06:18:20.235Z] {
[2023-10-05T06:18:20.235Z] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
[2023-10-05T06:18:20.235Z] "CategoryName": null,
[2023-10-05T06:18:20.235Z] "LogLevel": null,
[2023-10-05T06:18:20.235Z] "Filter": "b__0"
[2023-10-05T06:18:20.235Z] },
[2023-10-05T06:18:20.235Z] {
[2023-10-05T06:18:20.235Z] "ProviderName": "Azure.Functions.Cli.Diagnostics.ColoredConsoleLoggerProvider",
[2023-10-05T06:18:20.235Z] "CategoryName": null,
[2023-10-05T06:18:20.236Z] "LogLevel": null,
[2023-10-05T06:18:20.236Z] "Filter": "b__0"
[2023-10-05T06:18:20.236Z] }
[2023-10-05T06:18:20.236Z] ]
[2023-10-05T06:18:20.236Z] }
[2023-10-05T06:18:20.236Z] ConcurrencyOptions
[2023-10-05T06:18:20.236Z] {
[2023-10-05T06:18:20.236Z] "DynamicConcurrencyEnabled": false,
[2023-10-05T06:18:20.236Z] "MaximumFunctionConcurrency": 500,
[2023-10-05T06:18:20.236Z] "CPUThreshold": 0.8,
[2023-10-05T06:18:20.236Z] "SnapshotPersistenceEnabled": true
[2023-10-05T06:18:20.236Z] }
[2023-10-05T06:18:20.236Z] FunctionResultAggregatorOptions
[2023-10-05T06:18:20.236Z] {
[2023-10-05T06:18:20.236Z] "BatchSize": 1000,
[2023-10-05T06:18:20.236Z] "FlushTimeout": "00:00:30",
[2023-10-05T06:18:20.236Z] "IsEnabled": true
[2023-10-05T06:18:20.236Z] }
[2023-10-05T06:18:20.236Z] SingletonOptions
[2023-10-05T06:18:20.236Z] {
[2023-10-05T06:18:20.236Z] "LockPeriod": "00:00:15",
[2023-10-05T06:18:20.236Z] "ListenerLockPeriod": "00:00:15",
[2023-10-05T06:18:20.236Z] "LockAcquisitionTimeout": "10675199.02:48:05.4775807",
[2023-10-05T06:18:20.236Z] "LockAcquisitionPollingInterval": "00:00:05",
[2023-10-05T06:18:20.236Z] "ListenerLockRecoveryPollingInterval": "00:01:00"
[2023-10-05T06:18:20.236Z] }
[2023-10-05T06:18:20.236Z] ScaleOptions
[2023-10-05T06:18:20.236Z] {
[2023-10-05T06:18:20.236Z] "ScaleMetricsMaxAge": "00:02:00",
[2023-10-05T06:18:20.236Z] "ScaleMetricsSampleInterval": "00:00:10",
[2023-10-05T06:18:20.236Z] "MetricsPurgeEnabled": true,
[2023-10-05T06:18:20.236Z] "IsTargetScalingEnabled": true,
[2023-10-05T06:18:20.236Z] "IsRuntimeScalingEnabled": false
[2023-10-05T06:18:20.236Z] }
[2023-10-05T06:18:20.237Z] Starting JobHost
[2023-10-05T06:18:20.241Z] Starting Host (HostId=millerdesktop-1648467767, InstanceId=3366e48e-64a3-4b60-b8de-0778fdc63a00, Version=4.25.3.21264, ProcessId=407032, AppDomainId=1, InDebugMode=False, InDiagnosticMode=False, FunctionsExtensionVersion=(null))
[2023-10-05T06:18:20.258Z] Loading functions metadata
[2023-10-05T06:18:20.258Z] Reading functions metadata
[2023-10-05T06:18:20.258Z] 0 functions found
[2023-10-05T06:18:20.265Z] Reading functions metadata
[2023-10-05T06:18:20.278Z] 1 functions found
[2023-10-05T06:18:20.278Z] 0 functions loaded
[2023-10-05T06:18:20.299Z] Generating 0 job function(s)
[2023-10-05T06:18:20.319Z] No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).
[2023-10-05T06:18:20.329Z] HttpOptions
[2023-10-05T06:18:20.329Z] {
[2023-10-05T06:18:20.329Z] "DynamicThrottlesEnabled": false,
[2023-10-05T06:18:20.329Z] "EnableChunkedRequestBinding": false,
[2023-10-05T06:18:20.329Z] "MaxConcurrentRequests": -1,
[2023-10-05T06:18:20.329Z] "MaxOutstandingRequests": -1,
[2023-10-05T06:18:20.329Z] "RoutePrefix": "api"
[2023-10-05T06:18:20.329Z] }
[2023-10-05T06:18:20.330Z] Initializing function HTTP routes
[2023-10-05T06:18:20.330Z] No HTTP routes mapped
[2023-10-05T06:18:20.330Z]
[2023-10-05T06:18:20.340Z] Host initialized (88ms)
[2023-10-05T06:18:20.343Z] Host started (101ms)
[2023-10-05T06:18:20.343Z] Job host started
^C[2023-10-05T06:32:34.420Z] Stopping host...
[2023-10-05T06:32:34.429Z] Stopping JobHost
[2023-10-05T06:32:34.433Z] Job host stopped
[2023-10-05T06:32:34.444Z] Host shutdown completed.
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the report with Ubuntu 22.04, .NET 7, Azure Functions Core Tools 4.0.5390, and the `func init --target-framework 7.0` project. Start by inspecting the generated `.csproj`, `bin/output/host.json`, and the `func start` output, then trace why one discovered function becomes zero loaded. Done means the same project reports and starts its function successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.