Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajax error: Unexpected end of input #13

Open
px3l opened this issue Oct 8, 2015 · 6 comments
Open

Ajax error: Unexpected end of input #13

px3l opened this issue Oct 8, 2015 · 6 comments

Comments

@px3l
Copy link

px3l commented Oct 8, 2015

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?

@hlg
Copy link
Member

hlg commented Oct 8, 2015

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.

@px3l
Copy link
Author

px3l commented Oct 8, 2015

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

@px3l
Copy link
Author

px3l commented Oct 8, 2015

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

@hlg
Copy link
Member

hlg commented Oct 8, 2015

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.

@px3l
Copy link
Author

px3l commented Oct 8, 2015

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?

@hlg
Copy link
Member

hlg commented Oct 8, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants