Giter Site home page Giter Site logo

Comments (9)

ScarletKuro avatar ScarletKuro commented on June 12, 2024 1

Hopefully #454 will be merged soon, so it will work out of the box.

from templates.

ScarletKuro avatar ScarletKuro commented on June 12, 2024

@mikes-gh isn't the problem related because the template is using rc libs. I'm slightly surprised it went like this in prod

from templates.

mikes-gh avatar mikes-gh commented on June 12, 2024

I did ask for them to be updated :-(
But thats not the problem in this case cause I updated them to 8.0.1 and the problem remains
edit it is the problem

from templates.

mikes-gh avatar mikes-gh commented on June 12, 2024

@ScarletKuro You are right. After a clean and rebuild with 8.0.1 the issue is resolved

from templates.

JarFrank avatar JarFrank commented on June 12, 2024

I had to also clean obj and bin folders

from templates.

marceloperegil avatar marceloperegil commented on June 12, 2024

#453 (comment)
This worked for me.

from templates.

philipp-koch avatar philipp-koch commented on June 12, 2024

I am seeing the same error as initially described. Cleaning and rebuilding does not fix it for me. Also, I see it in every single, freshly created MudBlazor project. Here's what I did:

  • In Visual Studio, I create a new project using the template "MudBlazor Web App (MudBlazor)", with .NET 8.0, no authentication and interactive render mode "Auto (Server and WebAssembly)", globally set:
    grafik

Once it's created, I change nothing at all and start debugging (F5):

  • After the first loading, it works: hiding/showing the sidebar, switching over to the counter page, increasing count by clicking the button.
  • As soon as I reload or start the second debugging session (or each time after that), there's no interactivity any more (clicking the three-bars-symbol to hide the sidebar does nothing, neither does clicking the counter button), and a JSON error appears in the console:

grafik
(Also, the CSS file gets a 404 now).

  • Clicking the sidebar link "Counter" shows a lot of errors in the console:
    grafik

  • This happens across all the browsers I've tried: Firefox, Brave, Edge. I've tried this in Visual Studio 2022 (17.8.6) as well as VS Code 1.86.0 - it's exactly same everywhere: First run after creating the project is okay, second and every after that fails.

  • My installed .NET SDK is 8.0.101.

  • MudBlazor templates installed are the latest (0.6.5).

  • I'm using Windows 11 Pro (23H2).

To rule out a configuration problem, I have uninstalled .NET entirely and made a clean install. I did the same with Visual Studio (removed completely and did a clean install). It changed nothing. I've used MudBlazor with .NET 6 and never experienced any problems like this.

Also, when using the "original" Blazor Web App template that comes with Visual Studio, applying the same settings as above, it works without a problem, no matter how often I reload / restart. The same goes for the Fluent UI template: It works both server side as well as after the switch to client side - so clearly, there's an issue with MudBlazor somehow...

My impression is that something goes/is wrong with the way WebAssembly render mode is configured/hooked in (since the problem occurs after the first reload, i.e. after the switch from server side to client side. Sadly, I cound't figure out what "the other" templates (the "original" one or Fluent UI) do differently regarding this...

I do think that MudBlazor is fantastic, and I'd really, really love to use this rather than Bootstrap (oiriginal template) or Fluent UI. So - how could this problem best be tackled?

Thanks to everybody investing tehir time to work on MudBlazor and to help other people!

from templates.

ScarletKuro avatar ScarletKuro commented on June 12, 2024

@philipp-koch have you updated the underlying libraries (Microsoft.AspNetCore.Components.WebAssembly.Server, Microsoft.AspNetCore.Components.WebAssembly and all other MS libraries) to 8.0.1 as the issue suggests? Then clear obj / bin / .vs(hidden) folders, clean browser cache etc.

from templates.

philipp-koch avatar philipp-koch commented on June 12, 2024

@ScarletKuro Thank you for pointing this out so clearly - I was mistaken, thinking "8.0.1" referred to the installed .NET SDK! So, I've taken a look at the NuGet package manager, and indeed the mentioned packages were still the RC versions, not 8.0.1. I have updated them, performed clean and rebuild for the solution, cleared the browser cache - and voilà, it works now! So, in other words: "Amazing, just do it right and all of a sudden it works!" (Kaum macht man's richtig, schon funktioniert's...) 🤣

I'm a little embarassed now, but more importantly, I'm really happy this could be solved (so easily)...

Thanks for your quick and helpful reply!

from templates.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.