While performing dotnet sitecore ser push, I received following error-
Unhandled exception: System.Exception: Unhandled exception
---> System.AggregateException: One or more errors occurred. (Error converting value 404 to type 'GraphQL.Common.Response.GraphQLResponse'. Path '', line 1, position 3.) (Error converting value 404 to type 'GraphQL.Common.Response.GraphQLResponse'. Path '', line 1, position 3.) (Error converting value 404 to type 'GraphQL.Common.Response.GraphQLResponse'. Path '', line 1, position 3.) (Error converting value 404 to type 'GraphQL.Common.Response.GraphQLResponse'. Path '', line 1, position 3.) (Error converting value 404 to type 'GraphQL.Common.Response.GraphQLResponse'. Path '', line 1, position 3.) (Error converting value 404 to type 'GraphQL.Common.Response.GraphQLResponse'. Path '', line 1, position 3.)
---> Newtonsoft.Json.JsonSerializationException: Error converting value 404 to type 'GraphQL.Common.Response.GraphQLResponse'. Path '', line 1, position 3.
---> System.ArgumentException: Could not cast or convert from System.Int64 to GraphQL.Common.Response.GraphQLResponse.
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.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[T](JsonReader reader)
at GraphQL.Client.Http.Internal.GraphQLHttpHandler.ReadHttpResponseMessageAsync(HttpResponseMessage httpResponseMessage)
at GraphQL.Client.Http.Internal.GraphQLHttpHandler.PostAsync(GraphQLRequest request, CancellationToken cancellationToken)
at Sitecore.DevEx.Serialization.Client.Datasources.Sc.SitecoreApiClient.<>c__DisplayClass13_0.<<RunQuery>b__0>d.MoveNext()
I was getting this error as the CM server responded with 404 to Sitecore CLI. Try to login to your cm server using the hostname that was used in dotnet sitecore login command. You would observe that your CM is not operational. If you do, you should make your CM server to run. You should also try to find why the CM stopped (check logs). Once your CM server is up, you can re-run dotnet sitecore ser push and it should work. Hope it helps!!
Thanks!
Comments
Post a Comment