Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Json Exception Deleting service #878

Closed
joshbinney opened this issue May 29, 2022 · 4 comments
Closed

Json Exception Deleting service #878

joshbinney opened this issue May 29, 2022 · 4 comments

Comments

@joshbinney
Copy link

Hey I'm getting an exception System.Text.Json.JsonException: 'The JSON value could not be converted to k8s.Models.V1ServiceStatus. Path: $.status | LineNumber: 0 | BytePositionInLine: 67.'

Stack trace:
at System.Text.Json.ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType)
at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader) at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonConverter jsonConverter, Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonReaderState& readerState, Boolean isFinalBlock, ReadOnlySpan1 buffer, JsonSerializerOptions options, ReadStack& state, JsonConverter converterBase) at System.Text.Json.JsonSerializer.ContinueDeserialize[TValue](ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack, JsonConverter converter, JsonSerializerOptions options) at System.Text.Json.JsonSerializer.ReadAll[TValue](Stream utf8Json, JsonTypeInfo jsonTypeInfo) at System.Text.Json.JsonSerializer.ReadAllUsingOptions[TValue](Stream utf8Json, Type returnType, JsonSerializerOptions options) at System.Text.Json.JsonSerializer.Deserialize[TValue](Stream utf8Json, JsonSerializerOptions options) at k8s.KubernetesJson.Deserialize[TValue](Stream json) at k8s.Kubernetes.<CreateResultAsync>d__371.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at k8s.AbstractKubernetes.<k8s-ICoreV1Operations-DeleteNamespacedServiceWithHttpMessagesAsync>d__144.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult()
at k8s.CoreV1OperationsExtensions.d__261.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at k8s.CoreV1OperationsExtensions.DeleteNamespacedService(ICoreV1Operations operations, String name, String namespaceParameter, V1DeleteOptions body, String dryRun, Nullable1 gracePeriodSeconds, Nullable1 orphanDependents, String propagationPolicy, Nullable1 pretty)

when calling DeleteNamespacedServiceAsync

Thanks in advance!

@tg123
Copy link
Member

tg123 commented May 29, 2022

see pinned issue #824

@tg123 tg123 closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2022
@joshbinney
Copy link
Author

Sorry, did have a thorough google but missed that. Just to confirm, we are using kubernetes 1.22.6, and the latest client library. What do we need to do to avoid the exception?

@tg123
Copy link
Member

tg123 commented May 29, 2022

no worries, could you please try to update to 1.23?

@joshbinney
Copy link
Author

Nice, thats got it. Thought 1.22 was the latest, my bad. Thanks mate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants