Aspnetcore: New Blazor application (any type) hangs in browser with "Loading..." message

Created on 4 Nov 2020  路  9Comments  路  Source: dotnet/aspnetcore

_This issue has been moved from a ticket on Developer Community._


[severity:I'm unable to use this version of Visual Studio]

  1. Start-up Visual Studio 2019 Preview 4 (with .NET 5). This was the latest (.NET 5) preview release when I installed it on 16 October 2020.
  2. Create new Blazor (Client-side, without .NET Core hosting) project. Don't click any of the checkboxes. Leave all defaults unchanged. (I also at some point tried the Server-side Blazor project. That then also resulted in the same hanging problem.)
  3. Choose the file location and give names to the solution and project. Create the project.
  4. Wait for the solution and project to get created. Don't delete, change or create anything in the project or solution.
  5. Click on run, and see the browser (Edge) open (after the build seems to complete inside Visual Studio).
  6. Inside the Edge browser the browser page says "Loading...". The text stays there, seemingly forever. Nothing else happens inside the browser.

Of course this is wrong. It should complete loading the application and show the application contents, but it hangs there for at least 10 minutes that I left it there. My conclusion is the the application hangs.


Original Comments

Feedback Bot on 10/21/2020, 07:32 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

Aubrey Herman solved on 10/26/2020, 03:19 AM, 0 votes:

In short: The issue seems to go away after 'opening' the firewall. Initially there was no hint (and I did not think) about checking if the firewall is allowing access.

Explanation:

I downloaded version 16.8 preview 5, and it seemed to have the same problem. But then at some point when I was trying to run the application (PWA) from within Visual Studio, I (surprisingly for the very first time) got a message from my Windows Firewall that an application (Nodejs) was blocked and that I had to give permission for it to communicate over the network. After giving it this firewall permission, the problem went away.

Suggestion: when in development mode, after a timeout showing 'Loading...' in the browser, show a message to the developer (or some hint) to check the firewall!

Author area-blazor blazor-wasm feature-blazor-debugging

All 9 comments

Thanks for contacting us.
@captainsafia do we know whether this port-opening is expected? If I remember correctly, Firewall will pop up for any app asking to open any ports. Given that the Debugger does indeed try to open up a port, I think this is expected.

@mkArtakMSFT Yes, this is expected. The NodeJS process that is asking for the debugger is the vscode-js-debug adapter.

@guardrex Let's add a note about this in the docs.

@captainsafia ... This is such a fundamental problem it seems like it should be covered in the Get Started topic. Is that correct, or where do you want it covered?

@guardrex Yeah, I would propose adding a bullet under the debugging prerequisites section (e.g. "Ensure that no firewalls or proxies will block communication with the debug proxy") then a few sentences in the troubleshooting section about configuring the Windows Firewall.

That list is about browser versions, so that text won't compose well there. It will need to be it's own separate instruction. We can look at it on the PR shortly.

Sounds good! I'll close this issue in favor of the docs issue referenced above.

I think the problem is that you need the latest Edge Beta for Blazor .NET5 to work. It should work in Chrome/Firefox, which should prove it's not a firewall issue.

This is why I cannot upgrade my work project. I can't instruct customers to download beta apps.

I hope the compatible version of Edge will be released soon!

@mrpmorris Assuming I understood your report correctly, this seems unrelated to debugging. This issue only affects development instances of the app and shouldn't affect customers. If you've noticed something weird with Edge Beta and Blazor in production, please file a new issue so we can track it.

@captainsafia There isn't a problem with the latest beta. My problem is that if I want to use Net5 wasm I have to tell my clients to install Beta software, and as they are all large companies there is zero chance of that happening.

We really need a compatible version of Edge to be released to support Net5

Was this page helpful?
0 / 5 - 0 ratings