dotnet / eShop

A reference .NET application implementing an eCommerce site
MIT License
4.69k stars 1.33k forks source link

[WebToolsE2E][Aspire] Running the eShop.Web solution using `http` fails with error: The endpoint https is not allocated for the resource webhooksclient. #228

Open v-sherryfan opened 4 months ago

v-sherryfan commented 4 months ago

REGRESSION INFO: Worked fine on Aspire 8.0.0-preview.3.24105.21

INSTALL STEPS

  1. Clean machine: Win11 x64 23h2 ENU
  2. Install VS 17.10 Preview 2 [ Includes Aspire 8.0.0-preview.4.24129.7 ]
  3. Apply NuGet dotnet-tools Feeds
  4. Install Docker Desktop for Windows

REPRO STEPS

  1. Clone eShop repo from main branch
  2. Checkout the aspire-preview.4 branch
  3. Open eShop.Web.slnf ( Bug 1985774 will be encountered after opening)
  4. F5 / Ctrl+F5 with http

Note

  1. Running with https works fine.

ACTUAL: fail: Microsoft.Extensions.Hosting.Internal.Host[11] Hosting failed to start System.InvalidOperationException: The endpoint https is not allocated for the resource webhooksclient. at Aspire.Hosting.ApplicationModel.EndpointReference.getValue() in //src/Aspire.Hosting/ApplicationModel/EndpointReference.cs:line 37 at Aspire.Hosting.ResourceBuilderExtensions.<>cDisplayClass4_01.<WithEnvironment>b__0(EnvironmentCallbackContext context) in /_/src/Aspire.Hosting/Extensions/ResourceBuilderExtensions.cs:line 76 at Aspire.Hosting.Dcp.ApplicationExecutor.CreateExecutablesAsync(IEnumerable1 executableResources, CancellationToken cancellationToken) in //src/Aspire.Hosting/Dcp/ApplicationExecutor.cs:line 573 at Aspire.Hosting.Dcp.ApplicationExecutor.CreateContainersAndExecutablesAsync(CancellationToken cancellationToken) in //src/Aspire.Hosting/Dcp/ApplicationExecutor.cs:line 304 at Aspire.Hosting.Dcp.ApplicationExecutor.RunApplicationAsync(CancellationToken cancellationToken) in //src/Aspire.Hosting/Dcp/ApplicationExecutor.cs:line 100 at Aspire.Hosting.Dcp.DcpHostService.StartAsync(CancellationToken cancellationToken) in //src/Aspire.Hosting/Dcp/DcpHostService.cs:line 68 at Microsoft.Extensions.Hosting.Internal.Host.b15_1(IHostedService service, CancellationToken token) at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List1 exceptions, Func`3 operation)

image image

Additional Info image

EXPECTED Running with http successfully.

haacked commented 3 months ago

I just ran into this on Mac OS with the main branch.

> dotnet --info

``` .NET SDK: Version: 8.0.203 Commit: 5e1ceea679 Workload version: 8.0.200-manifests.a7f084b6 Runtime Environment: OS Name: Mac OS X OS Version: 14.4 OS Platform: Darwin RID: osx-arm64 Base Path: /usr/local/share/dotnet/sdk/8.0.203/ .NET workloads installed: [maui-tizen] Installation Source: SDK 8.0.200 Manifest Version: 8.0.7/8.0.100 Manifest Path: /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maui/8.0.7/WorkloadManifest.json Install Type: FileBased [maui-maccatalyst] Installation Source: SDK 8.0.200 Manifest Version: 8.0.7/8.0.100 Manifest Path: /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maui/8.0.7/WorkloadManifest.json Install Type: FileBased [maui-ios] Installation Source: SDK 8.0.200 Manifest Version: 8.0.7/8.0.100 Manifest Path: /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maui/8.0.7/WorkloadManifest.json Install Type: FileBased [maui-android] Installation Source: SDK 8.0.200 Manifest Version: 8.0.7/8.0.100 Manifest Path: /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maui/8.0.7/WorkloadManifest.json Install Type: FileBased [aspire] Installation Source: SDK 8.0.200 Manifest Version: 8.0.0-preview.4.24156.9/8.0.100 Manifest Path: /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.aspire/8.0.0-preview.4.24156.9/WorkloadManifest.json Install Type: FileBased Host: Version: 9.0.0-preview.2.24128.5 Architecture: arm64 Commit: 8e5e748c5c .NET SDKs installed: 6.0.402 [/usr/local/share/dotnet/sdk] 7.0.100 [/usr/local/share/dotnet/sdk] 7.0.103 [/usr/local/share/dotnet/sdk] 7.0.202 [/usr/local/share/dotnet/sdk] 7.0.203 [/usr/local/share/dotnet/sdk] 8.0.100 [/usr/local/share/dotnet/sdk] 8.0.203 [/usr/local/share/dotnet/sdk] 9.0.100-preview.2.24157.14 [/usr/local/share/dotnet/sdk] .NET runtimes installed: Microsoft.AspNetCore.App 6.0.10 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 9.0.0-preview.2.24128.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.10 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 9.0.0-preview.2.24128.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Other architectures found: x64 [/usr/local/share/dotnet/x64] registered at [/etc/dotnet/install_location_x64] Environment variables: Not set global.json file: /Users/haacked/dev/third-party/eshop/global.json Learn more: https://aka.ms/dotnet/info Download .NET: https://aka.ms/dotnet/download ```
balachir commented 3 months ago

@adityamandaleeka can we have someone investigate? I believe this reproduces using the latest released Aspire P4.

davidfowl commented 3 months ago

Look like a regression.

davidfowl commented 3 months ago

Hmm I'd be surprised if this happened on windows. This seems like an issue where the https launch profile isn't being used...

ChuanGz commented 3 months ago

I tested on Macbook M2 chip: case 1, if I use "http" profile, the result application work well

image

case 2, if I still use "https" profile as code at main branch, I see the error as below:

image

So, help to check case 2

slapointe commented 3 months ago

I have the same problem on a Macbook M1 chip. The endpoint https is not allocated... error when invoking dotnet run --project src/eShop.AppHost/eShop.AppHost.csproj command from the README file.

v-sherryfan commented 2 months ago

Unable to reproduce on 17.10 Preview 3 [Includes Aspire 8.0.0-preview.5.24201.12] using eShop aspire-preview5 branch, but I meet a different issue https://github.com/dotnet/eShop/issues/298

lcorneliussen commented 2 months ago

I have the same problem on my own project using a Macbook Air M2 (using Preview 6).

Was also able to reproduce it from the starter template with following steps:

  1. Fresh Aspire Starter Project
  2. Add this to AppHost: Console.WriteLine("Endpoint is: " + apiService.GetEndpoint("http").Url);
moljac commented 1 month ago

Aspire Starter

var builder = DistributedApplication.CreateBuilder(args);

var apiService = builder.AddProject<Projects.AppAspireRepro_ApiService>("apiservice");

builder.AddProject<Projects.AppAspireRepro_Web>("webfrontend")
    .WithExternalHttpEndpoints()
    .WithReference(apiService);

Console.WriteLine($"IP          {apiService.GetEndpoint("http").Url}");

builder.Build().Run();

results in:

Exception has occurred: CLR/System.InvalidOperationException
An unhandled exception of type 'System.InvalidOperationException' occurred in Aspire.Hosting.dll: 'The endpoint `http` is not allocated for the resource `apiservice`.'
   at Aspire.Hosting.ApplicationModel.EndpointReference.get_AllocatedEndpoint()
   at Aspire.Hosting.ApplicationModel.EndpointReference.get_Url()
   at Program.<Main>$(String[] args) in /Users/Shared/Projects/d/Samples-Playgrounds/gh/Blazor.FluentUI/samples/code-sharing/AppAspireRepro/AppAspireRepro.AppHost/Program.cs:line 9

MBP M2

dotnet --info
 dotnet --info
.NET SDK:
 Version:           8.0.300
 Commit:            326f6e68b2
 Workload version:  8.0.300-manifests.6751eab7
 MSBuild version:   17.10.4+10fbfbf2e

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  14.5
 OS Platform: Darwin
 RID:         osx-arm64
 Base Path:   /usr/local/share/dotnet/sdk/8.0.300/

.NET workloads installed:
 [wasm-tools]
   Installation Source: SDK 8.0.300
   Manifest Version:    8.0.5/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.workload.mono.toolchain.current/8.0.5/WorkloadManifest.json
   Install Type:        FileBased

 [maui-windows]
   Installation Source: SDK 8.0.300
   Manifest Version:    8.0.21/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maui/8.0.21/WorkloadManifest.json
   Install Type:        FileBased

 [macos]
   Installation Source: SDK 8.0.300
   Manifest Version:    14.2.8053/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.macos/14.2.8053/WorkloadManifest.json
   Install Type:        FileBased

 [maui-tizen]
   Installation Source: SDK 8.0.300
   Manifest Version:    8.0.21/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maui/8.0.21/WorkloadManifest.json
   Install Type:        FileBased

 [maui-maccatalyst]
   Installation Source: SDK 8.0.300
   Manifest Version:    8.0.21/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maui/8.0.21/WorkloadManifest.json
   Install Type:        FileBased

 [maui-ios]
   Installation Source: SDK 8.0.300
   Manifest Version:    8.0.21/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maui/8.0.21/WorkloadManifest.json
   Install Type:        FileBased

 [wasi-experimental]
   Installation Source: SDK 8.0.300
   Manifest Version:    8.0.5/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.workload.mono.toolchain.current/8.0.5/WorkloadManifest.json
   Install Type:        FileBased

 [maui-android]
   Installation Source: SDK 8.0.300
   Manifest Version:    8.0.21/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maui/8.0.21/WorkloadManifest.json
   Install Type:        FileBased

 [ios]
   Installation Source: SDK 8.0.300
   Manifest Version:    17.2.8053/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.ios/17.2.8053/WorkloadManifest.json
   Install Type:        FileBased

 [aspire]
   Installation Source: SDK 8.0.300
   Manifest Version:    8.0.1/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.aspire/8.0.1/WorkloadManifest.json
   Install Type:        FileBased

 [maui-mobile]
   Installation Source: SDK 8.0.300
   Manifest Version:    8.0.21/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maui/8.0.21/WorkloadManifest.json
   Install Type:        FileBased

 [maccatalyst]
   Installation Source: SDK 8.0.300
   Manifest Version:    17.2.8053/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maccatalyst/17.2.8053/WorkloadManifest.json
   Install Type:        FileBased

 [maui]
   Installation Source: SDK 8.0.300
   Manifest Version:    8.0.21/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maui/8.0.21/WorkloadManifest.json
   Install Type:        FileBased

 [tvos]
   Installation Source: SDK 8.0.300
   Manifest Version:    17.2.8053/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.tvos/17.2.8053/WorkloadManifest.json
   Install Type:        FileBased

 [android]
   Installation Source: SDK 8.0.300
   Manifest Version:    34.0.95/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.android/34.0.95/WorkloadManifest.json
   Install Type:        FileBased

 [wasm-experimental]
   Installation Source: SDK 8.0.300
   Manifest Version:    8.0.5/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.workload.mono.toolchain.current/8.0.5/WorkloadManifest.json
   Install Type:        FileBased

 [wasm-experimental-net7]
   Installation Source: SDK 8.0.300
   Manifest Version:    8.0.5/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.workload.mono.toolchain.net7/8.0.5/WorkloadManifest.json
   Install Type:        FileBased

 [wasm-tools-net6]
   Installation Source: SDK 8.0.300
   Manifest Version:    8.0.5/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.workload.mono.toolchain.net6/8.0.5/WorkloadManifest.json
   Install Type:        FileBased

 [wasm-tools-net7]
   Installation Source: SDK 8.0.300
   Manifest Version:    8.0.5/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.workload.mono.toolchain.net7/8.0.5/WorkloadManifest.json
   Install Type:        FileBased

Host:
  Version:      9.0.0-preview.1.24080.9
  Architecture: arm64
  Commit:       1d1bf92fcf

.NET SDKs installed:
  6.0.123 [/usr/local/share/dotnet/sdk]
  6.0.126 [/usr/local/share/dotnet/sdk]
  6.0.128 [/usr/local/share/dotnet/sdk]
  6.0.129 [/usr/local/share/dotnet/sdk]
  6.0.130 [/usr/local/share/dotnet/sdk]
  6.0.315 [/usr/local/share/dotnet/sdk]
  6.0.318 [/usr/local/share/dotnet/sdk]
  6.0.321 [/usr/local/share/dotnet/sdk]
  6.0.412 [/usr/local/share/dotnet/sdk]
  6.0.415 [/usr/local/share/dotnet/sdk]
  6.0.416 [/usr/local/share/dotnet/sdk]
  6.0.417 [/usr/local/share/dotnet/sdk]
  6.0.418 [/usr/local/share/dotnet/sdk]
  6.0.419 [/usr/local/share/dotnet/sdk]
  6.0.420 [/usr/local/share/dotnet/sdk]
  6.0.421 [/usr/local/share/dotnet/sdk]
  7.0.109 [/usr/local/share/dotnet/sdk]
  7.0.112 [/usr/local/share/dotnet/sdk]
  7.0.115 [/usr/local/share/dotnet/sdk]
  7.0.118 [/usr/local/share/dotnet/sdk]
  7.0.306 [/usr/local/share/dotnet/sdk]
  7.0.309 [/usr/local/share/dotnet/sdk]
  7.0.310 [/usr/local/share/dotnet/sdk]
  7.0.312 [/usr/local/share/dotnet/sdk]
  7.0.314 [/usr/local/share/dotnet/sdk]
  7.0.315 [/usr/local/share/dotnet/sdk]
  7.0.401 [/usr/local/share/dotnet/sdk]
  7.0.402 [/usr/local/share/dotnet/sdk]
  7.0.403 [/usr/local/share/dotnet/sdk]
  7.0.405 [/usr/local/share/dotnet/sdk]
  7.0.406 [/usr/local/share/dotnet/sdk]
  7.0.407 [/usr/local/share/dotnet/sdk]
  7.0.408 [/usr/local/share/dotnet/sdk]
  8.0.100 [/usr/local/share/dotnet/sdk]
  8.0.101 [/usr/local/share/dotnet/sdk]
  8.0.103 [/usr/local/share/dotnet/sdk]
  8.0.104 [/usr/local/share/dotnet/sdk]
  8.0.200 [/usr/local/share/dotnet/sdk]
  8.0.201 [/usr/local/share/dotnet/sdk]
  8.0.202 [/usr/local/share/dotnet/sdk]
  8.0.203 [/usr/local/share/dotnet/sdk]
  8.0.204 [/usr/local/share/dotnet/sdk]
  8.0.205 [/usr/local/share/dotnet/sdk]
  8.0.300 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.20 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.23 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.24 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.25 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.26 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.27 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.28 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.29 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.30 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.9 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.11 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.12 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.13 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.15 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.16 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.17 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.18 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.20 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.23 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.24 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.25 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.26 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.27 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.28 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.29 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.30 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.9 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.11 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.12 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.13 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.15 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.16 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.17 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.18 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  x64   [/usr/local/share/dotnet/x64]
    registered at [/etc/dotnet/install_location_x64]

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download
rmarinho commented 1 month ago

Hitting this too the using azd init

➜  SCEAspire.AppHost git:(main) ✗ azd init

Initializing an app to run on Azure (azd init)

? How do you want to initialize your app? Use code in the current directory

ERROR: failed to generate manifest from app host project: generating app host manifest: dotnet run --publisher manifest on project '/Users/ruimarinho/Projects/SCEAspire/SCEAspire.AppHost/SCEAspire.AppHost.csproj' failed: exit code: 134, stdout: Building...
info: Aspire.Hosting.DistributedApplication[0]
      Aspire version: 8.0.1+a6e341ebbf956bbcec0dda304109815fcbae70c9
fail: Microsoft.Extensions.Hosting.Internal.Host[11]
      Hosting failed to start
      System.InvalidOperationException: The endpoint `http` is not allocated for the resource `webfrontend`.
         at Aspire.Hosting.ApplicationModel.EndpointReference.get_AllocatedEndpoint() in /_/src/Aspire.Hosting/ApplicationModel/EndpointReference.cs:line 107
         at Aspire.Hosting.ApplicationModel.EndpointReference.get_Url() in /_/src/Aspire.Hosting/ApplicationModel/EndpointReference.cs:line 104
         at Program.<>c__DisplayClass0_0.<<Main>$>b__0() in /Users/ruimarinho/Projects/SCEAspire/SCEAspire.AppHost/Program.cs:line 40
         at Aspire.Hosting.ApplicationModel.EnvironmentCallbackAnnotation.<>c__DisplayClass1_0.<.ctor>b__0(EnvironmentCallbackContext c) in /_/src/Aspire.Hosting/ApplicationModel/EnvironmentCallbackAnnotation.cs:line 29
         at Aspire.Hosting.Publishing.ManifestPublishingContext.WriteEnvironmentVariablesAsync(IResource resource) in /_/src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs:line 357
         at Aspire.Hosting.Publishing.ManifestPublishingContext.WriteContainerAsync(ContainerResource container) in /_/src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs:line 248
         at Aspire.Hosting.KeycloakHostingExtensions.WriteKeycloakContainerToManifestTask(ManifestPublishingContext context, KeycloakContainerResource resource) in /Users/ruimarinho/Projects/SCEAspire/SCEAspire.AppHost/Extensions/KeycloakHostingExtensions.cs:line 57
         at Aspire.Hosting.Publishing.ManifestPublishingContext.<>c__DisplayClass20_0.<<WriteResourceAsync>g__WriteResourceObjectAsync|1>d`1.MoveNext() in /_/src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs:line 125
      --- End of stack trace from previous location ---
         at Aspire.Hosting.Publishing.ManifestPublishingContext.WriteResourceAsync(IResource resource) in /_/src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs:line 94
         at Aspire.Hosting.Publishing.ManifestPublishingContext.WriteModel(DistributedApplicationModel model, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs:line 75
         at Aspire.Hosting.Publishing.ManifestPublisher.WriteManifestAsync(DistributedApplicationModel model, Utf8JsonWriter jsonWriter, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Publishing/ManifestPublisher.cs:line 53
         at Aspire.Hosting.Publishing.ManifestPublisher.PublishInternalAsync(DistributedApplicationModel model, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Publishing/ManifestPublisher.cs:line 42
         at Aspire.Hosting.Publishing.ManifestPublisher.PublishAsync(DistributedApplicationModel model, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Publishing/ManifestPublisher.cs:line 26
         at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__15_1(IHostedService service, CancellationToken token)
         at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
, stderr: Unhandled exception. System.AggregateException: One or more errors occurred. (The endpoint `http` is not allocated for the resource `webfrontend`.)
 ---> System.InvalidOperationException: The endpoint `http` is not allocated for the resource `webfrontend`.
   at Aspire.Hosting.ApplicationModel.EndpointReference.get_AllocatedEndpoint() in /_/src/Aspire.Hosting/ApplicationModel/EndpointReference.cs:line 107
   at Aspire.Hosting.ApplicationModel.EndpointReference.get_Url() in /_/src/Aspire.Hosting/ApplicationModel/EndpointReference.cs:line 104
   at Program.<>c__DisplayClass0_0.<<Main>$>b__0() in /Users/ruimarinho/Projects/SCEAspire/SCEAspire.AppHost/Program.cs:line 40
   at Aspire.Hosting.ApplicationModel.EnvironmentCallbackAnnotation.<>c__DisplayClass1_0.<.ctor>b__0(EnvironmentCallbackContext c) in /_/src/Aspire.Hosting/ApplicationModel/EnvironmentCallbackAnnotation.cs:line 29
   at Aspire.Hosting.Publishing.ManifestPublishingContext.WriteEnvironmentVariablesAsync(IResource resource) in /_/src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs:line 357
   at Aspire.Hosting.Publishing.ManifestPublishingContext.WriteContainerAsync(ContainerResource container) in /_/src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs:line 248
   at Aspire.Hosting.KeycloakHostingExtensions.WriteKeycloakContainerToManifestTask(ManifestPublishingContext context, KeycloakContainerResource resource) in /Users/ruimarinho/Projects/SCEAspire/SCEAspire.AppHost/Extensions/KeycloakHostingExtensions.cs:line 57
   at Aspire.Hosting.Publishing.ManifestPublishingContext.<>c__DisplayClass20_0.<<WriteResourceAsync>g__WriteResourceObjectAsync|1>d`1.MoveNext() in /_/src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs:line 125
--- End of stack trace from previous location ---
   at Aspire.Hosting.Publishing.ManifestPublishingContext.WriteResourceAsync(IResource resource) in /_/src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs:line 94
   at Aspire.Hosting.Publishing.ManifestPublishingContext.WriteModel(DistributedApplicationModel model, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs:line 75
   at Aspire.Hosting.Publishing.ManifestPublisher.WriteManifestAsync(DistributedApplicationModel model, Utf8JsonWriter jsonWriter, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Publishing/ManifestPublisher.cs:line 53
   at Aspire.Hosting.Publishing.ManifestPublisher.PublishInternalAsync(DistributedApplicationModel model, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Publishing/ManifestPublisher.cs:line 42
   at Aspire.Hosting.Publishing.ManifestPublisher.PublishAsync(DistributedApplicationModel model, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Publishing/ManifestPublisher.cs:line 26
   at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__15_1(IHostedService service, CancellationToken token)
   at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
   at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Aspire.Hosting.DistributedApplication.RunAsync(CancellationToken cancellationToken) in /_/src/Aspire.Hosting/DistributedApplication.cs:line 310
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at Aspire.Hosting.DistributedApplication.Run() in /_/src/Aspire.Hosting/DistributedApplication.cs:line 338
   at Program.<Main>$(String[] args) in /Users/ruimarinho/Projects/SCEAspire/SCEAspire.AppHost/Program.cs:line 52
➜  SCEAspire git:(main) ✗ dotnet workload list           

Installed Workload Id      Manifest Version      Installation Source
--------------------------------------------------------------------
aspire                     8.0.1/8.0.100         SDK 8.0.200        
maui                       8.0.21/8.0.100        SDK 8.0.200        

Use `dotnet workload search` to find additional workloads to install.

➜  SCEAspire git:(main) ✗ dotnet --info
.NET SDK:
 Version:           8.0.203
 Commit:            5e1ceea679
 Workload version:  8.0.200-manifests.6751eab7

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  14.5
 OS Platform: Darwin
 RID:         osx-arm64
 Base Path:   /usr/local/share/dotnet/sdk/8.0.203/

.NET workloads installed:
 [aspire]
   Installation Source: SDK 8.0.200
   Manifest Version:    8.0.1/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.aspire/8.0.1/WorkloadManifest.json
   Install Type:        FileBased

 [maui]
   Installation Source: SDK 8.0.200
   Manifest Version:    8.0.21/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maui/8.0.21/WorkloadManifest.json
   Install Type:        FileBased

Host:
  Version:      9.0.0-preview.4.24266.19
  Architecture: arm64
  Commit:       d0d6fed6c0

.NET SDKs installed:
  6.0.420 [/usr/local/share/dotnet/sdk]
  6.0.422 [/usr/local/share/dotnet/sdk]
  7.0.314 [/usr/local/share/dotnet/sdk]
  7.0.315 [/usr/local/share/dotnet/sdk]
  7.0.316 [/usr/local/share/dotnet/sdk]
  8.0.203 [/usr/local/share/dotnet/sdk]
  9.0.100-preview.4.24267.66 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.28 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.30 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.17 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.18 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.19 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 9.0.0-preview.4.24267.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.28 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.30 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.17 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.18 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.19 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 9.0.0-preview.4.24266.19 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  /Users/ruimarinho/Projects/SCEAspire/global.json

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download