XML not loading in Unity Web Beta

Bug reports from playing on our Public Test Realm

XML not loading in Unity Web Beta

Postby jUnion44 » Wed May 06, 2020 1:36 pm

Hello,

When I launched the unity web beta, I received some XML error saying this:

Error initializing Localization Service: GetBytes(): Failed to load XMLData/GameLanguage.xml (Network error: "Unknown Error" while trying to download https://www.blankmediagames.com/TownOfS ... nguage.xml.)

It gives like different steps to recover but I've refreshed it several times and I have plenty of diskspace and I turned off my adblocker and I am still seeing the error.
My in game name is Zinc Sulfate.
jUnion44
Witch
Witch
 
Posts: 44
Joined: Fri Sep 16, 2016 4:22 pm
Location: Town Of Salem Forums

Re: XML not loading in Unity Web Beta

Postby woahah » Wed May 06, 2020 3:55 pm

Odd, what OS do you run
User avatar
woahah
Retributionist
Retributionist
 
Posts: 350
Joined: Wed May 15, 2019 8:59 am
Location: Summersky Island (gmt)

Re: XML not loading in Unity Web Beta

Postby jUnion44 » Wed May 06, 2020 5:02 pm

I'm openning it in google chrome on windows 10. It worked earlier today, but not anymore. I was able to make an account for the beta, but like it won't work!

[EDIT] Firefox does not work as well. Is it like something it downloads on my computer? I'm confused.
My in game name is Zinc Sulfate.
jUnion44
Witch
Witch
 
Posts: 44
Joined: Fri Sep 16, 2016 4:22 pm
Location: Town Of Salem Forums

Re: XML not loading in Unity Web Beta

Postby Jerme » Wed May 06, 2020 10:02 pm

Have you tried clearing your cache and retried?
Disclaimer: I try to abide by the game's softfilter and use the appropriate replacements, when I am using the forums. Those will be set in brackets. Example: [tarnation]
Visit my role suggestions and give me feedback: http://www.blankmediagames.com/phpbb/viewtopic.php?f=27&t=28949

Visit the Testing Grounds
Occupation: A developers pain and joy (QA-fox), currently "hired" by Ralozey
User avatar
Jerme
Global Moderator
Global Moderator
 
Posts: 28197
Joined: Thu Apr 30, 2015 2:09 pm

Re: XML not loading in Unity Web Beta

Postby jUnion44 » Fri May 08, 2020 10:44 am

Clearing the cache does not work. Using another browser I never played ToS on does not work.

When i attempt to record a video of it breaking with OBS it does work and I don't know why.
My in game name is Zinc Sulfate.
jUnion44
Witch
Witch
 
Posts: 44
Joined: Fri Sep 16, 2016 4:22 pm
Location: Town Of Salem Forums

Re: XML not loading in Unity Web Beta

Postby DocExer » Fri May 08, 2020 11:51 am

jUnion44, can you try taking a look at the Chrome javascript panel to see if you are able to see any errors:

Press Control+Shift+J (Windows, Linux, Chrome OS) to jump straight into the Console panel. There will be a lot of info printed out, and within that might be some information that would be helpful to understanding why your browser does not want to download the assets.
DocExer
Developer
Developer
 
Posts: 377
Joined: Sun Feb 22, 1970 9:33 am

Re: XML not loading in Unity Web Beta

Postby jUnion44 » Fri May 08, 2020 3:12 pm

https://imgur.com/a/CSh0BSk

It says something about a missing access control header in the XML file.

Thank you for responding to my bug report.

[EDIT] I figured out what the error is. If you put www in front of blankmediagames.com when doing PTR, there is no error. Without the www, when the browser tries to load the xml file with the www, it violates the same-origin policy and does not work. Maybe you can force it to go to www or not?
My in game name is Zinc Sulfate.
jUnion44
Witch
Witch
 
Posts: 44
Joined: Fri Sep 16, 2016 4:22 pm
Location: Town Of Salem Forums

Re: XML not loading in Unity Web Beta

Postby DocExer » Fri May 08, 2020 7:15 pm

Thanks, jUnion44. We'll look into that.
DocExer
Developer
Developer
 
Posts: 377
Joined: Sun Feb 22, 1970 9:33 am

Re: XML not loading in Unity Web Beta

Postby DocExer » Sun May 10, 2020 10:31 am

jUnion44, we have pushed a fix that should now redirect to www if it is not present. This should resolve this issue. Thanks again for your bug report.
DocExer
Developer
Developer
 
Posts: 377
Joined: Sun Feb 22, 1970 9:33 am

Re: XML not loading in Unity Web Beta

Postby LewisH95 » Thu May 14, 2020 5:17 am

Application.dataPath only ends with "Assets" (6 characters) when you run in the Editor. You shouldn't strip anything from the dataPath, just use it directly, and move your Xml files under your Assets folder.

You probably want to put the Xml files into your Resources folder to make sure they get included in the build.
LewisH95
Amnesiac
Amnesiac
 
Posts: 9
Joined: Sat May 09, 2020 3:54 am

Re: XML not loading in Unity Web Beta

Postby DocExer » Fri May 15, 2020 1:05 pm

@LewisH95, thanks for your feedback. The things you mention are all by design. Town of Salem uses a custom asset manager which downloads many assets, including XML, on demand. Usually this works fine, but in this case the CORS error interfered due to the missing www, which is now resolved.
DocExer
Developer
Developer
 
Posts: 377
Joined: Sun Feb 22, 1970 9:33 am


Return to PTR Bug Reports

Who is online

Users browsing this forum: No registered users and 3 guests