Open stlemme opened 9 years ago
We need better error handling here, I've scheduled this for the resource manager overhaul in 5.1
All the models that used to work throw this error on chrome, except one. Mozilla works. Any ideas?
This error usually means the request for the xml resource succeeded (by returning a status code 200) but the response text couldn't be parsed into XML.
I would check to make sure your server is sending the right Content-Type header (text/xml
for instance) and that the .xml files are valid. You might also want to make sure the response text isn't empty. I've seen it happen that a server sends either an empty 200 OK response back or that the browser strips out the response text for some reason.
If that doesn't help you could link one of the models that don't work and I'll take a look.
Update. It works on windows chrome, but not on linux chrome. Same thing on internet explorer 11 for windows. Only the model that works everywhere works. I don't parse any headers but with the previous version of xml3d they worked on ubuntu. I work with meanjs.
URL working model: http://134.213.60.220:9000/api/v1/artefacts/55e1b046557c501074b2de5e/embed URL not working model: http://134.213.60.220:9000/api/v1/artefacts/55e1b046557c501074b2de64/embed
I have checked both xml files but I cannot find something. Thanks in advanced.
@7xo : I think in your case, the second model exceed the valid size for a valid XML request (buffer size). A possible workaround is splitting those meshes or using a different encoding. This is related to binary assets (#143), which is WIP.
@ksons I think you 're right. I will check it and let you know. Thank you for your support!
I found a solution. I tried to find out about blast but unfortunately with no result. There is lack of information and tools as @ksons mentioned. So I aborted blast, although it could be extremely useful and I checked the javascript code. I found out that responseXML was null but responseText wasn't. So I replaced the line
response = httpRequest.responseXML;
With var parser = new DOMParser(); response = parser.parseFromString(httpRequest.responseText, "application/xml");
Now everything works fine. Thank you again for your support!
This error appears in case the request to a remote asset fails for some reason.
error log: