Azure / azure-functions-vs-build-sdk

MSBuild task for Azure Functions
MIT License
96 stars 62 forks source link

Created test durable function does not run #374

Open sej69 opened 4 years ago

sej69 commented 4 years ago

I'm following these instructions: https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-create-first-csharp

I see that my libraries automatically set it up for v2 durable functions so I had to change the DurableOrchestrationContext to IDurableOrchestrationContext and DurableOrchestrationClient to IDurableOrchestrationClient.

And after resolving nuget packages I ran the test function.

Azure Functions Core Tools (2.7.2100 Commit hash: 5afacc827c2848e4debc23bb96604f1ffce09cc7) Function Runtime Version: 2.0.12961.0 [2/4/2020 7:26:19 PM] Building host: startup suppressed: 'False', configuration suppressed: 'False', startup operation id: '8d754253-f7aa-467a-bb23-6c5795343cc3' [2/4/2020 7:26:19 PM] Reading host configuration file 'D:\AzureDevOps\PortalAZFunction\PortalAZFunction\PortalAZFunction\bin\Debug\netcoreapp2.1\host.json' [2/4/2020 7:26:19 PM] Host configuration file read: [2/4/2020 7:26:19 PM] { [2/4/2020 7:26:19 PM] "version": "2.0" [2/4/2020 7:26:19 PM] } [2/4/2020 7:26:20 PM] Reading functions metadata [2/4/2020 7:26:20 PM] 3 functions found [2/4/2020 7:26:20 PM] Initializing Warmup Extension. [2/4/2020 7:26:20 PM] Initializing Host. OperationId: '8d754253-f7aa-467a-bb23-6c5795343cc3'. [2/4/2020 7:26:20 PM] Host initialization: ConsecutiveErrors=0, StartupCount=1, OperationId=8d754253-f7aa-467a-bb23-6c5795343cc3 [2/4/2020 7:26:20 PM] LoggerFilterOptions [2/4/2020 7:26:20 PM] { [2/4/2020 7:26:20 PM] "MinLevel": "None", [2/4/2020 7:26:20 PM] "Rules": [ [2/4/2020 7:26:20 PM] { [2/4/2020 7:26:20 PM] "ProviderName": null, [2/4/2020 7:26:20 PM] "CategoryName": null, [2/4/2020 7:26:20 PM] "LogLevel": null, [2/4/2020 7:26:20 PM] "Filter": "b0" [2/4/2020 7:26:20 PM] }, [2/4/2020 7:26:20 PM] { [2/4/2020 7:26:20 PM] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider", [2/4/2020 7:26:20 PM] "CategoryName": null, [2/4/2020 7:26:20 PM] "LogLevel": "None", [2/4/2020 7:26:20 PM] "Filter": null [2/4/2020 7:26:20 PM] }, [2/4/2020 7:26:20 PM] { [2/4/2020 7:26:20 PM] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider", [2/4/2020 7:26:20 PM] "CategoryName": null, [2/4/2020 7:26:20 PM] "LogLevel": null, [2/4/2020 7:26:20 PM] "Filter": "b0" [2/4/2020 7:26:20 PM] } [2/4/2020 7:26:20 PM] ] [2/4/2020 7:26:20 PM] } [2/4/2020 7:26:20 PM] FunctionResultAggregatorOptions [2/4/2020 7:26:20 PM] { [2/4/2020 7:26:20 PM] "BatchSize": 1000, [2/4/2020 7:26:20 PM] "FlushTimeout": "00:00:30", [2/4/2020 7:26:20 PM] "IsEnabled": true [2/4/2020 7:26:20 PM] } [2/4/2020 7:26:20 PM] SingletonOptions [2/4/2020 7:26:20 PM] { [2/4/2020 7:26:20 PM] "LockPeriod": "00:00:15", [2/4/2020 7:26:20 PM] "ListenerLockPeriod": "00:00:15", [2/4/2020 7:26:20 PM] "LockAcquisitionTimeout": "10675199.02:48:05.4775807", [2/4/2020 7:26:20 PM] "LockAcquisitionPollingInterval": "00:00:05", [2/4/2020 7:26:20 PM] "ListenerLockRecoveryPollingInterval": "00:01:00" [2/4/2020 7:26:20 PM] } [2/4/2020 7:26:20 PM] HttpOptions [2/4/2020 7:26:20 PM] { [2/4/2020 7:26:20 PM] "DynamicThrottlesEnabled": false, [2/4/2020 7:26:20 PM] "MaxConcurrentRequests": -1, [2/4/2020 7:26:20 PM] "MaxOutstandingRequests": -1, [2/4/2020 7:26:20 PM] "RoutePrefix": "api" [2/4/2020 7:26:20 PM] } [2/4/2020 7:26:20 PM] Starting JobHost [2/4/2020 7:26:20 PM] Starting Host (HostId=sj10-89032466, InstanceId=9ded10b2-4e47-4dec-8e3d-c964d669e5da, Version=2.0.12961.0, ProcessId=204540, AppDomainId=1, InDebugMode=False, InDiagnosticMode=False, FunctionsExtensionVersion=(null)) [2/4/2020 7:26:20 PM] Loading functions metadata [2/4/2020 7:26:20 PM] 3 functions loaded [2/4/2020 7:26:21 PM] Generating 1 job function(s) [2/4/2020 7:26:21 PM] Microsoft.Azure.WebJobs.Host: Error indexing method 'TestFunction_HttpStart'. Microsoft.Azure.WebJobs.Host: Cannot bind parameter 'starter' to type IDurableOrchestrationClient. Make sure the parameter Type is supported by the binding. 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.). [2/4/2020 7:26:21 PM] Error indexing method 'TestFunction_HttpStart' [2/4/2020 7:26:21 PM] Microsoft.Azure.WebJobs.Host: Error indexing method 'TestFunction_HttpStart'. Microsoft.Azure.WebJobs.Host: Cannot bind parameter 'starter' to type IDurableOrchestrationClient. Make sure the parameter Type is supported by the binding. 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.). [2/4/2020 7:26:21 PM] Function 'TestFunction_HttpStart' failed indexing and will be disabled. [2/4/2020 7:26:21 PM] 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.). [2/4/2020 7:26:21 PM] Initializing function HTTP routes [2/4/2020 7:26:21 PM] Mapped function route 'api/TestFunction_HttpStart' [get,post] to 'TestFunction_HttpStart' [2/4/2020 7:26:21 PM] [2/4/2020 7:26:21 PM] Host initialized (587ms) [2/4/2020 7:26:21 PM] Host started (593ms) [2/4/2020 7:26:21 PM] Job host started [2/4/2020 7:26:21 PM] The 'TestFunction' function is in error: The binding type(s) 'orchestrationTrigger' are not registered. Please ensure the type is correct and the binding extension is installed. [2/4/2020 7:26:21 PM] The 'TestFunction_Hello' function is in error: The binding type(s) 'activityTrigger' are not registered. Please ensure the type is correct and the binding extension is installed. [2/4/2020 7:26:21 PM] The 'TestFunction_HttpStart' function is in error: Microsoft.Azure.WebJobs.Host: Error indexing method 'TestFunction_HttpStart'. Microsoft.Azure.WebJobs.Host: Cannot bind parameter 'starter' to type IDurableOrchestrationClient. Make sure the parameter Type is supported by the binding. 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.). Hosting environment: Production Content root path: D:\AzureDevOps\PortalAZFunction\PortalAZFunction\PortalAZFunction\bin\Debug\netcoreapp2.1 Now listening on: http://0.0.0.0:7071 Application started. Press Ctrl+C to shut down.

Http Functions:

    TestFunction_HttpStart: [GET,POST] http://localhost:7071/api/TestFunction_HttpStart

[2/4/2020 7:26:27 PM] Host lock lease acquired by instance ID '000000000000000000000000016AF34D'.

C:\Users\sjohnson\AppData\Local\AzureFunctionsTools\Releases\2.45.0\cli\func.exe (process 204540) exited with code -1. To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops. Press any key to close this window . . .

I'm just starting to learn azure functions, specifically durable functions so I'm not clear on what is happening. I found others with a similar issue but that was for version 1 and updating the Microsoft.NET.Sdk.Functions or similar was the fix. I'm on the most current versions of installed libraries already.

eliashdezr commented 4 years ago

This might be related: https://github.com/Azure/azure-functions-dotnet-extensions/issues/36