-
Notifications
You must be signed in to change notification settings - Fork 161
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
Project created with net 8 template throws InvalidOperationException on first start #467
Comments
Hi. |
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. |
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 |
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:
to:
|
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. |
Bug type
Other
Component name
No response
What happened?
I created a new MudBlazor application using the template:
dotnet new mudblazor --auth Individual --int Server --all-interactive -o MudBlazorTest
Then opened the application in Visual Studio 2022 Community and hit run.
--> Execution stops in RemoteJSRuntime.BeginInvokeJS with InvalidOperationException. See screenshot attached.
Expected behavior
No exception thrown.
Reproduction link
https://github.com/petergolde/MudBlazorBugReport
Reproduction steps
Relevant log output
Version (bug)
6.16.0
Version (working)
No response
What browsers are you seeing the problem on?
Microsoft Edge
On what operating system are you experiencing the issue?
Windows
Pull Request
Code of Conduct
The text was updated successfully, but these errors were encountered: