[SOLVED] Latest CLI doesn't work with self-hosted version

I’ve downloaded the latest CLI version (4.0) and it no longer works with our self-hosted version of Squidex. Getting this error:

Running dotnet ./cli/sq.dll schemas list
ERROR: Could not deserialize the response body stream as Squidex.ClientLibrary.Management.SchemasDto.

Status: 200

Unfortunately, the Releases page doesn’t have the previous versions. Luckily, I downloaded version 3.x yesterday, and that one still works.

  1. Can I compile the CLI myself from our code base?
  2. Is it possible to keep previous releases on the Release page?
  3. What is causing above bug? Do I need to upgrade our code base? I’ve just upgraded to the netcore3 version last week.

Hi, it is a minor bug in Squidex which also requires an update of the CLI. I will post an update later, but it is not a problem of the API in general, only the very specific issue with the CLI.


a new version is in the pipeline. Here is what happened:

C# 8.0 introduced the concept of nullable vaiabled. If a variable can be null you have to annotate it explicitly. This also made all properties in the Json schemas as required, if not defined otherwise. Before it was an explicit action to define a property as required. So I had to go over all properties in the json schema and had to check if null is a valid value or not. But I have forgotten a few.

Unfortunately the C# client library was using a JSON parser that was throwing exceptions when it has a found a property to be null that is marked required.

What I have done:

  1. I went over all properties again and checked them.
  2. I disabled the validation feature in the client library, it was useless anyway and only caused trouble.

It was only a problem for C# and JSON.NET, not for other clients.

1 Like