Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

WebSPA returns 404 when started from VS2017 on both Windows and macOS #973

Closed
richard-ashby opened this issue Mar 15, 2019 · 7 comments
Closed

Comments

@richard-ashby
Copy link

richard-ashby commented Mar 15, 2019

Issue raised as requested by @mvelosop

I noticed that the WebSPA doesn't appear to work (http://localhost:5104/ returns 404) when app started from VS2017 (both Windows and macOS), however it does work when docker-compose up is run using the CLI.

WebSPA and Build logs to follow.

Possible cause: Following taken from the WebSPA output ...

[10:54:16 ERR] ERROR in GetPreconfiguredImages: Value cannot be null.
Parameter name: path1
System.ArgumentNullException: Value cannot be null.
Parameter name: path1
at System.IO.Path.Combine(String path1, String path2, String path3)
at WebSPA.Infrastructure.WebContextSeed.GetPreconfiguredImages(String contentRootPath, String webroot, ILogger log) in /Users/richard/Projects/eShopOnContainers/src/Web/WebSPA/Server/Infrastructure/WebContextSeed.cs:line 44

Originally posted by @richard-ashby in #107 (comment)

@richard-ashby
Copy link
Author

WebSPA and Build logs attached...
build.log.zip
WebSPA.log.zip

@mvelosop
Copy link
Collaborator

What versions of the SDK do you have installed?

Check with dotnet --list-sdks from the CLI, you should get something like this:

image

You need to have a 2.2.x SDK installed, it works fine for me with 2.2.201.

@richard-ashby
Copy link
Author

Hi @mvelosop

I've got ...

Richards-MacBook-Pro:eShopOnContainers richard$ dotnet --list-sdks
2.1.202 [/usr/local/share/dotnet/sdk]
2.1.502 [/usr/local/share/dotnet/sdk]
2.2.101 [/usr/local/share/dotnet/sdk]
2.2.103 [/usr/local/share/dotnet/sdk]

@mvelosop
Copy link
Collaborator

Ok, try installing at least 2.2.201, that's the one I'm using now.

@richard-ashby
Copy link
Author

The latest download I can find is for SDK 2.2.105 - are you running a dev build?

@richard-ashby
Copy link
Author

Hi @mvelosop

Problem solved on both macOS and Windows 10!
I rather belatedly followed your instructions in Wiki 06 - Setting-the-Web-SPA-application-up, specifically the need to run the following under the eShopOnContainers/src/Web/WebSPA folder prior to running docker-compose ...
npm install
npm run build:prod
Please note that I didn't need to add npm to the list of External Tools in VS2017 for Mac however I did do so in VS2017 on Windows.

Many thanks for your help.

@mvelosop
Copy link
Collaborator

Glad to know you could make it work @richard-ashby!

I was intrigued by the 2.2.201 SDK too, as it wasn't in my downloads folder! Upon some research I found out it was installed by VS 2019!

Cheers!

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

2 participants