New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blazor (Server Side) displays blank page #1411

Closed
samuelcavendish opened this Issue Sep 12, 2018 · 9 comments

Comments

Projects
None yet
4 participants
@samuelcavendish
Copy link

samuelcavendish commented Sep 12, 2018

I've seen similar issues for older versions, but I think this is a different one since it only seems to affect the server side project, the client side project seems to work correctly.

I followed the setup instructions from https://blazor.net/docs/get-started.html
VS version 15.8.2
dotnet version 2.1.402

When clicking new project & selecting the server side project it shows the loading screen and then a blank page. There are no errors in the console.

I had to make just 1 change other than the File -> New Project. Once the project was created, I went into the Server project Properties -> Debug -> Enable SSL. This was to get rid of the error in chrome about the site can't provide a secure connection.

@SteveSandersonMS

This comment has been minimized.

Copy link
Member

SteveSandersonMS commented Sep 13, 2018

We've recently fixed some issues with VS15.8, so it's likely your issue will go away as part of the 0.6.0 release. In the meantime with 0.5.1 I'd recommend using VS15.7.

Since the first opportunity we have to make further changes is the 0.6.0 release, and since we'll certainly verify the VS15.8+.NET Core 2.1.4xx combo as part of 0.6.0 verification, I might as well close this (any action it prompts is action we're going to take anyway).

If for some reason you think your issue might be more unique in any way, please let us know so we can reopen. Thanks for reporting it!

@danroth27

This comment has been minimized.

Copy link
Member

danroth27 commented Sep 14, 2018

@samuelcavendish You may be hitting the issue with the global.json file that we include in the project templates. It pins the SDK version to 2.1.3xx. If you don't have a .NET Core SDK installed with that specific version range then the project may fail to load or run. Can you try either removing the global.json file or installing .NET Core SDK version 2.1.302 and see if that helps?

@samuelcavendish

This comment has been minimized.

Copy link
Author

samuelcavendish commented Sep 17, 2018

@danroth27, removing the global.json didn't make any difference, however, installing the 2.1.302 version fixed it. Thanks!

@danroth27

This comment has been minimized.

Copy link
Member

danroth27 commented Sep 17, 2018

@samuelcavendish Before installing 2.1.302 did you have any other .NET Core SDK versions installed in the 2.1.3xx range? Can you share with us the output of dotnet --info?

@danroth27

This comment has been minimized.

Copy link
Member

danroth27 commented Sep 17, 2018

I'm trying figure out how you even got past the project creation step. If you don't have a .NET Core SDK version installed that satisfies the constraint in the global.json file then typically get an empty solution.

@samuelcavendish

This comment has been minimized.

Copy link
Author

samuelcavendish commented Sep 18, 2018

@danroth27 it looks like I had a preview version: 2.1.300-preview1-008174

@danroth27

This comment has been minimized.

Copy link
Member

danroth27 commented Sep 18, 2018

Ah, ok, makes sense.

@netbitshift

This comment has been minimized.

Copy link

netbitshift commented Dec 18, 2018

Im having a similar problem trying to convert the FlightFinder example over to server-side.
After doing these:

  • Index.html , change reference from _framework/blazor.webassembly.js to _framework/blazor.server.js
  • In FlightFinder.Server Startup.cs,
    in ConfigureServices, add services.AddServerSideBlazor<Client.Startup>();
    in Configure method, replace call to app.UserBlazor, with app.UseServerSideBlazor<Client.Startup>();

I can build a server-side Blazor project starting form the templates and it runs fine. Just not sure about converting.

However, everything builds fine, but when the browser loads, i just get a blank screen, with no error messages. The dev console indicates that the websocket plumbing seems to be working ok.
What can I check?

Maybe I'll start with a client-side app i build myself and convert that.

VS 2017, build version 15.9.3

My .net core versions are:


.NET Core SDK (reflecting any global.json):
 Version:   2.2.100
 Commit:    b9f2fa0ca8

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.17134
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.2.100\

Host (useful for support):
  Version: 2.2.0
  Commit:  1249f08fed

.NET Core SDKs installed:
  1.0.4 [C:\Program Files\dotnet\sdk]
  1.1.0 [C:\Program Files\dotnet\sdk]
  2.0.2 [C:\Program Files\dotnet\sdk]
  2.1.2 [C:\Program Files\dotnet\sdk]
  2.1.4 [C:\Program Files\dotnet\sdk]
  2.1.103 [C:\Program Files\dotnet\sdk]
  2.1.201 [C:\Program Files\dotnet\sdk]
  2.1.202 [C:\Program Files\dotnet\sdk]
  2.1.300 [C:\Program Files\dotnet\sdk]
  2.1.403 [C:\Program Files\dotnet\sdk]
  2.1.500 [C:\Program Files\dotnet\sdk]
  2.2.100 [C:\Program Files\dotnet\sdk]

Was following the same sort of steps here
https://blog.jonblankenship.com/2018/11/02/experiences-converting-from-client-side-to-server-side-blazor/

@netbitshift

This comment has been minimized.

Copy link

netbitshift commented Dec 18, 2018

Yep, just confirmed for myself. Created a new client-side project , converted to server-side, ran fine. Confirmed it was using websockets and no mono or webassembly downloads. Ill post over on the FlightFinder github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment