Closed stpatrick2016 closed 3 years ago
Actually looks like I have found the problem - the error returned by XmlReader is misleading. The problem was in the extra comma after the message tag. Removing it it has worked as expected. Took me half day to figure out and only saw that after re-reading this post. Closing the issue - misleading error is not relevant to this library anyway.
Describe the bug In order to set priority for FCM messages, one needs to declare the priority tag on the same level as the data tag or, in the latest version it should be under the android tag. When using FcmTemplateRegistrationDescription with such template, an exception System.Xml.XmlException: There are multiple root elements is raised though.
Exception or Stack Trace
To Reproduce Steps to reproduce the behavior:
Code Snippet The code snippet that causes the issue.
Expected behavior The template should be accepted, or there should be another option to set properties such as priority (or any other of the dozens of properties)
Setup (please complete the following information):
Additional context I believe the problem lies in the FcmTemplateRegistrationDescription.OnValidate, line 294, which explicitly requires to have only 1 root.
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