Closed ckapatch closed 1 week ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Can you create a reproduction project for what you're doing here? At least the MAUI UI App portion?
As far as I can tell, the docs don't recommend using JSON.NET, and the underlying code doesn't either. The sample in the doc you linked to doesn't either from what I can see, so I'm not sure how that would happen based on your info above.
Also for AOT/Trimming use-cases, IMO, I would move away from JSON.NET and to something like System.Text.Json, which supports it through source generators.
Hi @ckapatch. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
Description
We are using WebAuthenticator to authenticate users with a backend. using the standard setup described in this document: https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/communication/authentication?view=net-maui-8.0&tabs=windows
After implementing and testing in debug mode, we released a version on the android store to begin some external testing. The authentication failed in this environment with the error "Newtonsoft.Json.JsonSerializationException: A member with the name '' already exists on 'Microsoft.Maui.Authentication.WebAuthenticatorResult'. Use the JsonPropertyAttribute to specify another name."
Steps to Reproduce
Link to public reproduction project repository
No response
Version with bug
8.0.80 SR8
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 11 and up
Did you find any workaround?
Yes, if you disable AOT and remove trimming the app will work.
Relevant log output