Open hannespreishuber opened 1 year ago
The component in render mode WebAssembly is not instantiated on the server. Hence the error when trying to catch a component reference - it is a placeholder object. (Added)
The server has no knowledge about the actual state of the component running in the browser with WebAssembly.
For them both to know about each other would require a connection between Server and Client.
You can however communicate between components that are in the WebAssembly context since they , usually, are in the same app. (Added)
Thanks for contacting us. @marinasundstrom is right about the communication aspect of this bug. We are, however, going to keep this issue as a bug to track improving the error message so that it's easier to understand what's happening.
Thanks for contacting us.
We're moving this issue to the .NET 9 Planning
milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.
I have added some details to my response. Further explaining the reason for the error.
I agree that the error message can be improved.
this is just the using effect. I was expecting a failure. But what happens about Autorendermode with statemanagment or parameter accross WASM/Server borders. There is no approach for that!?
Thanks for contacting us.
We're moving this issue to the .NET 9 Planning
milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.
@mkArtakMSFT Does this issue need to move to dotnet/razor?
Is there an existing issue for this?
Describe the bug
Just done a simple test to get how the things are working
new template
and
Expected Behavior
see the counter value
my intention was to use server side and embed a WASM part and how to communicate between the components
Steps To Reproduce
No response
Exceptions (if any)
System.InvalidCastException: Unable to cast object of type 'Microsoft.AspNetCore.Components.Endpoints.SSRRenderModeBoundary' to type 'BlazorApp8.Client.Pages.Counter'.
.NET Version
8.0.100-rc.1.23455.8
Anything else?
No response