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
close icon

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



1 Reply

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

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

Loader.
Live Chat Icon For mobile
Up arrow icon