Jump to content

Uncaught SyntaxError: Unexpected end of JSON input error on browser tool


biswazr
 Share

Recommended Posts


Hello Everyone,

I am seeing an error in chrome debug panel which says  "Uncaught SyntaxError: Unexpected end of JSON input error on browser tool "  I have also attached the screenshot of the error.
I am using Babylon .5.4 exporter with the latest version of Babylon js on 2.78a blender. 
I am using screenimportmesh and asset manager to load 2 of my Babylon file.

But Asset manager is failing to achieve onsuccess event. so scene is not rendering, But if i am calling render scene on  assetmanager onerror scene is rendering which is a bit confusing, why The asset manager calling error when it is able to load models.

For reproducing the issue :
Reload the below link for 2nd  time  ,it will regenerate syntax error on browser debugger.

https://s3.amazonaws.com/sudha.xyz/buggy/screen.html

Reproducing scene not rendering problem :
remove below code from line number 111(visual studio code)

  run(gamescene);

This function is calling my scene rendering. But it should be fire up from mesh load onsuccess .if it is firing up from onerror .

if i remove calling the above function from error call scene will never load
I think it is linked to the Uncaught SyntaxError: Unexpected end of JSON input error on browser tool error.

Kindly help me with this bug .



please note: 
There are some other errors for manifest and one of startup function which I am aware of, and  as much as I know manifest are not really responsible for this issue 
 

Screenshot 2017-07-23 19.15.32.png

Thank you 

Edited by biswazr
added some clarrification
Link to comment
Share on other sites

  • 3 weeks later...

First, you've got another error before "Uncaught SyntaxError: Unexpected end of JSON input" (Uncaught ReferenceError: startup is not defined). This one is more likely the cause of renderer not starting.

Second, the "Unexpected end of JSON input" refers to one of the resouces loaded not being valid JSON. Both "car1.babylon" and "plain1.babylon" seem to be fine, but manifest files are XML files instead of JSON, and that's probably linked to your server configuration (ISS maybe?). But errors with manifest should not prevent the scene from loading.

So my guess is your problem originates with the first error about "startup" function not defined.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...