eShop icon indicating copy to clipboard operation
eShop copied to clipboard

Potential SSL error with docker-compose

Open HakonJohannessen opened this issue 8 months ago • 0 comments

I'd just like to preface that I know docker-compose publish is still in preview and that there might be some kinks to iron out. I am also fairly new to Aspire, so if there is some obvious (or less so) configuration I have missed, I would greatly appreciate the help 💃

Error Description

Starting the application from the generated docker-compose file results in Error: 500 Internal Server Error on a blank white screen in the frontend when trying to visit the following pages:

  • cart (localhost:8024/cart)
  • login (localhost:8024/user/login?returnUrl=)

Displaying the landing page and the items however works fine. The webapp logs shows the following stack trace (abbreviated):

aspire-e-shop-webapp-1 | fail: Microsoft.AspNetCore.Server.Kestrel[13] aspire-e-shop-webapp-1 | Connection id "0HNC2MCA8RHRD", Request id "0HNC2MCA8RHRD:00000006": An unhandled exception was thrown by the application. aspire-e-shop-webapp-1 | System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'https://identity-api:8003/.well-known/openid-configuration'. Will retry a t '04/23/2025 22:06:44 +00:00'. Exception: 'System.IO.IOException: IDX20804: Unable to retrieve document from: '[PII of type 'System.String' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'. aspire-e-shop-webapp-1 | ---> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. aspire-e-shop-webapp-1 | ---> System.Security.Authentication.AuthenticationException: Cannot determine the frame size or a corrupted frame was received. aspire-e-shop-webapp-1 | at System.Net.Security.SslStream.GetFrameSize(ReadOnlySpan'1 buffer) aspire-e-shop-webapp-1 | at System.Net.Security.SslStream.EnsureFullTlsFrameAsync[TIOAdapter](CancellationToken cancellationToken, Int32 estimatedSize) aspire-e-shop-webapp-1 | at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder'1.StateMachineBox'1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)

Steps to Reproduce

  1. clone repo (https://github.com/dotnet/eShop.git)
  2. run dotnet run --publisher docker-compose --output-path ./docker-compose
  3. run docker-compose --project-name aspire-e-shop up
  4. browse application on localhost:8024
  5. click either cart- or user icon

HakonJohannessen avatar Apr 23 '25 22:04 HakonJohannessen