abpframework / abp

Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
https://abp.io
GNU Lesser General Public License v3.0
12.92k stars 3.45k forks source link

Unable to set property 'Clicked' on object of type 'Blazorise.Bootstrap5.Button'. The error was: Specified cast is not valid. ---> System.InvalidCastException: Specified cast is not valid. #14835

Closed sturlath closed 1 year ago

sturlath commented 1 year ago

Is there an existing issue for this?

Description

When trying to update a 6.0.1 version (community and commercial) with Blazorise 1.1.4.1 (and every version down to 1.0.6) throw the following exception when run

crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Unable to set property 'Clicked' on object of type 'Blazorise.Bootstrap5.Button'. The error was: Specified cast is not valid.
System.InvalidOperationException: Unable to set property 'Clicked' on object of type 'Blazorise.Bootstrap5.Button'. The error was: Specified cast is not valid.
 ---> System.InvalidCastException: Specified cast is not valid.
   at Microsoft.AspNetCore.Components.Reflection.PropertySetter.CallPropertySetter[Button,EventCallback`1](Action`2 setter, Object target, Object value)
   at Microsoft.AspNetCore.Components.Reflection.PropertySetter.SetValue(Object target, Object value)
   at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.<SetProperties>g__SetProperty|3_0(Object target, PropertySetter writer, String parameterName, Object value)
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.<SetProperties>g__SetProperty|3_0(Object target, PropertySetter writer, String parameterName, Object value)
   at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.SetProperties(ParameterView& parameters, Object target)
   at Microsoft.AspNetCore.Components.ParameterView.SetParameterProperties(Object target)
   at Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync(ParameterView parameters)
   at Blazorise.BaseComponent.SetParametersAsync(ParameterView parameters)
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.SupplyCombinedParameters(ParameterView directAndCascadingParameters)

There is no abp.io error in there so I have reported this to Blazorse here.

I have usually been able to update Blazorise out of band with the abp.io versions and would really like to be able to do that.

So is the problem your side or Blazorise?

Reproduction Steps

Update a 6.0.1 version to newest Blazorise version and see it fail.

Expected behavior

Be able to update Blazorise out-of-band to abp.io versions

Actual behavior

Error

Regression?

Yes, I was able to update before!

Known Workarounds

No response

Version

6.0.1

User Interface

Blazor

Database Provider

EF Core (Default)

Tiered or separate authentication server

Separate Auth Server

Operation System

Windows (Default)

Other information

No response

realLiangshiwei commented 1 year ago

Blazorise 1.1.4 will be available in ABP 7.0: https://github.com/abpframework/abp/issues/14833

sturlath commented 1 year ago

Yes, I know that but I was wondering why it wasn´t working updating to minor version of Blazorise out-of-band with abp.io versions like it has been possible before?

I understand major version that there might be some incompatibility but why don´t you make sure that we can take advantage of versions that e.g., fix memory issues etc. Let's say my subscription of abp would have ended with 6.0.1 I wouldn't have been able to fix major things like that without buying another license (good for you bad for me). Luckily that's not my issue atm.

So, why does apb.io need to brake and is it possible going forward to have this in mind?

realLiangshiwei commented 1 year ago

Yes, usually compatible.

ABP 6.0 and Blazorise 1.0 are based on NET 6.0. but start from Blazorise 1.1, it's based on NET7.0. this is a huge change : ). if there are some bugs we release a minor version to fix them, same for Blazorise.