WebGL-threeJS icon indicating copy to clipboard operation
WebGL-threeJS copied to clipboard

Ajax error: Unexpected end of input

Open px3l opened this issue 9 years ago • 6 comments

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?

px3l avatar Oct 08 '15 15:10 px3l

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.

hlg avatar Oct 08 '15 15:10 hlg

no, there is no NullPointerException there and I am using all the latest releases

px3l avatar Oct 08 '15 15:10 px3l

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

px3l avatar Oct 08 '15 15:10 px3l

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.

hlg avatar Oct 08 '15 16:10 hlg

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?

px3l avatar Oct 08 '15 16:10 px3l

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.

hlg avatar Oct 08 '15 17:10 hlg