-
Notifications
You must be signed in to change notification settings - Fork 126
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
[BUG] CreateAppleTemplateRegistrationAsync throws an exception on .NET Maui (.NET 8) #328
Comments
I have the same issue. It suddenly happened. One week ago, my code worked, and last Thursday/Friday I did not change any code and I get this error message. @TAbbott117 I saw you replying on an other issue, so I tag you, because now the whole package is not working BTW, the calls for Android stuff are working fine, no exceptions on those method calls. Only the Apple calls are returning this exceptions |
I found a shady workaround for this issue. I integrated the NotificationHubs project directly into my solution and modified the AppleRegistrationDescription at runtime. I added the PushVariables element before the DeviceToken element: Steps:
I didn't investigate to see why the error is there, at first sight it seems that something is not working right in the System.Serialization or XMLSerializer, because it doesn't take into account that PushVariables element is optional/not required. Hence the fix to add an empty PushVariables element if it doesn't exist. |
It doesn't seem like we are getting a response here. I just checked and it still crashes. What to do? Submit the bug elsewhere? But where? |
any updates on this issue? |
Hi!
System.Runtime.Serialization.SerializationException: ErrorInLine, 1, 1098 UnexpectedElementExpectingElements, Element, DeviceToken, http://schemas.microsoft.com/netservices/2010/10/servicebus/connect, PushVariables |
I did a complete cleanup of my environment. Deleted dotnet folder, installed 8.0.401 .NET SDK, and ran command: "sudo dotnet workload install maui". Workaround was not needed anymore for me. |
Same issue here
Reinstalled dotnet 8.0.402 (version newer) and did dotnet workload install maui... > resulting in MAUI 8.0.82/8.0.100
|
I found a workaround, for my use case....but there are still issue in this repo when 'PushVariables' or 'Tags' aren't used.
Currently im always re-creating a registration, instead of retrieving an old one. Because methods like GetRegistrationsByChannelAsync do get the same errors, and by removing old registrations and re-creating new, it won't get the errors. |
Describe the bug
I'm currently migration a .NET Maui app from .NET 7 to .NET 8. I'm currently using Microsoft.Azure.NotificationHubs v4.2.0 but the app crashes while using CreateAppleTemplateRegistrationAsync
Exception or Stack Trace
To Reproduce
Code Snippet
Expected behavior
The CreateAppleTemplateRegistrationAsync should register the template without any issues. Using the same code in .NET Maui (.NET 7) works as expected.
Setup (please complete the following information):
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: