[WebToolsE2E][Aspire] When turning on the "Auto refresh" button of the weather page on the Metrics sample, an error appears in the console logs: System.InvalidOperationException: Error getting weather data. #260
Install VS 17.10 Preview 7 [ Includes Aspire 8.0.0-preview.7.24251.11 and SDK 8.0.300-preview.24203.14 ]
Apply NuGet dotnet-tools Feed
Install Docker Desktop for Windows
Install latest azd [1.9.0-beta.1-daily.3760115]
REPRO STEPS
Clone aspire-samples repo, checkout the release/8.0 branch
Open samples\Metrics.sln
Build and run (F5 / Ctrl+F5)
Go to "Auth Required" page on Metrics sample > click 'Log in' to log into your account
Then go to "Weather" page > turn on the "Auto refresh" button
Go back to "Console logs" tab on dashboard, select "app" in dropdown list
ACTUAL
fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
An unhandled exception has occurred while executing the request.
System.InvalidOperationException: Error getting weather data.
at MetricsApp.ClientApi.<>c.<b__1_0>d.MoveNext() in C:\Users\v-sherryfan\source\repos\aspire-samples\samples\Metrics\MetricsApp\ClientApi.cs:line 18
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Http.RequestDelegateFactory.g__ExecuteAwaited|132_0[T](Task1 task, HttpContext httpContext, JsonTypeInfo1 jsonTypeInfo)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
EXPECTED
There is no any errors in the console logs when turning on the "Auto refresh" button for the weather page
REGRESSION INFO: Also repro on Aspire 8.0 P6
INSTALL STEPS
REPRO STEPS
release/8.0
branchACTUAL fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1] An unhandled exception has occurred while executing the request. System.InvalidOperationException: Error getting weather data. at MetricsApp.ClientApi.<>c.<b__1_0>d.MoveNext() in C:\Users\v-sherryfan\source\repos\aspire-samples\samples\Metrics\MetricsApp\ClientApi.cs:line 18
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Http.RequestDelegateFactory.g__ExecuteAwaited|132_0[T](Task![image](https://github.com/dotnet/aspire-samples/assets/71361488/758b8332-f30b-421d-bcbb-de77f8152c0c)
1 task, HttpContext httpContext, JsonTypeInfo
1 jsonTypeInfo) at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)EXPECTED
There is no any errors in the console logs when turning on the "Auto refresh" button for the weather page