Open pasha-o opened 4 months ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @acsdevx-msft.
It seems adding the latest version of System.Text.Json, resolves the issue. Perhaps an updated version of the Nuget is required?
Library name and version
Azure.Communication.Email - 1.0.1
Describe the bug
Using this library to send an email in a Xamarin forms mobile application, for ios throws an exception, It works on android. exception:)
at System.Text.Json.Utf8JsonWriter.WritePropertyName (System.ReadOnlySpan:0
at Azure.Communication.Email.EmailRestClient.SendAsync (Azure.Communication.Email.EmailMessage message, System.Nullab
le
System.MissingMethodException: Method not found: int **System.Text.Encodings.Web.TextEncoder.FindFirstCharacterToEncodeUtf8**(System.ReadOnlySpan
11[T] utf8PropertyName) [0x00012] in <815ff95f4d6a463fa6a3be490e0514aa>:0 at Azure.Communication.Email.EmailMessage.Azure.Core.IUtf8JsonSerializable.Write (System.Text.Json.Utf8JsonWriter writer) [0x00080] in <f62568a7c6294e4ea7d2519d80d0c734>:0 at Azure.Core.Utf8JsonWriterExtensions.WriteObjectValue (System.Text.Json.Utf8JsonWriter writer, System.Object value) [0x0014a] in <f62568a7c6294e4ea7d2519d80d0c734>:0 at Azure.Communication.Email.EmailRestClient.CreateSendRequest (Azure.Communication.Email.EmailMessage message, System.Nullable
1[T] operationId) [0x000b0] in1[T] operationId, System.Threading.CancellationToken cancellationToken) [0x00024] in <f62568a7c6294e4ea7d2519d80d0c734>:0 at Azure.Communication.Email.EmailClient.SendEmailInternalAsync (Azure.WaitUntil wait, Azure.Communication.Email.EmailMessage message, System.Threading.CancellationToken cancellationToken) [0x000a9] in <f62568a7c6294e4ea7d2519d80d0c734>:0 at Azure.Communication.Email.EmailClient.SendAsync (Azure.WaitUntil wait, Azure.Communication.Email.EmailMessage message, System.Threading.CancellationToken cancellationToken) [0x000c4] in <f62568a7c6294e4ea7d2519d80d0c734>:0
here is the code:
var emailSendOperation = await emailClient.SendAsync(wait: WaitUntil.Completed, emailMessage); return emailSendOperation.Value.Status == EmailSendStatus.Succeeded;
Expected behavior
IT should send the email.
Actual behavior
It throws an exception.
Reproduction Steps
create an ios Xamarin app and try sending an email using the azure communication service.
Environment
No response