[SOLVED] Unable to create rules from folder

I’m submitting a…

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

Current behavior

Currently, when I try to create new rules from the sync folder the sync process fails. (see logs bellow)

➜ bin/sq sync in /tmp/dev-rules -t rules
Synchronizing from /tmp/dev-rules

Executing the following steps
* STEP 0 of 6: Rules

* STEP 0 of 6: Importing Rules started

Rule 'Fetch user ORCID on update OR c...failed: Squidex.ClientLibrary.SquidexException: Squidex Request failed: {"message":"Validation error","traceId":"00-3f
649026e01a3941b02ec3dc7498c3e5-8aa2256a8f5b7f49-00","type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","details":["schemas: Schema users does not exis
   at Squidex.ClientLibrary.Utils.SquidexClientBase.EnsureResponseIsValidAsync(HttpResponseMessage response)
   at Squidex.ClientLibrary.Utils.SquidexClientBase.RequestJsonAsync[T](HttpMethod method, String path, HttpContent content, QueryContext context, Cancellatio
nToken ct)
   at Squidex.CLI.Commands.Implementation.Sync.Rules.RulesSynchronizer.<>c__DisplayClass7_2.<<ImportAsync>b__8>d.MoveNext()
--- End of stack trace from previous location ---
   at Squidex.CLI.Commands.Implementation.LogExtensions.DoSafeAsync(ILogger log, String process, Func`1 action).
ERROR: Squidex.ClientLibrary.SquidexException: Squidex Request failed: {"message":"Validation error","traceId":"00-3f649026e01a3941b02ec3dc7498c3e5-8aa2256a8f
5b7f49-00","type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","details":["schemas: Schema users does not exist."],"statusCode":400}
   at Squidex.CLI.Commands.Implementation.LogExtensions.HandleException(Exception ex, Action`1 error)
   at Squidex.CLI.Commands.Implementation.LogExtensions.DoSafeAsync(ILogger log, String process, Func`1 action)
   at Squidex.CLI.Commands.Implementation.Sync.Rules.RulesSynchronizer.ImportAsync(DirectoryInfo directoryInfo, JsonHelper jsonHelper, SyncOptions options, IS
ession session)
   at Squidex.CLI.Commands.Implementation.Sync.Synchronizer.<>c__DisplayClass5_0.<<ImportAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Squidex.CLI.Commands.Implementation.Sync.Extensions.Foreach[T](IEnumerable`1 source, Func`3 action)
   at Squidex.CLI.Commands.Implementation.Sync.Synchronizer.ImportAsync(String path, SyncOptions options, ISession session)
   at Squidex.CLI.Commands.App.Sync.In(InArguments arguments)
   at CommandDotNet.Execution.InvocationResultExtensions.GetResultCodeAsync(Object value)
   at CommandDotNet.AppRunner.HandleException(Exception ex, IConsole console, CommandContext commandContext)
   at CommandDotNet.AppRunner.Run(String[] args)
   at Squidex.CLI.Program.Main(String[] args)

Expected behavior

The rules should sync successfully. Unexisting ones created

Minimal reproduction of the problem

1 - Create a rule manually
2 - Sync out the application
3 - Manually delete the rule on the console.
4 - Attempt to sync in rule again


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

CLI version: Squidex CLI v7.0.0.0, API Compatibility >= 4.X

Have you checked whether the schema “users” exist?

Yeah, I did. :sweat_smile: I get the same error even when syncing the whole app folder. Not just the rules. i.e. when syncing everything (schemas, contents, etc) the rules still fail with the same error

Can you send me your sync folder as PM?

I have pushed a new version of the CLI.

1 Like

This topic was automatically closed after 2 days. New replies are no longer allowed.