microsoft / microsoft/aspire-samples
Sample AspireWithAzureFunctions not working
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 345
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 30
Description
Machine: Windows 11:
Afred downloading and running ImageGallery.sln I get this error in main console:
Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0] run session could not be started: IDE returned a response indicating failure {"Executable": {"name":"functions-jmvafers"}, "Reconciliation": 6, "Status": "500 Internal Server Error", "Body": "There is no Functions runtime available that matches the version specified in the project."}
Functions log:
2024-11-17T11:14:54 Waiting for resource 'storage' to enter the 'Running' state. 2024-11-17T11:14:57 Waiting for resource 'storage' to become healthy. 2024-11-17T11:15:02 Finished waiting for resource 'storage'.
Frontend log:
2024-11-17T11:14:54 Waiting for resource 'functions' to enter the 'Running' state. 2024-11-17T11:15:02 Dependency resource 'functions' failed to start. 2024-11-17T11:15:02 Failed to create resource frontend Aspire.Hosting.DistributedApplicationException: Dependency resource 'functions' failed to start. at Aspire.Hosting.ApplicationModel.ResourceNotificationService.WaitUntilHealthyAsync(IResource resource, IResource dependency, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/ApplicationModel/ResourceNotificationService.cs:line 139 at Aspire.Hosting.ApplicationModel.ResourceNotificationService.WaitForDependenciesAsync(IResource resource, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/ApplicationModel/ResourceNotificationService.cs:line 257 at Aspire.Hosting.DistributedApplicationBuilder.<>c.<<-ctor>b__32_0>d.MoveNext() in /_/src/Aspire.Hosting/DistributedApplicationBuilder.cs:line 174 --- End of stack trace from previous location --- at Aspire.Hosting.Eventing.DistributedApplicationEventing.<>c__DisplayClass4_01.<b__0>d.MoveNext() in //src/Aspire.Hosting/Eventing/DistributedApplicationEventing.cs:line 82
--- End of stack trace from previous location ---
at Aspire.Hosting.Eventing.DistributedApplicationEventing.PublishAsync[T](T event, EventDispatchBehavior dispatchBehavior, CancellationToken cancellationToken) in //src/Aspire.Hosting/Eventing/DistributedApplicationEventing.cs:line 69
at Aspire.Hosting.Dcp.ApplicationExecutor.g__CreateResourceExecutablesAsyncCore|62_0(IResource resource, IEnumerable1 executables, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Dcp/ApplicationExecutor.cs:line 1216
after hitting Run for Frontend I get this logs:
2024-11-17T11:16:38 Executing command 'resource-start'. 2024-11-17T11:16:38 Successfully executed command 'resource-start'. 2024-11-17T11:16:40 Unhandled exception. System.InvalidOperationException: A QueueServiceClient could not be configured. Ensure valid connection information was provided in 'ConnectionStrings:queues' or specify a 'ConnectionString' or 'ServiceUri' in the 'Aspire:Azure:Storage:Queues' configuration section. 2024-11-17T11:16:40 at Microsoft.Extensions.Hosting.AspireQueueStorageExtensions.StorageQueueComponent.<>c__DisplayClass0_0.<AddClient>b__0(QueueClientOptions options, TokenCredential cred) in /_/src/Components/Aspire.Azure.Storage.Queues/AspireQueueStorageExtensions.cs:line 76 2024-11-17T11:16:40 at Microsoft.Extensions.Azure.AzureClientFactoryBuilder.<>c__DisplayClass8_02.<Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential.RegisterClientFactory>b__0(TOptions options, TokenCredential credential, IServiceProvider _)
2024-11-17T11:16:40
at Microsoft.Extensions.Azure.AzureClientFactoryBuilder.<>c__DisplayClass15_02.<RegisterClientFactory>b__0(IServiceProvider provider, Object options, TokenCredential credential) 2024-11-17T11:16:40 at Microsoft.Extensions.Azure.ClientRegistration1.GetClient(IServiceProvider serviceProvider, Object options, TokenCredential tokenCredential)
2024-11-17T11:16:40
at Microsoft.Extensions.Azure.AzureClientFactory2.CreateClient(String name) 2024-11-17T11:16:40 at Microsoft.Extensions.Azure.AzureClientFactoryBuilder.<>c__152.b__15_1(IServiceProvider provider)
2024-11-17T11:16:40
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) 2024-11-17T11:16:40 at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) 2024-11-17T11:16:40 at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
2024-11-17T11:16:40
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
2024-11-17T11:16:40
at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier)
2024-11-17T11:16:40
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
2024-11-17T11:16:40
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
2024-11-17T11:16:40
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
2024-11-17T11:16:40
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
2024-11-17T11:16:40
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
2024-11-17T11:16:40
at Program.<>c.<
2024-11-17T11:16:40
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) 2024-11-17T11:16:40 at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) 2024-11-17T11:16:40 at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(ServiceCallSite callSite, TArgument argument)2024-11-17T11:16:40
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
2024-11-17T11:16:40
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) 2024-11-17T11:16:40 at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) 2024-11-17T11:16:40 at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(ServiceCallSite callSite, TArgument argument)2024-11-17T11:16:40
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, RuntimeResolverContext context)
2024-11-17T11:16:40
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) 2024-11-17T11:16:40 at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) 2024-11-17T11:16:40 at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(ServiceCallSite callSite, TArgument argument)2024-11-17T11:16:40
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
2024-11-17T11:16:40
at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier)
2024-11-17T11:16:40
at System.Collections.Concurrent.ConcurrentDictionary
2.GetOrAdd(TKey key, Func2 valueFactory)2024-11-17T11:16:40
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
2024-11-17T11:16:40
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
2024-11-17T11:16:40
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
2024-11-17T11:16:40
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
2024-11-17T11:16:40
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
2024-11-17T11:16:40
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
2024-11-17T11:16:40
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
2024-11-17T11:16:40
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
2024-11-17T11:16:40
at Program.$(String[] args) in D:\Programowanie.NET CORE\ASPIRE\dotnet aspire-samples main samples-AspireWithAzureFunctions\ImageGallery.FrontEnd\Program.cs:line 64`
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue by opening ImageGallery.sln from the AspireWithAzureFunctions sample and running it on Windows 11. Start with the Functions runtime failure, then inspect ImageGallery.FrontEnd/Program.cs at lines 21 and 64 for the queue-client exception. Done means the sample starts without the reported Functions and QueueServiceClient errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100