-
Notifications
You must be signed in to change notification settings - Fork 363
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
Critical error on new blank Project from Fluent-Template #2476
Comments
Did you add this command to register all required services? builder.Services.AddFluentUIComponents(); |
Yes its in the Code, checked it twice, even when its directly from the Template. |
I can replicate this issue with the steps above. Just a vanilla Fluent app with configuration provided above. Crashes for me on the register page with same issue. |
Can you verify that you are using the latest version of the template? I tried to reproduce this problem, no success :-( FluentUI.Template.mp4Do you have a git repository with your project where this issue is occurring? |
Yes, I tried it with latest template 4.9.3 |
@dvoituron https://github.com/MarvinKlein1508/FluentUI-Issue2476 SImply run the project. After a few seconds I get:
|
Many thanks for your sample. You can add this line var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.Services.AddAuthorizationCore();
builder.Services.AddCascadingAuthenticationState();
builder.Services.AddSingleton<AuthenticationStateProvider, PersistentAuthenticationStateProvider>();
builder.Services.AddFluentUIComponents(); // 👈
await builder.Build().RunAsync(); |
Looks like this fixed it. Thank you for your help on this. |
I had the same issue in my Blazor unit tests, using bUnit framework.
Of course, you can do it with |
I am running into exactly this issue using templates version 4.10.2. |
No, the missing |
@paleocomburo have you run |
@MarvinKlein1508 I installed the templates for the very first time today. Never used them. |
🐛 Bug Report
Hi.
I created a new Fluent-Blazor-WebApp. The settings are: IndivitualAccounts, https, InteractiveRendermode: Auto and Interactivity location per page/component. It runs out of the box (after apply the default db-migration) but when i hit F5 after the project runs and shows the page in browser the Error (described below) shows up.
💻 Repro or Code Sample
Just a new FluentUI-Blazor-Webapp with the settings described above.
🤔 Expected Behavior
Just run wihout errors because its a new App.
😯 Current Behavior
The page displays:
When i take a closer look to the browserconsole it shows me the following:
blazor.web.js:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Cannot provide a value for property 'LibraryConfiguration' on type 'Microsoft.FluentUI.AspNetCore.Components.FluentKeyCode'. There is no registered service of type 'Microsoft.FluentUI.AspNetCore.Components.LibraryConfiguration'. System.InvalidOperationException: Cannot provide a value for property 'LibraryConfiguration' on type 'Microsoft.FluentUI.AspNetCore.Components.FluentKeyCode'. There is no registered service of type 'Microsoft.FluentUI.AspNetCore.Components.LibraryConfiguration'. at Microsoft.AspNetCore.Components.ComponentFactory.<>c__DisplayClass9_0.<CreatePropertyInjector>g__Initialize|1(IServiceProvider serviceProvider, IComponent component) at Microsoft.AspNetCore.Components.ComponentFactory.InstantiateComponent(IServiceProvider serviceProvider, Type componentType, IComponentRenderMode callerSpecifiedRenderMode, Nullable
1 parentComponentId)at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateChildComponentOnFrame(RenderTreeFrame[] frames, Int32 frameIndex, Int32 parentComponentId)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewComponentFrame(DiffContext& diffContext, Int32 frameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(DiffContext& diffContext, Int32 frameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRange
1 oldTree, ArrayRange
1 newTree)at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
`
🌍 Your Environment
Host: Version: 8.0.7 Architecture: x64 Commit: 2aade6beb0
If you need more informations, feel free to ask.
regards
DeepX
The text was updated successfully, but these errors were encountered: