Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Opening SPA page fails #28

Closed
samcov opened this issue Feb 19, 2021 · 10 comments
Closed

Opening SPA page fails #28

samcov opened this issue Feb 19, 2021 · 10 comments
Assignees

Comments

@samcov
Copy link

samcov commented Feb 19, 2021

Navigating to http://localhost:5104/ gives the following error: InvalidOperationException: The SPA default page middleware could not return the default page '/index.html' because it was not found, and no other middleware handled the request.

However, http://localhost:5107/hc-ui works just fine(see pic)
image

@amolenk
Copy link
Collaborator

amolenk commented Feb 19, 2021

Have you tried refreshing http://localhost:5104 or even stopping/starting the solution? I've come across this error in the past, and then it seemed to be transient.

@samcov
Copy link
Author

samcov commented Feb 19, 2021

I've tried refreshing it, restarting it, with no success.

Is this an angular thing? I know it's somewhat popular, but I really prefer straight html/js/css, not sure what's going on here, this is/should be the simplest part of the solution :)

Edit: Tried it on another machine and got the same results :(

@amolenk amolenk self-assigned this Feb 20, 2021
@samcov
Copy link
Author

samcov commented Feb 21, 2021

Note: I downloaded the latest with changes to WebSpa, but it still didn't work, but also didn't throw an exception.

However, I tried running it using the command line: "docker-compose up"

This worked, the main page came up from http://localhost:5104 redirecting to http://localhost:5104/catalog

There were missing images and functionality, which appears to indicate root directory issues possibly.
image

@amolenk
Copy link
Collaborator

amolenk commented Feb 21, 2021

Hmmm, I can't repro your docker-compose problem with some of the images not loading. I've tested running the solution using docker-compose up on both macOS and Windows and that worked.
BTW to buy something in the shop, you need to login first (top-right button). Otherwise, you won't be able to add any items to your basket.
My main focus now is getting the Blazor front-end up & running which will definitely take care of any Angular-related problems ;-)

@timfun
Copy link

timfun commented Feb 22, 2021

I have been there, have the same issue when run by visual studio , i will try to run by powershell

@amolenk
Copy link
Collaborator

amolenk commented Feb 22, 2021

Just pushed some fixes that should make the SPA work properly both when running from Visual Studio and Docker Compose directly.

@samcov @timfun Can you check if the latest update works for you?

@samcov
Copy link
Author

samcov commented Feb 22, 2021

The catalog does come up(with all pictures), but I don't see a login button anywhere.

@amolenk
Copy link
Collaborator

amolenk commented Feb 22, 2021

It's in the top-right, but the visibility is not great with the current background image.

image

@samcov
Copy link
Author

samcov commented Feb 22, 2021

Found it!!!

I logged in and was able to add items to the cart, and then check out.

GREAT Job, Thanks!

@timfun
Copy link

timfun commented Feb 23, 2021

@amolenk

Just pushed some fixes that should make the SPA work properly both when running from Visual Studio and Docker Compose directly.

@samcov @timfun Can you check if the latest update works for you?

I find a way to make it work when running from Visual Studio.
add the code below to WebSpa.csproj at the end of node.
''

I will try your fix thks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants