-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
JSException in WebAssemblyRenderer #21874
Comments
@hultqvist thanks for contacting us. That typically means the error is being thrown while processing the view code, or when you've modified the DOM with JS and it has gotten out of sync from the representation in Blazor. Can you provide a minimal repro project that showcases the issue? |
My suggestion is about making the error message more verbose so that I can start tracking down the error without bisecting the whole app. The component being removed did contain an element with contenteditable that was only modified using JS, the blazor model sees it as a constant html string. |
I traced the error back to whether an There was two methods to close the component.
Both these were calling the same The error showed up when
The error wouldn't show up when
I then tried to change the outside element to trigger on I narrowed it down to a the
|
#21936 is an example I came up with trying to create an example of this bug. |
Thanks @hultqvist. |
I've tried but so far my attempts to copy the relevant parts doesn't trigger the error. My wish with this feature request is to have some way to dig deeper into the error message. |
This is the workaround we're using right now. We have a hidden input element in the document. |
@hultqvist unfortunately we can't investigate this without a small repro project. Things which can be at play in your situation, is potentially a JS library you use, which manipulates the DOM behind the scene. This is simply an idea, not a statement. |
Here is a repro tested in Blazor 3.2.0 Code
Console Error message
|
This is a dupe of #21241 |
Is your feature request related to a problem? Please describe.
When I'm closing a dialog thus unloading components I'm receiving the error.
This cause the bottom error bar to show up and the error below is shown on the console.
The underlying cause for this error to trigger could very likely be from some code of mine.
Problem is that the error message doesn't let me know where to look.
Describe the solution you'd like
I would like the error message to contain information about what part of the whole document RenderTree was being processed when the error occurred.
The text was updated successfully, but these errors were encountered: