Skip to content

'An error occurred deserializing the response' #1424

Closed

Description

@ReLiC71

What happened?

When linking the latest version of SM to Civitai by API key, it consistently returns 'An error occurred deserializing the response'. Key works fine via other avenues. I was able to link a different computer a few days ago, with no error, so it seems like something in the latest update broke

Steps to reproduce

Generate an API key on Civitai
Open Stability Matrix (2.15.2)
Go to Settings/Accounts
Select Connect on the Civitai line
Paste/type your API key in
Select Connect
Receive error

Relevant logs

Version

2.15.2

What Operating System are you using?

Windows

Activity

  1. Knirunmund commented on Oct 14, 2025

    @Knirunmund

    Getting the same thing last night and this morning. Windows v2.15.2 as well. Log file shows:

    2025-10-14 09:51:03.4747|ERROR|StabilityMatrix.Avalonia.Services.NotificationService|Refit.ApiException: An error occured deserializing the response.
     ---> System.Text.Json.JsonException: The JSON value could not be converted to StabilityMatrix.Core.Models.Api.CivitTRPC.CivitUserAccountResponse. Path: $.result.data.json | LineNumber: 0 | BytePositionInLine: 27.
       at System.Text.Json.ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType)
       at System.Text.Json.Serialization.Converters.ObjectWithParameterizedConstructorConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
       at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
       at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
       at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
       at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
       at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
       at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
       at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
       at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
       at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
       at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
       at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state)
       at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.ContinueDeserialize(ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack, T& value)
       at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsync(Stream utf8Json, CancellationToken cancellationToken)
       at System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsyncCore[T](HttpContent content, JsonSerializerOptions options, CancellationToken cancellationToken)
       at Refit.SystemTextJsonContentSerializer.FromHttpContentAsync[T](HttpContent content, CancellationToken cancellationToken) in c:\temp\releaser\refit\Refit\SystemTextJsonContentSerializer.cs:line 48
       at Refit.RequestBuilderImplementation.DeserializeContentAsync[T](HttpResponseMessage resp, HttpContent content, CancellationToken cancellationToken) in c:\temp\releaser\refit\Refit\RequestBuilderImplementation.cs:line 465
       at Refit.RequestBuilderImplementation.<>c__DisplayClass15_0`2.<<BuildCancellableTaskFuncForMethod>b__0>d.MoveNext() in c:\temp\releaser\refit\Refit\RequestBuilderImplementation.cs:line 390
       --- End of inner exception stack trace ---
       at Refit.RequestBuilderImplementation.<>c__DisplayClass15_0`2.<<BuildCancellableTaskFuncForMethod>b__0>d.MoveNext() in c:\temp\releaser\refit\Refit\RequestBuilderImplementation.cs:line 404
    --- End of stack trace from previous location ---
       at Refit.Implementation.Generated.StabilityMatrixCoreApiICivitTRPCApi.global::StabilityMatrix.Core.Api.ICivitTRPCApi.GetUserAccount(String input, String bearerToken, CancellationToken cancellationToken)
       at StabilityMatrix.Avalonia.Services.AccountsService.CivitLoginAsync(String apiToken)
       at StabilityMatrix.Avalonia.Services.NotificationService.TryAsync(Task task, String title, String message, NotificationType appearance)|Refit.ApiException: An error occured deserializing the response.
     ---> System.Text.Json.JsonException: The JSON value could not be converted to StabilityMatrix.Core.Models.Api.CivitTRPC.CivitUserAccountResponse. Path: $.result.data.json | LineNumber: 0 | BytePositionInLine: 27.
       at System.Text.Json.ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType)
       at System.Text.Json.Serialization.Converters.ObjectWithParameterizedConstructorConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
       at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
       at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
       at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
       at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
       at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
       at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
       at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
       at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
       at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
       at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
       at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state)
       at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.ContinueDeserialize(ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack, T& value)
       at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsync(Stream utf8Json, CancellationToken cancellationToken)
       at System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsyncCore[T](HttpContent content, JsonSerializerOptions options, CancellationToken cancellationToken)
       at Refit.SystemTextJsonContentSerializer.FromHttpContentAsync[T](HttpContent content, CancellationToken cancellationToken) in c:\temp\releaser\refit\Refit\SystemTextJsonContentSerializer.cs:line 48
       at Refit.RequestBuilderImplementation.DeserializeContentAsync[T](HttpResponseMessage resp, HttpContent content, CancellationToken cancellationToken) in c:\temp\releaser\refit\Refit\RequestBuilderImplementation.cs:line 465
       at Refit.RequestBuilderImplementation.<>c__DisplayClass15_0`2.<<BuildCancellableTaskFuncForMethod>b__0>d.MoveNext() in c:\temp\releaser\refit\Refit\RequestBuilderImplementation.cs:line 390
       --- End of inner exception stack trace ---
       at Refit.RequestBuilderImplementation.<>c__DisplayClass15_0`2.<<BuildCancellableTaskFuncForMethod>b__0>d.MoveNext() in c:\temp\releaser\refit\Refit\RequestBuilderImplementation.cs:line 404
    --- End of stack trace from previous location ---
       at Refit.Implementation.Generated.StabilityMatrixCoreApiICivitTRPCApi.global::StabilityMatrix.Core.Api.ICivitTRPCApi.GetUserAccount(String input, String bearerToken, CancellationToken cancellationToken)
       at StabilityMatrix.Avalonia.Services.AccountsService.CivitLoginAsync(String apiToken)
       at StabilityMatrix.Avalonia.Services.NotificationService.TryAsync(Task task, String title, String message, NotificationType appearance)
    
  2. ionite34 commented on Oct 14, 2025

    @ionite34
    Member

    Yeah this is due to an API change from Civitai in the request format and wrapping their response in an array. Should have fix soon.

  3. b1ndm4n commented on Oct 16, 2025

    @b1ndm4n

    I am also getting this same bug

  4. getthetechguy-png commented on Oct 16, 2025

    @getthetechguy-png

    Literally tried setting this up for the first time yesterday, and couldn't figure out how I was so stupid that I couldn't get an API cut and paste right. Patiently awaiting a fix. Please and thank you.

  5. minatowolf commented on Oct 17, 2025

    @minatowolf

    I walk away from generating for OOONE day and civitai goes kaboom. Man... I was enjoying the built in browser to easily download, eager for the patch

  6. MS00-GitIt commented on Oct 18, 2025

    @MS00-GitIt

    also receiving this error

  7. AllUsernamesUsed commented on Oct 19, 2025

    @AllUsernamesUsed

    Any Gnews???

  8. mohnjiles commented on Oct 19, 2025

    @mohnjiles
    Member

    Sorry folks, busy week for me this week between day job stuffs and other life things. Will have an update out before the weekend is over. Thanks for your patience!

  9. added a commit that references this issue on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions