SpiceDb icon indicating copy to clipboard operation
SpiceDb copied to clipboard

`StartIndex cannot be less than zero` when importing schema from string or file

Open wub opened this issue 7 months ago • 1 comments

Hello, when running dotnet test (or trying to import my own schema from a file), I get this error:

System.ArgumentOutOfRangeException: StartIndex cannot be less than zero. (Parameter 'startIndex')
   at System.String.ThrowSubstringArgumentOutOfRange(Int32 startIndex, Int32 length)
   at System.String.Substring(Int32 startIndex)
   at SpiceDb.Api.SchemaParser.Parse(String schema)
   at SpiceDb.SpiceDbClient.ImportSchemaFromStringAsync(String schema)

This is on M1 macOS Sonoma 14.1.1, .NET 7, SpiceDb 1.4.1. I'll clone the repo tonight and see if I can provide more details for you. Thanks!

wub avatar Nov 28 '23 21:11 wub