WebGL-threeJS
WebGL-threeJS copied to clipboard
Ajax error: Unexpected end of input
Hey so I can connect to the BIMserver and it shows the models I have but when I load one to view I get this ajax error:
Ajax error: Unexpected end of input
Any help?
Can you check the BIMserver console output? If you see a NullPointerException there, then this is likely due to a bug in BIMserver, which should be fixed since the 1.4.0-FINAL-2015-09-26 release.
no, there is no NullPointerException there and I am using all the latest releases
the console is not saying anything in either BIMserver or the three viewer. Looking at the network, it hangs briefly on loading name: json, type: xhr, Initiator: jquery..., for about 4 seconds then brings up the error
I am afraid the threejs-serializer is flawed since the last updates. The error probably means that the JSON produced by the serializer is not valid and cannot be parsed. Can you have a look at the JSON file generated by the threejs serializer? You could curl the BIMserver API, download the JSON from BIMvie.ws or grab it from the BIMserver cache. Let me know if you (or a decent JSON validator) spot something strange. I remember I once had "NaN" causing a parser error. Not sure if this was fixed properly.
hey, thanks for your reply -
You could curl the BIMserver API
Could you please tell me the URL i would hit with curl in order to get the JSON for a model using the BIMserver API?
You have to post to http://[address]:[port]/[optional context]/json
as described in the BIMserver wiki. The payload is according to the BIMsie API. You first need the IDs of the serializer and the revison, then you can call the download
method and finally pass the resulting actionId
to the method getDownloadData
. That's how it's done in the viewer.