mrpmorris / Fluxor

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

Store initialization error when hosted app deployed in Azure #341

Closed rilo84 closed 1 year ago

rilo84 commented 1 year ago

I have a blazor hosted project with several clients that have their own fluxor stores and a shared project that is referenced by the clients and holds the fluxor packages and some shared state. Locally this works great but when deploying to Azure I get the below error when running the app:

Unhandled exception rendering component: Store initialization error Fluxor.Exceptions.StoreInitializationException: Store initialization error ---> Newtonsoft.Json.JsonSerializationException: A member with the name '' already exists on 'Microsoft.AspNetCore.Components.RenderFragment'. Use the JsonPropertyAttribute to specify another name.

Is this a bug or am I missing some configuration?

Thanks in advance!

mrpmorris commented 1 year ago

Looks to me like you are doing two things 1: Storing a RenderFragment in your store or action 2: Either converting state to JSON, or using ReduxDevTools

Am I correct?

rilo84 commented 1 year ago

You are correct I was using ReduxDevTools and after removing it is working again, thanks!

mrpmorris commented 1 year ago

Please read item number 1 for advice on using ReduxDevTools - https://github.com/mrpmorris/Fluxor/tree/master/Source/Tutorials/02-Blazor/02D-ReduxDevToolsTutorial