Storefront Installation Error

Hi,

I’m trying to install Virtocommerce & Storefront on my Ubuntu machine. I followed the quick start guide provided at QuickStart guide and was able to successfully install the backend.

Next, I installed the storefront by following the guide at getting-started/connect-storefront-to-platform-v3/.
I launched the frontend using the command “dotnet VirtoCommerce.Storefront.dll --urls=http://localhost:5002”. However, when I tried to access the storefront in my browser at http://localhost:5002, I received an HTTP ERROR 500 message that said
“This page isn’t working.
localhost is currently unable to handle this request.”

Please advise how to fix the error.

Here are some errors:-
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[3]
An exception was thrown attempting to execute the error handler.
System.NullReferenceException: Object reference not set to an instance of an object.

fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id “0HMQPRA7MITJ1”, Request id “0HMQPRA7MITJ1:00000002”: An unhandled exception was thrown by the application.
System.Net.Http.HttpRequestException: Connection refused (localhost:10645)
—> System.Net.Sockets.SocketException (111): Connection refused

Could you check what’s localhost:10645? Is it accessible? Is it the admin backend?

The backend is running at localhost:5001 so i changed it in storefront appsettings.json Endpoint section.
I ran the storefront after port change, still receiving “HTTP ERROR 500” error

Here is error log

fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id “0HMQQMT5IRD2M”, Request id “0HMQQMT5IRD2M:00000001”: An unhandled exception was thrown by the application.
System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
—> System.Security.Authentication.AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: PartialChain
at System.Net.Security.SslStream.SendAuthResetSignal(ProtocolToken message, ExceptionDispatchInfo exception)
at System.Net.Security.SslStream.CompleteHandshake(SslAuthenticationOptions sslAuthenticationOptions)

fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[3]
An exception was thrown attempting to execute the error handler.
System.NullReferenceException: Object reference not set to an instance of an object.
at VirtoCommerce.Storefront.Domain.Security.AnonymousUserForStoreAuthorizationHandler.HandleRequirementAsync(AuthorizationHandlerContext context, AnonymousUserForStoreAuthorizationRequirement requirement) in /home/runner/work/vc-storefront/vc-storefront/VirtoCommerce.Storefront/Domain/Security/AnonymousUserForStoreAuthorizationRequirement.cs:line 25

Please review that dev certificate has been installed and trusted. To trust the certificate, perform the one-time step to run the dotnet dev-certs tool:

dotnet dev-certs https --trust

for more information visit this link

Yes i have used following command dotnet dev-certs https --clean & dotnet dev-certs https --trust installed dev certificate

  • Confirmed the backend runs fine at https://localhost:5001
  • I have tested this on both Windows and Ubuntu platforms, following the QuickStart steps, but I’m still receiving the same “HTTP ERROR 500” error.
  • Is there a way to temporarily disable SSL certificate authentication for the storefront while I troubleshoot this error?

System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
—> System.Security.Authentication.AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: PartialChain

In deed, you need to resolve certificate error or switch to HTTP mode. Here some links from Google, I hope it helps you:
Solved: Re: Errors in the certificate chain (PostgreSQL) - Google Cloud Community
c# - The SSL connection could not be established - Stack Overflow
The SSL connection could not be established, see inner exception - Microsoft Q&A