Could not cast or convert from {null} to System.Guid.
DeonF opened this issue · comments
I am getting this error in the Who_does_Marko_know() method when running the samples against Gremlin Server 3.5
Stack Trace:
Newtonsoft.Json.JsonSerializationException: Error converting value {null} to type 'System.Guid'. Path 'requestId', line 1, position 17.
---> System.ArgumentException: Could not cast or convert from {null} to System.Guid.
at Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable(Object value, Type initialType, Type targetType)
at Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast(Object initialValue, CultureInfo culture, Type targetType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
--- End of inner exception stack trace ---
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
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.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
at Gremlin.Net.Driver.JsonMessageSerializer.DeserializeMessage[TMessage](Byte[] message)
at Gremlin.Net.Driver.Connection.Parse(Byte[] received)
at Gremlin.Net.Driver.Connection.ReceiveMessagesAsync()
at Gremlin.Net.Driver.ProxyConnection.SubmitAsync[T](RequestMessage requestMessage)
at Gremlin.Net.Driver.GremlinClient.SubmitAsync[T](RequestMessage requestMessage)
at ExRam.Gremlinq.Core.GremlinQueryEnvironmentExtensions.WebSocketGremlinQueryExecutor.<>c__DisplayClass6_0.<<Execute>g__Core|0>d.MoveNext() in /_/src/ExRam.Gremlinq.Providers.WebSocket/Extensions/GremlinQueryEnvironmentExtensions.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
at ExRam.Gremlinq.Core.GremlinQueryEnvironmentExtensions.WebSocketGremlinQueryExecutor.<>c__DisplayClass6_0.<<Execute>g__Core|0>d.System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult(Int16 token)
at System.Linq.AsyncEnumerable.SelectManyAsyncIterator`2.ToListAsync(CancellationToken cancellationToken) in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SelectMany.cs:line 432
at System.Linq.AsyncEnumerable.SelectManyAsyncIterator`2.ToListAsync(CancellationToken cancellationToken) in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SelectMany.cs:line 432
at System.Linq.AsyncEnumerable.SelectManyAsyncIterator`2.ToArrayAsync(CancellationToken cancellationToken) in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SelectMany.cs:line 423
at ExRam.Gremlinq.Samples.Shared.Logic.Who_does_Marko_know() in C:\Development\ExRam.Gremlinq.Samples\ExRam.Gremlinq.Samples.Shared\Logic.cs:line 190
at ExRam.Gremlinq.Samples.Shared.Logic.Run() in C:\Development\ExRam.Gremlinq.Samples\ExRam.Gremlinq.Samples.Shared\Logic.cs:line 31
at ExRam.Gremlinq.Samples.Program.Main() in C:\Development\ExRam.Gremlinq.Samples\ExRam.Gremlinq.Samples.Console\Program.cs:line 65
at ExRam.Gremlinq.Samples.Program.<Main>()
ExRam.Gremlinq.Samples\ExRam.Gremlinq.Samples.Shared\Logic.cs:line 190
Environment:
Gremlin Server 3.5 (running in a Docker container)
Current version of the samples references the 8.3 packages:
Disclaimer: I've only recently started working with Gremlin, so perhaps I am missing something obvious. This is, as far as I can remember, the first issue that i'm submitting to Github, so feel free to let me know if I am doing something wrong or not including enough information.
This is due to
org.apache.tinkerpop.gremlin.process.traversal.Order.decr
org.apache.tinkerpop.gremlin.process.traversal.Order.incr
being removed (after having been deprecated) in Gremlin Server 3.5. This has been fixed in Gremlinq 8.6.0. Please update the main branch in your clone of the Samples repo, it'll use 8.6.0 and it should be fixed.
You're a star! Thanks so much for the quick response.