Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.ArgumentNullException on Async Post #117

Closed
jnhaffey opened this issue May 12, 2020 · 2 comments · Fixed by #118
Closed

System.ArgumentNullException on Async Post #117

jnhaffey opened this issue May 12, 2020 · 2 comments · Fixed by #118

Comments

@jnhaffey
Copy link

jnhaffey commented May 12, 2020

After upgrading to 7.3 started getting this exception when attempting to send an email to mandrill via SentTemplateAsync method.

Call to Mandrill failed: "System.ArgumentNullException: Value cannot be null. Parameter name: o at Newtonsoft.Json.Linq.JToken.FromObjectInternal(Object o, JsonSerializer jsonSerializer) at Mandrill.Serialization.MandrillMergeVarConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType) at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType) at Mandrill.MandrillRequest.GetStreamContent[T](T value, StreamWriter writer) at Mandrill.MandrillRequest.PostAsJsonAsync[T](String requestUri, T value, CancellationToken c) at Mandrill.MandrillRequest.PostAsync[TRequest,TResponse](String requestUri, TRequest value) at Core.Providers.Mandrill.MandrillProvider.SendEmailToProviderUsingMandrill(EmailRequestMessage message, CancellationToken token, Func4 providerResponseHandler)"
`

When I downgrade to 7.2 this issue goes away.

@feinoujc
Copy link
Owner

feinoujc commented May 12, 2020

Is the content in one of the merge variables null?

(that's what it looks like, just want to confirm)

@feinoujc
Copy link
Owner

fixed in #118

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants