Giter VIP home page Giter VIP logo

Comments (5)

ScarletKuro avatar ScarletKuro commented on July 30, 2024

Hi.
Weird, but I cloned your project, started it and not errors, as well navigated all pages but still no errors.
Visual Studio Enterprise v17.8.3
Would be also nice if you could show "call stack".
In addition update the libraries just in case to the latest
libs
the -rc libraries have some bugs (#453 (comment))

from templates.

petergolde avatar petergolde commented on July 30, 2024

It must have something to do with my Debug options. If I unchecked that "Break when this exception type is unhandled", then it continues and runs ok. After unchecking that, I can't get it to reproduce again.

Looking at the call stack, it seems like this is a sort-of expected exception to happen with JS interop during pre-rendering. It seems to me it would be better to somehow detect the pre-rendering and not do the JS interop at all, but I suppose its OK the way it is.

It is not clear to me why my Visual Studio thought the exception was unhandled. Strange.

I guess it is fine to close this, but it was a bad first impression for me with MudBlazor.

from templates.

ScarletKuro avatar ScarletKuro commented on July 30, 2024

I'm not sure if it comes from our code or not, but Microsoft doesn't have any public API to identify what rendering mode is used, nor there is API to understand if the JsRuntime is available. You can understand it in a razor component (after the OnAfterRenderAsync lifecycle, and in our code we call JS in component when its available), but not in a service if it's using JS. There are also JS errors when circuit breaks JSDisconnectedException, TaskCanceledException and all we can do is to suppress those errors.

from templates.

erbatista avatar erbatista commented on July 30, 2024

I had a similar error with WebAssembly interactivity setup, and it went away by explicitly defining the MudBlazor version, and also make sure you're targeting the latest version of the .Net Core. In short, my project file went from:

   <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0-rc.2.23480.2" />
   <PackageReference Include="MudBlazor" Version="6.*" />

to:

  <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.2" />
  <PackageReference Include="MudBlazor" Version="6.17.0" />

from templates.

jperson2000 avatar jperson2000 commented on July 30, 2024

Hi everyone, I am working on upgrading the templates for MudBlazor 7.0.0 in this PR: #465. I haven't seen this error but I will test this project type for you.

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.