[SOLVED] Error exporting schema using CLI tools

I have…

  • [x ] Checked the logs and have provided the logs if I found something suspicious there

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [x ] Bug report
  • [ ] Performance issue
  • [x] Documentation issue or request

Current behavior

I am attempting to export the schema from the DB using the CLI on OS X and am receiving the error below which makes me wonder if these tools work on OS X since obviously these dlls will not be anywhere on my Mac.

Command ➜ sq schemas get schema > schema.json

ERROR: Could not load file or assembly ‘System.Diagnostics.Tools, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’. The system cannot find the file specified.

Expected behavior

I’d expect the schema to be exported.

Minimal reproduction of the problem

On OS X, install the CLI tools.

Connect to a cloud instance using instructions on the connect tab.

Use CLI to use that app.

Attempt to export schema as json and notice error.

Environment

  • [ ] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [x ] Cloud version

Version: [VERSION]

Browser:

  • [ ] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge
  • [x] N/A

Others:

Honestly I do not have a Mac. Which version do you use? The self contained version?

cli-v4.1

Downloaded the OSX version.

osx-64.zip or dotnet.zip?

osx-64.zip. Sorry for the confusion.

Can you try this: https://www.dropbox.com/s/i8h3qkgmd3xni76/sq?dl=1 ?

With that I successfully exported the schema.

Thanks.

Great, then I will change the build process tomorrow.

Hi, I have updated the build process, can you check the newest binaries?

Just to close the loop here, this is working.

2 Likes

Install Squidex CLI on OSX Mac

  1. $ brew cask install dotnet-sdk
  2. $ dotnet tool install
  3. $ dotnet tool install --global Squidex.CLI --version 4.3.0

Using Cli: https://docs.squidex.io/02-documentation/developer-guides/automation-tools

  1. $ sq config add [APPNAME] [CLIENT_ID] [CLIENT_SECRET]
  2. $ sq config list
  3. $ sq config use [APPNAME]
  4. $ sq schemas list
  5. $ sq schemas get [SCHEMA1] > [SCHEMA1].json

If something does not work, you can always remove the app and re-add again.
$ sq config remove [APPNAME]

This just works fine

2 Likes