OYIon / LiveSharp

Public repository for the LiveSharp project
96 stars 4 forks source link

Field title not found on type ValueTuple`4 #60

Open yq0810 opened 4 years ago

yq0810 commented 4 years ago

https://github.com/skclusive/Skclusive.Blazor.Samples

Some will be hot updated, but most of them will not be updated. Some refresh pages will have errors as follows, and components are almost not updated when using parameters

An unhandled exception occurred while processing the request.
Exception: Field title not found on type ValueTuple`4
LiveSharp.Runtime.ExpressionDeserializer.DeserializeFieldInfo(object[] children)

DeserializationException: Deserialization failed for:
<FieldInfo>
<Type Assembly="System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<S>System</S>
<S>ValueTuple`4</S>
<Type Assembly="System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<S>System</S>
<S>String</S>
</Type>
<Type Assembly="System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<S>System</S>
<S>Int32</S>
</Type>
<Type Assembly="System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<S>System</S>
<S>String</S>
</Type>
<Type Assembly="Microsoft.AspNetCore.Components, Version=3.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60">
<S>Microsoft.AspNetCore.Components</S>
<S>RenderFragment</S>
</Type>
</Type>
<S>title</S>
<Type Assembly="System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<S>System</S>
<S>String</S>
</Type>
</FieldInfo>
LiveSharp.Runtime.ExpressionDeserializer.Deserialize(XNode node, Scope scope)

Stack Query Cookies Headers Routing
Exception: Field title not found on type ValueTuple`4
LiveSharp.Runtime.ExpressionDeserializer.DeserializeFieldInfo(object[] children)
LiveSharp.Runtime.ExpressionDeserializer.Deserialize(XNode node, Scope scope)

Show raw exception details
DeserializationException: Deserialization failed for: <FieldInfo> <Type Assembly="System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <S>System</S> <S>ValueTuple`4</S> <Type Assembly="System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <S>System</S> <S>String</S> </Type> <Type Assembly="System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <S>System</S> <S>Int32</S> </Type> <Type Assembly="System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <S>System</S> <S>String</S> </Type> <Type Assembly="Microsoft.AspNetCore.Components, Version=3.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60"> <S>Microsoft.AspNetCore.Components</S> <S>RenderFragment</S> </Type> </Type> <S>title</S> <Type Assembly="System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <S>System</S> <S>String</S> </Type> </FieldInfo>
LiveSharp.Runtime.ExpressionDeserializer.Deserialize(XNode node, Scope scope)
LiveSharp.Runtime.ExpressionDeserializer+<>c__DisplayClass15_0.<Deserialize>b__0(XNode n)
System.Linq.Enumerable+SelectArrayIterator<TSource, TResult>.ToArray()
System.Linq.Enumerable.ToArray<TSource>(IEnumerable<TSource> source)
LiveSharp.Runtime.ExpressionDeserializer.Deserialize(XNode node, Scope scope)
LiveSharp.Runtime.ExpressionDeserializer+<>c__DisplayClass15_0.<Deserialize>b__0(XNode n)
System.Linq.Enumerable+SelectArrayIterator<TSource, TResult>.ToArray()
System.Linq.Enumerable.ToArray<TSource>(IEnumerable<TSource> source)
LiveSharp.Runtime.ExpressionDeserializer.Deserialize(XNode node, Scope scope)
LiveSharp.Runtime.ExpressionDeserializer+<>c__DisplayClass15_0.<Deserialize>b__0(XNode n)
System.Linq.Enumerable+SelectArrayIterator<TSource, TResult>.ToArray()
System.Linq.Enumerable.ToArray<TSource>(IEnumerable<TSource> source)
LiveSharp.Runtime.ExpressionDeserializer.Deserialize(XNode node, Scope scope)
LiveSharp.Runtime.ExpressionDeserializer+<>c__DisplayClass15_0.<Deserialize>b__3(XNode n)
System.Linq.Enumerable+SelectListPartitionIterator<TSource, TResult>.MoveNext()
System.Linq.Enumerable.CastIterator<TResult>(IEnumerable source)+MoveNext()
System.Collections.Generic.LargeArrayBuilder<T>.AddRange(IEnumerable<T> items)
System.Collections.Generic.EnumerableHelpers.ToArray<T>(IEnumerable<T> source)
System.Linq.Enumerable.ToArray<TSource>(IEnumerable<TSource> source)
LiveSharp.Runtime.ExpressionDeserializer.Deserialize(XNode node, Scope scope)
LiveSharp.Runtime.ExpressionDeserializer+<>c__DisplayClass15_0.<Deserialize>b__0(XNode n)
System.Linq.Enumerable+SelectArrayIterator<TSource, TResult>.ToArray()
System.Linq.Enumerable.ToArray<TSource>(IEnumerable<TSource> source)
LiveSharp.Runtime.ExpressionDeserializer.Deserialize(XNode node, Scope scope)
LiveSharp.Runtime.ExpressionDeserializer+<>c__DisplayClass15_0.<Deserialize>b__3(XNode n)
System.Linq.Enumerable+SelectListPartitionIterator<TSource, TResult>.MoveNext()
System.Linq.Enumerable.CastIterator<TResult>(IEnumerable source)+MoveNext()
System.Collections.Generic.LargeArrayBuilder<T>.AddRange(IEnumerable<T> items)
System.Collections.Generic.EnumerableHelpers.ToArray<T>(IEnumerable<T> source)
System.Linq.Enumerable.ToArray<TSource>(IEnumerable<TSource> source)
LiveSharp.Runtime.ExpressionDeserializer.Deserialize(XNode node, Scope scope)
LiveSharp.Runtime.ExpressionDeserializer.Deserialize(XNode node, Scope scope)
LiveSharp.Runtime.ExpressionDeserializer+<>c__DisplayClass15_0.<Deserialize>b__0(XNode n)
System.Linq.Enumerable+SelectArrayIterator<TSource, TResult>.ToArray()
System.Linq.Enumerable.ToArray<TSource>(IEnumerable<TSource> source)
LiveSharp.Runtime.ExpressionDeserializer.Deserialize(XNode node, Scope scope)
LiveSharp.Runtime.ExpressionDeserializer+<>c__DisplayClass15_0.<Deserialize>b__0(XNode n)
System.Linq.Enumerable+SelectArrayIterator<TSource, TResult>.ToArray()
System.Linq.Enumerable.ToArray<TSource>(IEnumerable<TSource> source)
LiveSharp.Runtime.ExpressionDeserializer.Deserialize(XNode node, Scope scope)
LiveSharp.Runtime.ExpressionDeserializer+<>c__DisplayClass15_0.<Deserialize>b__0(XNode n)
System.Linq.Enumerable+SelectArrayIterator<TSource, TResult>.ToArray()
System.Linq.Enumerable.ToArray<TSource>(IEnumerable<TSource> source)
LiveSharp.Runtime.ExpressionDeserializer.Deserialize(XNode node, Scope scope)
LiveSharp.Runtime.ExpressionDeserializer+<>c__DisplayClass15_0.<Deserialize>b__3(XNode n)
System.Linq.Enumerable+SelectListPartitionIterator<TSource, TResult>.MoveNext()
System.Linq.Enumerable.CastIterator<TResult>(IEnumerable source)+MoveNext()
System.Collections.Generic.LargeArrayBuilder<T>.AddRange(IEnumerable<T> items)
System.Collections.Generic.EnumerableHelpers.ToArray<T>(IEnumerable<T> source)
System.Linq.Enumerable.ToArray<TSource>(IEnumerable<TSource> source)
LiveSharp.Runtime.ExpressionDeserializer.Deserialize(XNode node, Scope scope)
LiveSharp.Runtime.ExpressionDeserializer.Deserialize(XNode node, Scope scope)
LiveSharp.Runtime.ExpressionDeserializer+<>c__DisplayClass15_0.<Deserialize>b__0(XNode n)
System.Linq.Enumerable+SelectArrayIterator<TSource, TResult>.ToArray()
System.Linq.Enumerable.ToArray<TSource>(IEnumerable<TSource> source)
LiveSharp.Runtime.ExpressionDeserializer.Deserialize(XNode node, Scope scope)
LiveSharp.Runtime.ExpressionDeserializer+<>c__DisplayClass15_0.<Deserialize>b__0(XNode n)
System.Linq.Enumerable+SelectArrayIterator<TSource, TResult>.ToArray()
System.Linq.Enumerable.ToArray<TSource>(IEnumerable<TSource> source)
LiveSharp.Runtime.ExpressionDeserializer.Deserialize(XNode node, Scope scope)
LiveSharp.Runtime.ExpressionDeserializer+<>c__DisplayClass15_0.<Deserialize>b__0(XNode n)
System.Linq.Enumerable+SelectArrayIterator<TSource, TResult>.ToArray()
System.Linq.Enumerable.ToArray<TSource>(IEnumerable<TSource> source)
LiveSharp.Runtime.ExpressionDeserializer.Deserialize(XNode node, Scope scope)
LiveSharp.Runtime.ExpressionDeserializer+<>c__DisplayClass15_0.<Deserialize>b__3(XNode n)
System.Linq.Enumerable+SelectListPartitionIterator<TSource, TResult>.MoveNext()
System.Linq.Enumerable.CastIterator<TResult>(IEnumerable source)+MoveNext()
System.Collections.Generic.LargeArrayBuilder<T>.AddRange(IEnumerable<T> items)
System.Collections.Generic.EnumerableHelpers.ToArray<T>(IEnumerable<T> source)
System.Linq.Enumerable.ToArray<TSource>(IEnumerable<TSource> source)
LiveSharp.Runtime.ExpressionDeserializer.Deserialize(XNode node, Scope scope)
LiveSharp.Runtime.ExpressionDeserializer.Deserialize(XNode node, Scope scope)
LiveSharp.Runtime.ExpressionDeserializer.GetExpression()
LiveSharp.Runtime.LiveSharpRuntime.GetExpressionFromBody(XElement methodBody, object thisInstance)
LiveSharp.Runtime.LiveSharpRuntime.GetCompiledDelegate(XElement methodBody, object thisInstance)
LiveSharp.Runtime.LiveSharpRuntime.ExecuteVoid(object methodBody, object thisInstance, int argCount, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8, object arg9, object arg10, object arg11)
Skclusive.Blazor.Dashboard.App.View.Home.UsersByDevice.BuildRenderTree(RenderTreeBuilder __builder)
Skclusive.Core.Component.PureComponentBase.<.ctor>b__5_0(RenderTreeBuilder builder)
Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
Microsoft.AspNetCore.Components.Rendering.HtmlRenderer.HandleException(Exception exception)
Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessPendingRender()
Microsoft.AspNetCore.Components.RenderTree.Renderer.AddToRenderQueue(int componentId, RenderFragment renderFragment)
Microsoft.AspNetCore.Components.ComponentBase.StateHasChanged()
Microsoft.AspNetCore.Components.ComponentBase.CallOnParametersSetAsync()
Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
Microsoft.AspNetCore.Components.Rendering.HtmlRenderer.HandleException(Exception exception)
Microsoft.AspNetCore.Components.RenderTree.Renderer.AddToPendingTasks(Task task)
Microsoft.AspNetCore.Components.Rendering.ComponentState.SetDirectParameters(ParameterView parameters)
Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderRootComponentAsync(int componentId, ParameterView initialParameters)
Microsoft.AspNetCore.Components.Rendering.HtmlRenderer.CreateInitialRenderAsync(Type componentType, ParameterView initialParameters)
Microsoft.AspNetCore.Components.Rendering.HtmlRenderer.RenderComponentAsync(Type componentType, ParameterView initialParameters)
Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext+<>c__11<TResult>+<<InvokeAsync>b__11_0>d.MoveNext()
Microsoft.AspNetCore.Mvc.ViewFeatures.StaticComponentRenderer.PrerenderComponentAsync(ParameterView parameters, HttpContext httpContext, Type componentType)
Microsoft.AspNetCore.Mvc.ViewFeatures.ComponentRenderer.PrerenderedServerComponentAsync(HttpContext context, ServerComponentInvocationSequence invocationId, Type type, ParameterView parametersCollection)
Microsoft.AspNetCore.Mvc.ViewFeatures.ComponentRenderer.RenderComponentAsync(ViewContext viewContext, Type componentType, RenderMode renderMode, object parameters)
Microsoft.AspNetCore.Mvc.TagHelpers.ComponentTagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output)
Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<RunAsync>g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, int i, int count)
Skclusive.Blazor.Dashboard.ServerPrerendered.Host.Pages.Pages__Host.<ExecuteAsync>b__11_1() in _Host.cshtml
+
        <component type="typeof(Skclusive.Blazor.Dashboard.App.View.DashboardView)" render-mode="ServerPrerendered" />
Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.SetOutputContentAsync()
Skclusive.Blazor.Dashboard.ServerPrerendered.Host.Pages.Pages__Host.ExecuteAsync() in _Host.cshtml
+
    Layout = null;
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, bool invokeViewStarts)
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, string contentType, Nullable<int> statusCode)
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, string contentType, Nullable<int> statusCode)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|29_0<TFilter, TFilterAsync>(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext<TFilter, TFilterAsync>(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

Show raw exception details
ionoy commented 4 years ago

Hello @yq0810

Thank you for the provided sample. I'm currently working on a solution to this.

Mihhail

ionoy commented 4 years ago

I have released a beta of new LiveSharp that should resolve this and many other issues. Please try it and see if it fixes your issue.

Server: https://github.com/OYIon/LiveSharp/releases/tag/1.5-beta NuGet: https://www.nuget.org/packages/LiveSharp/ (make sure to install prerelease version)

Thanks!