mrpmorris / Fluxor

Fluxor is a zero boilerplate Flux/Redux library for Microsoft .NET and Blazor.
MIT License
1.22k stars 139 forks source link

Can't locate issue #453

Closed djjohnson-net closed 2 months ago

djjohnson-net commented 9 months ago

I have been trying all day to figure out where this Fluxor error is coming from. Any help would be greatly appreciated.

[2023-09-21T20:01:27.518Z] Error: System.AggregateException: One or more errors occurred. (Value cannot be null. (Parameter 'source')) ---> System.ArgumentNullException: Value cannot be null. (Parameter 'source') at Fluxor.Blazor.Web.StoreInitializer.OnAfterRender(Boolean firstRender) in C:\Data\Mine\Code\Fluxor\Source\Lib\Fluxor.Blazor.Web\StoreInitializer.cs:line 57 at Microsoft.AspNetCore.Components.ComponentBase.Microsoft.AspNetCore.Components.IHandleAfterRender.OnAfterRenderAsync() at Microsoft.AspNetCore.Components.Rendering.ComponentState.NotifyRenderCompletedAsync() --- End of inner exception stack trace ---

mrpmorris commented 8 months ago

Try setting this attribute on StoreInitializer to catch unhandled exceptions.

https://github.com/mrpmorris/Fluxor/blob/master/Source/Lib/Fluxor.Blazor.Web/StoreInitializer.cs#L17

mrpmorris commented 4 months ago

I'll close this. Please let me know if I need to reopen it.

EzequielMoroni commented 2 months ago

I have been trying all day to figure out where this Fluxor error is coming from. Any help would be greatly appreciated.

[2023-09-21T20:01:27.518Z] Error: System.AggregateException: One or more errors occurred. (Value cannot be null. (Parameter 'source')) ---> System.ArgumentNullException: Value cannot be null. (Parameter 'source') at Fluxor.Blazor.Web.StoreInitializer.OnAfterRender(Boolean firstRender) in C:\Data\Mine\Code\Fluxor\Source\Lib\Fluxor.Blazor.Web\StoreInitializer.cs:line 57 at Microsoft.AspNetCore.Components.ComponentBase.Microsoft.AspNetCore.Components.IHandleAfterRender.OnAfterRenderAsync() at Microsoft.AspNetCore.Components.Rendering.ComponentState.NotifyRenderCompletedAsync() --- End of inner exception stack trace ---

I am getting the same error. Could you solve it? Thank you!

mrpmorris commented 2 months ago

Can you paste the stack trace in the exception please?

EzequielMoroni commented 2 months ago

Hi, yes, here's mine:

blazor.web.js:1 [2024-04-14T16:38:34.414Z] Error: System.AggregateException: One or more errors occurred. (Nullable object must have a value.) ---> System.InvalidOperationException: Nullable object must have a value. at Fluxor.Blazor.Web.StoreInitializer.OnAfterRender(Boolean firstRender) in C:\Data\Mine\Code\Fluxor\Source\Lib\Fluxor.Blazor.Web\StoreInitializer.cs:line 57 at Microsoft.AspNetCore.Components.ComponentBase.Microsoft.AspNetCore.Components.IHandleAfterRender.OnAfterRenderAsync() at Microsoft.AspNetCore.Components.Rendering.ComponentState.NotifyRenderCompletedAsync() --- End of inner exception stack trace ---

Thank you

EzequielMoroni commented 2 months ago

It seems that the issue was on our end. We were trying to access a variable when it wasn't loaded yet. Thank you