[SOLVED] CLI - Schema <NOT FOUND> not found error

I have…

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

dotnet sq sync out test command returns Schema not found error

Expected behavior

Export app settings without errors

Minimal reproduction of the problem

Executing the following steps

  • STEP 1 of 5: Schemas
  • STEP 2 of 5: App
  • STEP 3 of 5: contents
  • STEP 4 of 5: Rules
  • STEP 5 of 5: Workflow

  • STEP 1 of 5: Exporting Schemas started

Exporting ‘pages’… failed: Newtonsoft.Json.JsonException: Schema not found.
at Squidex.CLI.Commands.Implementation.Sync.JsonHelper.JsonSchemaIdConverter.ReadJson(JsonReader reader, Type objectType, String existingValue, Boolean hasExistingValue, JsonSerializer serializer) in /home/runner/work/squidex-samples/squidex-samples/cli/Squidex.CLI/Squidex.CLI/Commands/Implementation/Sync/JsonHelper.cs:line 80
at Newtonsoft.Json.JsonConverter1.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonSerializer.Deserialize(TextReader reader, Type objectType) at Squidex.CLI.Commands.Implementation.Sync.JsonHelper.Convert[T](Object value) in /home/runner/work/squidex-samples/squidex-samples/cli/Squidex.CLI/Squidex.CLI/Commands/Implementation/Sync/JsonHelper.cs:line 206 at Squidex.CLI.Commands.Implementation.Sync.Schemas.SchemasSynchronizer.<>c__DisplayClass6_1.<<ExportAsync>b__3>d.MoveNext() in /home/runner/work/squidex-samples/squidex-samples/cli/Squidex.CLI/Squidex.CLI/Commands/Implementation/Sync/Schemas/SchemasSynchronizer.cs:line 49 --- End of stack trace from previous location where exception was thrown --- at Squidex.CLI.Commands.Implementation.Extension.DoSafeAsync(ILogger log, String process, Func1 action) in /home/runner/work/squidex-samples/squidex-samples/cli/Squidex.CLI/Squidex.CLI/Commands/Implementation/Extension.cs:line 72.
ERROR: Newtonsoft.Json.JsonException: Schema not found.
at Squidex.CLI.Commands.Implementation.Extension.HandleException(Exception ex, Action1 error) in /home/runner/work/squidex-samples/squidex-samples/cli/Squidex.CLI/Squidex.CLI/Commands/Implementation/Extension.cs:line 125 at Squidex.CLI.Commands.Implementation.Extension.DoSafeAsync(ILogger log, String process, Func1 action) in /home/runner/work/squidex-samples/squidex-samples/cli/Squidex.CLI/Squidex.CLI/Commands/Implementation/Extension.cs:line 76
at Squidex.CLI.Commands.Implementation.Sync.Schemas.SchemasSynchronizer.ExportAsync(DirectoryInfo directoryInfo, JsonHelper jsonHelper, SyncOptions options, ISession session) in /home/runner/work/squidex-samples/squidex-samples/cli/Squidex.CLI/Squidex.CLI/Commands/Implementation/Sync/Schemas/SchemasSynchronizer.cs:line 38
at Squidex.CLI.Commands.Implementation.Sync.Synchronizer.ExportAsync(String path, SyncOptions options, ISession session) in /home/runner/work/squidex-samples/squidex-samples/cli/Squidex.CLI/Squidex.CLI/Commands/Implementation/Sync/Synchronizer.cs:line 59
at Squidex.CLI.Commands.App.Sync.Out(OutArguments arguments) in /home/runner/work/squidex-samples/squidex-samples/cli/Squidex.CLI/Squidex.CLI/Commands/App_Sync.cs:line 52
at CommandDotNet.Execution.InvocationResultExtensions.GetResultCodeAsync(Object value) in CommandDotNet/Execution/InvocationResultExtensions.cs:line 16
at CommandDotNet.AppRunner.HandleException(Exception ex, IConsole console, CommandContext commandContext) in
CommandDotNet/AppRunner.cs:line 162
at CommandDotNet.AppRunner.Run(String[] args) in CommandDotNet/AppRunner.cs:line 83
at Squidex.CLI.Program.Main(String[] args) in /home/runner/work/squidex-samples/squidex-samples/cli/Squidex.CLI/Squidex.CLI/Program.cs:line 52

Environment

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

Version: [5]

Browser:

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

Others:

Can you provide me a backup of your DB with mongodump?

Run this command to get backup
docker exec sh -c ‘mongodump --archive’ > db.dump
Hope this is what you need :slightly_smiling_face:
Looks like this forum only allows to upload images so i’ve uploaded my dump to google drive https://drive.google.com/file/d/1OOOqLw_8_QlhZLHXZgQqWXD40-_XgkkA/view?usp=sharing
please let me know if there is a better way to share files here

Thx, you probably want to send me this as a PM, otherwise everybody can access it.

Thanks! will do in this way next time. this db has only dummy content so it shouldn’t be an issue :slightly_smiling_face:

1 Like

It does not work, it says “not a valid archive”

are you not able to unpack archive? or where do you see this error?

When I restore the backup I get this error.

sorry. what command do you use to restore? will try myself

I use a UI (studio3t), but it is just a wrapper around mongo restore.

Sorry, I was able to reproduce it myself and have pushed a fix for the CLI (6.1.0)

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