googlesamples / unity-jar-resolver

Unity plugin which resolves Android & iOS dependencies and performs version management
Other
1.21k stars 337 forks source link

iOS Platform:System.Xml.XmlException: Root element is missing #562

Open WikyWu opened 1 year ago

WikyWu commented 1 year ago

[READ] For Firebase Unity SDK question, please report to Firebase Unity Sample

Once you've read this section and determined that your issue is appropriate for this repository, please delete this section.

[REQUIRED] Please fill in the following fields:

[REQUIRED] Please describe the question here:

hello, i create the xxxDependencies.xml with code, at first it is an empty file, i call "AssetDatabase.Refresh();", on the Android platform it work well, by on iOS platform, it will log error "System.Xml.XmlException: Root element is missing.", but it will not affect my project, i think on iOS platform it can be done as same as Android platform(when the xxx.xml is empty, it will not parse the file or not log the error), thanks!

paulinon commented 1 year ago

Hi @WikyWu,

Could you verify if version 1.2.174 of the resolver produces the same result? If so, kindly provide a minimal, reproducible example along with the steps to replicate the issue so that we can analyze what's causing this behavior. Could you also specify the iOS version used?

WikyWu commented 1 year ago

@paulinon thanks for your reply, i import the version 1.2.174, the Android and iOS platform produces the same result, here is my demo, you can click menu(Test/TestUnityJarResolver) creates an empty xxx.xml file, then will log the error. Maybe this is your logic, i suggest, when the xxx.xml is empty, the resolver will not parse the file or not log the error ,thanks UnityJarResolverDemo-(1.2.174).zip

paulinon commented 1 year ago

Hi @WikyWu,

Thanks for the update. It turns out that the error message you're facing is intended when the file is empty. Preventing the resolver from parsing the empty file is something that we may consider. I've brought this to the team's attention, and you may refer to this thread for updates.

WikyWu commented 1 year ago

@paulinon thanks

CodeMasterYi commented 1 year ago

I think empty XML is not a well-formated XML. Maybe a root element provided is appreciated. Or delete it! I think there are more features that matter. @paulinon @WikyWu