We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Getting Error Message on Tab Close

I have used Tab control with "ShowCloseButton=true".It works fine as per our requirement.but I am getting below error message when I close Tab.Please check this error and advise how to solve this issues.


Code:-


blazor.webassembly.js:1


       Uncaught (in promise) Error: System.Text.Json.JsonException: The JSON value could not be converted to System.Nullable`1[System.Int32]. Path: $ | LineNumber: 0 | BytePositionInLine: 5.

 ---> System.InvalidOperationException: Cannot get the value of a token type 'False' as a number.

   at System.Text.Json.Utf8JsonReader.TryGetInt32(Int32& value)

   at System.Text.Json.Utf8JsonReader.GetInt32()

   at System.Text.Json.Serialization.Converters.Int32Converter.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)

   at System.Text.Json.Serialization.Converters.NullableConverter`1[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)

   at System.Text.Json.Serialization.JsonConverter`1[[System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, Nullable`1& value)

   at System.Text.Json.Serialization.JsonConverter`1[[System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)

   --- End of inner exception stack trace ---

   at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, Utf8JsonReader& reader, Exception ex)

   at System.Text.Json.Serialization.JsonConverter`1[[System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)

   at System.Text.Json.Serialization.JsonConverter`1[[System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ReadCoreAsObject(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)

   at System.Text.Json.JsonSerializer.ReadCore[Object](JsonConverter jsonConverter, Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)

   at System.Text.Json.JsonSerializer.Read[Object](Utf8JsonReader& reader, JsonTypeInfo jsonTypeInfo)

   at System.Text.Json.JsonSerializer.Deserialize(Utf8JsonReader& reader, Type returnType, JsonSerializerOptions options)

   at Microsoft.JSInterop.Infrastructure.DotNetDispatcher.ParseArguments(JSRuntime jsRuntime, String methodIdentifier, String arguments, Type[] parameterTypes)

   at Microsoft.JSInterop.Infrastructure.DotNetDispatcher.InvokeSynchronously(JSRuntime jsRuntime, DotNetInvocationInfo& callInfo, IDotNetObjectReference objectReference, String argsJson)

   at Microsoft.JSInterop.Infrastructure.DotNetDispatcher.BeginInvokeDotNet(JSRuntime jsRuntime, DotNetInvocationInfo invocationInfo, String argsJson)


Note:-

This error occur after upgrading .Net 6.0 version



3 Replies

RV Ravikumar Venkatesan Syncfusion Team October 24, 2022 08:40 AM UTC

Hi KINS,


Greetings from Syncfusion support.


We have validated your query “Getting Error Message on Tab Close” at our end by preparing a sample with the ShowCloseButton property of the Tab to true. But, we are unable to reproduce the problem at our end. We have prepared a video demo for your reference.


Kindly try the shared sample if you still facing the same problem kindly share the below details it will help us to provide the solution for your query earlier.

  • Share the issue reproducing code snippets or
  • Reproduce the problem in our shared sample or
  • Share an issue reproducing sample if possible.


Regards,

Ravikumar Venkatesan


Attachment: syncfusionblazortabclosevideodemoandsample_dbd64786.zip


CR Chrsi Randall April 14, 2023 06:00 PM UTC

I am also getting this same error when clicking on an event in the SfScheduler after updating to 21.1.39.
I have tried making a sample project and cannot reproduce it there.



VR Vijay Ravi Syncfusion Team April 17, 2023 07:01 AM UTC

Hi Chrsi,


Sample Link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/ShowCloseButton_sample1054874518


We have checked your query at our end by preparing for a latest version V21.1.39 sample with the ShowCloseButton property of the Tab to true. But, we are unable to reproduce the problem at our end. We have prepared a video demo for your reference. Kindly try the shared sample if you still facing the same problem kindly share the below details it will help us to provide the solution for your query earlier.

  • Share the issue reproducing code snippets for tab component or
  • Reproduce the problem in our shared sample or
  • Share an issue reproducing sample if possible.


Regards,

Vijay Ravi


Attachment: video_demo_(3)_aef04a5.zip

Loader.
Live Chat Icon For mobile
Up arrow icon