Skip to content
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

Blazor Custom Elements not rendering as/when expected #40318

Closed
1 task done
efonsecab opened this issue Feb 19, 2022 · 5 comments
Closed
1 task done

Blazor Custom Elements not rendering as/when expected #40318

efonsecab opened this issue Feb 19, 2022 · 5 comments
Labels
area-blazor Includes: Blazor, Razor Components feature-js-root-components Issues related to JS root components ✔️ Resolution: Duplicate Resolved as a duplicate of another issue investigate Status: Resolved

Comments

@efonsecab
Copy link

efonsecab commented Feb 19, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I have been testing the usage of Blazor Custom Elements inside an Angular App, which I understand is currently in an experimental phase.
I found a strange behavior of the component not rendering on the first load of the page, just after I navigate to other page and back.
Some of the errors were partially fixed by using LongPolling Transport, however, the value of the component's parameter keeps being null until you navigate away and back.

Expected Behavior

Render the component on the first page load

Steps To Reproduce

  • Create an ASP NET Core With Angular App using the Visual Studio template
  • Enable Blazor Server and map the Blazor Server Hub
  • Follow the steps to add Blazor Custom Elements
  • Create a folder BlazorComponents and create a blazor component inside it
  • Configure the Angular app custom schemas
  • Use the blazor component registered tag in the home.html file

You can use this repo for reference: https://github.com/efonsecab/AngularWithBlazor

Exceptions (if any)

Initially I was getting an exception stating there was an error with WebSockets.

.NET Version

6.0.200

Anything else?

Not sure if this is expected, but the fetch seems to stay stuck on pending.

image

@pranavkm pranavkm added the area-blazor Includes: Blazor, Razor Components label Feb 20, 2022
@javiercn javiercn added the feature-js-root-components Issues related to JS root components label Feb 21, 2022
@SteveSandersonMS
Copy link
Member

Initially I was getting an exception stating there was an error with WebSockets.

Could you let us know what this error was?

@SteveSandersonMS SteveSandersonMS added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Feb 21, 2022
@ghost
Copy link

ghost commented Feb 21, 2022

Hi @efonsecab. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@efonsecab
Copy link
Author

efonsecab commented Feb 21, 2022

Initially I was getting an exception stating there was an error with WebSockets.

Could you let us know what this error was?

Hello @SteveSandersonMS, sure, this was the initial error.
The component did not render at all, and after some minutes of the app just doing nothing, the error in the image appears, interestingly after that error happens the component renders, but still with the component's parameters in null.
That's why I temporarily tried to check using LongPolling to see if it would fix the issues, which it kind of did, except for the fact of having to navigate out and back to see the component's parameters rendered.

image

@ghost ghost added Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. and removed Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. labels Feb 21, 2022
@mkArtakMSFT mkArtakMSFT added investigate and removed Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. labels Feb 22, 2022
@mkArtakMSFT mkArtakMSFT added this to the .NET 7 Planning milestone Feb 22, 2022
@ghost
Copy link

ghost commented Feb 22, 2022

Thanks for contacting us.
We're moving this issue to the .NET 7 Planning milestone for future evaluation / consideration. Because it's not immediately obvious that this is a bug in our framework, we would like to keep this around to collect more feedback, which can later help us determine the impact of it. 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
Copy link
Member

We're going to address this as part of #38447 work.

@mkArtakMSFT mkArtakMSFT added the ✔️ Resolution: Duplicate Resolved as a duplicate of another issue label Mar 30, 2022
@ghost ghost added the Status: Resolved label Mar 30, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Apr 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components feature-js-root-components Issues related to JS root components ✔️ Resolution: Duplicate Resolved as a duplicate of another issue investigate Status: Resolved
Projects
None yet
Development

No branches or pull requests

5 participants