Korthax / BlazorSplitGrid

MIT License
3 stars 2 forks source link

Error on BlazorWebAssembly application when is published and runing on IIS #5

Open aurelian87 opened 5 months ago

aurelian87 commented 5 months ago

I have the following error when my BlazorWebAssembly application is published and running on IIS:

crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: ConstructorContainsNullParameterNames, BlazorSplitGrid.Models.Track SerializationNotSupportedParentType, System.Object Path: $. System.NotSupportedException: ConstructorContainsNullParameterNames, BlazorSplitGrid.Models.Track SerializationNotSupportedParentType, System.Object Path: $. ---> System.NotSupportedException: ConstructorContainsNullParameterNames, BlazorSplitGrid.Models.Track at System.Text.Json.ThrowHelper.ThrowNotSupportedException_ConstructorContainsNullParameterNames(Type ) at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.PopulateParameterInfoValues(JsonTypeInfo ) at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.CreateTypeInfoCore(Type , JsonConverter , JsonSerializerOptions ) at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.CreateJsonTypeInfo(Type , JsonSerializerOptions ) at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.GetTypeInfo(Type , JsonSerializerOptions ) at System.Text.Json.JsonSerializerOptions.GetTypeInfoNoCaching(Type ) at System.Text.Json.JsonSerializerOptions.CachingContext.CreateCacheEntry(Type type, CachingContext context) --- End of stack trace from previous location --- at System.Text.Json.JsonSerializerOptions.CachingContext.CacheEntry.GetResult() at System.Text.Json.JsonSerializerOptions.CachingContext.GetOrAddTypeInfo(Type , Boolean ) at System.Text.Json.JsonSerializerOptions.GetTypeInfoInternal(Type , Boolean , Nullable1 , Boolean , Boolean ) at System.Text.Json.Serialization.Metadata.JsonTypeInfo.Configure() at System.Text.Json.Serialization.Metadata.JsonTypeInfo.<EnsureConfigured>g__ConfigureSynchronized|172_0() at System.Text.Json.Serialization.Metadata.JsonTypeInfo.EnsureConfigured() at System.Text.Json.JsonSerializerOptions.GetTypeInfoInternal(Type , Boolean , Nullable1 , Boolean , Boolean ) at System.Text.Json.WriteStackFrame.InitializePolymorphicReEntry(Type , JsonSerializerOptions ) at System.Text.Json.Serialization.JsonConverter.ResolvePolymorphicConverter(Object , JsonTypeInfo , JsonSerializerOptions , WriteStack& ) at System.Text.Json.Serialization.JsonConverter1[[System.Object, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TryWrite(Utf8JsonWriter , Object& , JsonSerializerOptions , WriteStack& ) at System.Text.Json.Serialization.Converters.ArrayConverter2[[System.Object[], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].OnWriteResume(Utf8JsonWriter , Object[] , JsonSerializerOptions , WriteStack& ) at System.Text.Json.Serialization.JsonCollectionConverter2[[System.Object[], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].OnTryWrite(Utf8JsonWriter , Object[] , JsonSerializerOptions , WriteStack& ) at System.Text.Json.Serialization.JsonConverter1[[System.Object[], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TryWrite(Utf8JsonWriter , Object[]& , JsonSerializerOptions , WriteStack& ) at System.Text.Json.Serialization.JsonConverter1[[System.Object[], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].WriteCore(Utf8JsonWriter , Object[]& , JsonSerializerOptions , WriteStack& ) Exception_EndOfInnerExceptionStack at System.Text.Json.ThrowHelper.ThrowNotSupportedException(WriteStack& , NotSupportedException ) at System.Text.Json.Serialization.JsonConverter1[[System.Object[], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].WriteCore(Utf8JsonWriter , Object[]& , JsonSerializerOptions , WriteStack& ) at System.Text.Json.Serialization.Metadata.JsonTypeInfo1[[System.Object[], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Serialize(Utf8JsonWriter , Object[]& , Object ) at System.Text.Json.JsonSerializer.WriteString[Object[]](Object[]& , JsonTypeInfo1 ) at System.Text.Json.JsonSerializer.Serialize[Object[]](Object[] , JsonSerializerOptions ) at Microsoft.JSInterop.JSRuntime.InvokeAsync[IJSObjectReference](Int64 , String , CancellationToken , Object[] ) at Microsoft.JSInterop.JSRuntime.d__161[[Microsoft.JSInterop.IJSObjectReference, Microsoft.JSInterop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext() at BlazorSplitGrid.Interop.SplitGridInterop.Initialise(IEnumerable1 rowGutters, IEnumerable`1 columnGutters, SplitGridOptions options) at BlazorSplitGrid.Elements.Grid.Initialise(ISplitGridInterop ) at BlazorSplitGrid.SplitGrid.Initialise() at BlazorSplitGrid.SplitGrid.OnAfterRenderAsync(Boolean firstRender) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task , ComponentState )

On the development mode everything is ok. Did someone run in to the same problem and how did you solved it?

Korthax commented 3 months ago

Unfortunately I've not had much spare time to investigate this fully. Looking at the error I believe its an issue around trimming code on publish.