dotnet / aspire-samples

MIT License
742 stars 217 forks source link

Sample AspireWithAzureFunctions not working #575

Open TomaszGrzmilas opened 1 week ago

TomaszGrzmilas commented 1 week ago

Machine: Windows 11:

Image

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."}

Image

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.<b0>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.gCreateResourceExecutablesAsyncCore|620(IResource resource, IEnumerable`1 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.b0(TOptions options, TokenCredential credential, IServiceProvider _) 2024-11-17T11:16:40 at Microsoft.Extensions.Azure.AzureClientFactoryBuilder.<>c__DisplayClass15_0`2.b0(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.<>c15`2.b15_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.<

$>b__0_0(IServiceProvider provider) in D:\Programowanie.NET CORE\ASPIRE\dotnet aspire-samples main samples-AspireWithAzureFunctions\ImageGallery.FrontEnd\Program.cs:line 21 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.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) 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.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, RuntimeResolverContext context) 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.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`